/* Scheduled Event Vote Page Styles */
.scheduled-event-vote-container {
    min-height: 100vh;
    background: var(--gradient-purple);
    font-family: var(--font-system);
    position: relative;
    overflow-x: hidden;
}

/* Splash Screen */
.splash-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align:center;
    height: 100vh;
    color: white;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
    animation: logoFloat 2s ease-in-out infinite alternate;
}

.splash-logo {
    width:90%;
    height: auto;
    filter: brightness(1) drop-shadow(0 2px 2px rgba(257,255,255,5));
    transition: transform 0.3s ease;
}

.event-matchup {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease-in-out;
}

.event-matchup h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin: 0;
    letter-spacing: 1px;
}

.page-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-left: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Access Code Screen */
.access-code-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 2rem;
    color: white;
}

.access-form {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    min-width: 300px;
}

.access-form h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.access-code-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
    border: none;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    background: rgba(255,255,255,0.9);
    color: #333;
}

.access-code-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Voting Screen */
.voting-screen {
    padding: 1rem;
    min-height: 100vh;
    color: white;
}

.event-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 1rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.header-logo {
    margin-bottom: 1.5rem;
}

    .header-logo img {
        width: 80px;
        height: auto;
        filter: brightness(1) drop-shadow(0 2px 2px rgba(257,255,255,5));
        transition: transform 0.3s ease;
    }

.header-logo img:hover {
    transform: scale(1.05);
}

.header-content h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.3);
    background: linear-gradient(135deg, #ffffff, #f0f8ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
    line-height: 1.2;
}

.logo-small {
    margin-right: 1rem;
}

.logo-small img {
    width: 60px;
    height: auto;
}

.event-info h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.event-info p {
    margin: 0.5rem 0 0 0;
    opacity: 0.8;
    font-size: 1rem;
}

.voting-not-live {
    text-align: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.voting-not-live h2 {
    color: #ffeb3b;
    margin-bottom: 0.5rem;
}

/* Roster Grid - Updated for better card sizing */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Vote Button Overrides for ScheduledEventVote Page - Logo Style */
.voting-screen .vote-buttons-section {
    justify-content: flex-end !important;
    gap: 12px !important;
    display: flex !important;
    align-items: center !important;
}

.voting-screen .vote-btn {
    flex: none !important;
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    max-width: 70px !important;
    max-height: 70px !important;
    border-radius: 50% !important;
    aspect-ratio: 1 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(102, 126, 234, 0.3) !important;
    padding: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.voting-screen .vote-btn:hover {
    transform: translateY(-2px) scale(1.05) !important;
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.3) !important;
}

.voting-screen .vote-btn-content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.voting-screen .vote-btn img {
    width: 100% !important;
    height: 100% !important;
    margin-bottom: 0 !important;
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3)) !important;
    object-fit: contain !important;
}

.voting-screen .vote-btn span {
    display: none !important;
}

.voting-screen .vote-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: rgba(200, 200, 200, 0.5) !important;
    border-color: rgba(150, 150, 150, 0.3) !important;
}

.voting-screen .vote-btn.voted {
    background: rgba(76, 175, 80, 0.9) !important;
    border-color: #4caf50 !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5) !important;
}

.voting-screen .vote-btn.voted img {
    filter: brightness(0) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
}

/* Error Screen */
.error-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: white;
    text-align: center;
    padding: 2rem;
}

.error-screen h2 {
    color: #ff5252;
    margin-bottom: 1rem;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Animations */
@keyframes logoFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-10px); }
}

@keyframes titleGlow {
    0% { 
        text-shadow: 0 4px 8px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.3);
        filter: brightness(1);
    }
    100% { 
        text-shadow: 0 4px 12px rgba(0,0,0,0.7), 0 0 30px rgba(255,255,255,0.6), 0 0 40px rgba(102,126,234,0.4);
        filter: brightness(1.1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .roster-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.2rem;
    }

    .voting-screen .vote-btn {
        min-width: 45px !important;
        min-height: 45px !important;
        max-width: 45px !important;
        max-height: 45px !important;
        padding: 6px !important;
    }

        .voting-screen .vote-btn img {
            width: 100% !important;
            height: 100% !important;
        }
}

@media (max-width: 768px) {
    .roster-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
    }

    .event-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .header-logo {
        margin-bottom: 1rem;
    }

    .header-logo img {
        width: 60px;
    }

    .header-content h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .access-form {
        min-width: 280px;
    }

    .voting-screen .vote-btn {
        min-width: 50px !important;
        min-height: 50px !important;
        padding: 4px !important;
    }

    .voting-screen .vote-btn img {
        width: 80% !important;
        height: 80% !important;
    }

    .event-matchup h2 {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .roster-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .splash-logo {
        width: 90%;
        height: auto;
        filter: brightness(1) drop-shadow(0 2px 2px rgba(257,255,255,5));
        transition: transform 0.3s ease;
    }

    .scheduled-event-vote-container {
        padding: 0.5rem;
    }

    .event-header {

        padding: 1rem 0.5rem;
        margin-bottom: 1rem;
    }

    .header-logo {
        margin-bottom: 0.8rem;
    }

    .header-logo img {
        width: 50px;
    }

    .header-content h1 {
        font-size: 1.4rem;
        letter-spacing: 0.5px;
        line-height: 1.1;
    }

    .voting-screen .vote-btn {
        padding: 4px !important;
    }

    .voting-screen .vote-btn.overall img {
        width: 100% !important;
        height: 100% !important;
    }

    .voting-screen .vote-btn img {
        width: 80% !important;
        height: 80% !important;
    }

    .event-matchup h2 {
        font-size: 1.2rem;
        letter-spacing: 0.3px;
        padding: 0 1rem;
    }

}

/* Award Grid Styles */
.award-selection-header {
    text-align: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin: 2rem 0 1.5rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
}

.award-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.award-grid.disabled {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .award-selection-header {
        font-size: 1.5rem;
        margin: 1.5rem 0 1rem 0;
    }

    .award-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .award-selection-header {
        font-size: 1.25rem;
        margin: 1rem 0 0.75rem 0;
    }

    .award-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
        padding: 0.5rem;
    }
}

/* ========================================
   QR CODE SHARING FEATURE
   ======================================== */

/* Floating QR Button */
.floating-qr-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-purple);
    border: none;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Accessibility */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* Ensure QR icon is fully visible */
.floating-qr-button .bi {
    color: white;
    opacity: 1;
}

.floating-qr-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.floating-qr-button:active {
    transform: scale(0.95);
}

.floating-qr-button:focus-visible {
    outline: 3px solid var(--color-purple-start);
    outline-offset: 4px;
}

/* QR Modal Overlay */
.qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-award-reveal);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: qrFadeIn 0.3s ease;
    /* Smooth transitions */
    touch-action: none;
}

/* QR Modal Content Card */
.qr-modal-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: qrSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Close Button */
.qr-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 10;
    /* Enhanced touch target for mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.qr-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.qr-modal-close:active {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
}

.qr-modal-close:focus-visible {
    outline: 2px solid var(--color-purple-start);
    outline-offset: 2px;
}

/* Modal Header */
.qr-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.qr-icon-large {
    font-size: 48px;
    color: var(--color-purple-start);
    margin-bottom: 16px;
    display: block;
}

.qr-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

/* Cycling text animation for QR modal */
.cycling-text-container {
    position: relative;
    display: block;
    height: 1.2em;
}

.cycling-text {
    position: absolute;
    left: 0;
    right: 0;
    opacity: 0;
    transform: translateY(10px);
    animation-duration: 6s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.cycling-text-1 {
    animation-name: cycleText1;
}

.cycling-text-2 {
    animation-name: cycleText2;
}

@keyframes cycleText1 {
    0%, 5% {
        opacity: 0;
        transform: translateY(10px);
    }
    10%, 45% {
        opacity: 1;
        transform: translateY(0);
    }
    50%, 100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@keyframes cycleText2 {
    0%, 50% {
        opacity: 0;
        transform: translateY(10px);
    }
    55%, 90% {
        opacity: 1;
        transform: translateY(0);
    }
    95%, 100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.qr-modal-header p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* QR Code Container */
.qr-code-container {
    display: flex;
    justify-content: center;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 24px;
}

#qrCodeDisplay {
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrCodeDisplay img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated; /* Keep QR codes sharp */
}

/* Modal Footer */
.qr-modal-footer {
    text-align: center;
}

.access-code-display {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(7, 8, 13, .14)
}

.access-code-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.access-code-value {
    font-size: 32px;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    letter-spacing: 4px;
}

.share-instruction {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Animations */
@keyframes qrFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes qrSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .floating-qr-button {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }

    .qr-modal-content {
        padding: 32px 24px;
        border-radius: 20px;
        width: 95%;
    }

    .qr-modal-close {
        width: 48px;
        height: 48px;
        font-size: 24px;
        top: 12px;
        right: 12px;
    }

    .qr-modal-header h2 {
        font-size: 24px;
    }

    .qr-modal-header p {
        font-size: 14px;
    }

    .qr-code-container {
        padding: 20px;
    }

    #qrCodeDisplay {
        width: 240px;
        height: 240px;
    }

    .access-code-value {
        font-size: 28px;
        letter-spacing: 3px;
    }

    .share-instruction {
        font-size: 13px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .floating-qr-button {
        width: 52px;
        height: 52px;
        bottom: 16px;
        right: 16px;
        font-size: 22px;
    }

    .qr-modal-content {
        padding: 24px 20px;
    }

    .qr-modal-close {
        width: 44px;
        height: 44px;
        font-size: 22px;
        top: 10px;
        right: 10px;
    }

    .qr-modal-header h2 {
        font-size: 22px;
    }

    #qrCodeDisplay {
        width: 200px;
        height: 200px;
    }

    .access-code-value {
        font-size: 24px;
        letter-spacing: 2px;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .qr-modal-content {
        max-height: 95vh;
        padding: 24px;
    }

    .qr-modal-header {
        margin-bottom: 20px;
    }

    .qr-icon-large {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .qr-code-container {
        padding: 16px;
    }

    #qrCodeDisplay {
        width: 180px;
        height: 180px;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .floating-qr-button,
    .qr-modal-close,
    .qr-modal-overlay,
    .qr-modal-content {
        animation: none;
        transition: none;
    }

    .floating-qr-button:hover {
        transform: none;
    }

    .qr-modal-close:hover {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .floating-qr-button {
        border: 2px solid white;
    }

    .qr-modal-content {
        border: 2px solid #000;
    }

    .access-code-display {
        border: 2px solid white;
    }
}