:root {
    /* LCMS ENDURE brand palette */
    --primary-purple: #302984;        /* ENDURE Purple - RGB 48, 41, 132 */
    --secondary-purple: #a23bb0;      /* ENDURE Light Purple - RGB 162, 59, 176 */
    --light-purple: #a23bb0;          /* ENDURE Light Purple - RGB 162, 59, 176 */
    --gold: #f5de39;                  /* ENDURE Yellow - RGB 245, 222, 57 */
    --light-gold: #f5de39;            /* ENDURE Yellow - RGB 245, 222, 57 */
    --turquoise: #27a2c2;             /* ENDURE Turquoise - RGB 39, 162, 194 */
    --green: #7ab492;                 /* ENDURE Green - RGB 122, 180, 146 */
    --completionist-color: #302984;   /* Use primary purple for completionist */
    --completionist-light: #a23bb0;   /* Use light purple for completionist */

    /* Additional brand color variables */
    --endure-purple: #302984;
    --endure-light-purple: #a23bb0;
    --endure-yellow: #f5de39;
    --endure-turquoise: #27a2c2;
    --endure-green: #7ab492;

    /* UI glass effect colors */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Brand text helpers */
.brand-title {
    color: var(--primary-purple);
}

/* --- Global Loading Indicator --- */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out; /* Add transition for fade-out */
}

#loading-indicator p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-purple);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 8px solid #f3f4f6; /* gray-100 */
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- App Loading State Control --- */
body.app-loading #app-container {
    visibility: hidden;
    opacity: 0;
}

/* Animate loader out */
body:not(.app-loading) #loading-indicator {
    opacity: 0;
    pointer-events: none; /* Prevent interaction during fade-out */
}

#app-container {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}


body {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
    font-family: 'Mundial', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow:
        0 8px 32px 0 rgba(124, 58, 237, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tab-link {
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
}

.tab-link:hover {
    background: var(--glass-bg);
    color: var(--primary-purple);
}

.tab-link.active {
    color: var(--primary-purple);
    background: var(--glass-bg);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary-purple) 100%);
    border-radius: 3px;
}

.tab-section {
    animation: fadeIn 0.5s ease;
}

.tab-section.hidden {
    display: none;
}

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

.bingo-grid {
    display: grid;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    min-height: 400px; /* Ensure grid has height during load */
}

.bingo-grid.regular {
    grid-template-columns: repeat(5, 1fr);
}

.bingo-grid.completionist {
    grid-template-columns: repeat(4, 1fr);
}

.bingo-tile {
    aspect-ratio: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.bingo-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.2);
    border-color: var(--primary-purple);
}

.bingo-tile.completed {
    background: linear-gradient(135deg, var(--endure-purple) 0%, var(--endure-light-purple) 100%);
    color: white;
    border-color: var(--primary-purple);
    transform: scale(0.95);
}

.bingo-tile.completed:hover {
    transform: scale(0.98);
}


.bingo-tile.completionist {
    border-color: var(--completionist-color);
}

.bingo-tile.completionist.completed {
    background: linear-gradient(135deg, var(--completionist-color) 0%, var(--completionist-light) 100%);
    border-color: var(--completionist-color);
}



.bingo-tile-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    padding: 0.5rem;
    color: #1f2937;
}

.bingo-tile.completed .bingo-tile-text {
    color: white;
}

.bingo-tile.completed::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    opacity: 0.3;
}

.card-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.total-points {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.card-type-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 2px solid var(--primary-purple);
    background: var(--glass-bg);
    color: var(--primary-purple);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.card-type-btn:hover {
    background: var(--primary-purple);
    color: white;
}
.card-type-btn.active {
    border-color: var(--primary-purple);
    background: var(--primary-purple);
    color: white;
}
.card-type-btn.completionist {
    border-color: var(--completionist-color);
    color: var(--completionist-color);
}
.card-type-btn.completionist:hover,
.card-type-btn.completionist.active {
    background: var(--completionist-color);
    color: white;
    border-color: var(--completionist-color);
}

.verse-container {
    text-align: center;
    padding: 1rem;
    position: relative;
}

.verse-text {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #1f2937;
    font-style: italic;
    margin: 0.5rem 0;
}

.verse-reference {
    font-size: 1rem;
    color: var(--primary-purple);
    font-weight: 600;
    margin-top: 0.5rem;
}

.verse-compact {
    padding: 0.5rem;
}

.verse-compact .verse-text {
    font-size: 1rem;
}

.verse-compact .verse-reference {
    font-size: 0.875rem;
}



.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-purple);
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}


@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}


.bingo-sub-progress {
    position: absolute;
    left: 0.5rem;
    bottom: 0.25rem;
    font-size: 0.7rem;
    color: #4b5563;
    margin-top: 0;
}

.sublist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.sublist-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    max-height: 80vh;
    overflow-y: auto;
}

.sublist-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.sublist-close:hover {
    color: #111827;
}

.sublist-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sublist-items li {
    padding: 0.25rem 0;
    border-bottom: none;
}


.sub-item-btn {
    display: block;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sub-item-input {
    display: block;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.sub-item-input.selected {
    border-color: var(--primary-purple);
    background: rgba(124,58,237,0.1);
}

.sublist-search {
    display: block;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.challenge-suggest-input {
    display: block;
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.sub-item-btn:hover {
    background: rgba(124,58,237,0.1);
    border-color: var(--primary-purple);
}

.sub-item-btn.selected {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}


.btn-primary {
    background: linear-gradient(135deg, var(--endure-purple) 0%, var(--endure-light-purple) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

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

.btn-secondary {
    background: linear-gradient(135deg, var(--completionist-color) 0%, var(--completionist-light) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}


.btn-compact {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.poll-container {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.poll-option {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.poll-option:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: var(--primary-purple);
    transform: translateX(5px);
}

.poll-option.selected {
    background: rgba(124, 58, 237, 0.2);
    border-color: var(--primary-purple);
}

.poll-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary-purple) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .bingo-grid.regular,
    .bingo-grid.completionist {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .bingo-tile {
        aspect-ratio: auto;
        flex-direction: row;
        justify-content: flex-start;
        padding-left: 2rem;
        min-height: 60px;
    }

    .bingo-tile-text {
        font-size: 0.9rem;
        text-align: left;
    }

    .bingo-tile.completed::after {
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        opacity: 1;
        font-size: 1.25rem;
    }

    .verse-text {
        font-size: 1.1rem;
    }

    .verse-container {
        padding: 0.5rem;
    }

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

    .card-selector {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Mobile dropdown navigation removed */
}
/* Enhanced CSS for username validation feedback */

/* Username input container enhancements */
#username-container {
    position: relative;
}

#username-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Username input styling based on validation state */
#username {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#username:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

#username.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#username.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Validation feedback styling */
#username-feedback {
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
    min-height: 1.25rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#username-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

#username-feedback.hide {
    opacity: 0;
    transform: translateY(-10px);
}

/* Success feedback */
#username-feedback.success {
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#username-feedback.success::before {
    content: "";
}

/* Error feedback */
#username-feedback.error {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#username-feedback.error::before {
    content: "⚠";
    color: #ef4444;
    font-weight: bold;
}

/* Warning feedback */
#username-feedback.warning {
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#username-feedback.warning::before {
    content: "⚡";
    color: #f59e0b;
    font-weight: bold;
}

/* Character counter */
.username-counter {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6b7280;
    transition: color 0.2s ease;
}

.username-counter.warning {
    color: #f59e0b;
}

.username-counter.error {
    color: #ef4444;
}

/* Validation suggestions */
.validation-suggestions {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    display: none;
}

.validation-suggestions.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.validation-suggestions h4 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.validation-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-suggestions li {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-suggestions li::before {
    content: "•";
    color: var(--primary-purple);
    font-weight: bold;
}

/* Suggested username buttons */
.suggested-username {
    display: inline-block;
    background: var(--glass-bg);
    border: 1px solid var(--primary-purple);
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    font-size: 0.75rem;
    color: var(--primary-purple);
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggested-username:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-1px);
}

/* Leaderboard username validation indicators */
.leaderboard-username {
    position: relative;
}

.leaderboard-username.validated::after {
    content: "";
}

.leaderboard-username.cleaned::after {
    content: "🔧";
    color: #f59e0b;
    font-size: 0.75rem;
    margin-left: 0.25rem;
    opacity: 0.7;
    cursor: help;
    title: "Username was automatically cleaned";
}

/* Loading state for username validation */
.username-validating {
    position: relative;
}

.username-validating::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #username-feedback {
        font-size: 0.8rem;
    }
    
    .validation-suggestions {
        font-size: 0.8rem;
    }
    
    .suggested-username {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .validation-suggestions {
        background: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }
    
    .validation-suggestions h4 {
        color: #f9fafb;
    }
    
    .suggested-username {
        background: #374151;
        border-color: var(--primary-purple);
        color: var(--primary-purple);
    }
    
    .username-counter {
        color: #9ca3af;
    }
}

/* Accessibility improvements */
#username:focus + .username-counter {
    font-weight: 600;
}

.validation-suggestions:focus-within {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #username.valid {
        border-color: #008000;
        border-width: 2px;
    }
    
    #username.invalid {
        border-color: #ff0000;
        border-width: 2px;
    }
    
    #username-feedback.success {
        color: #008000;
        font-weight: 700;
    }
    
    #username-feedback.error {
        color: #ff0000;
        font-weight: 700;
    }
}

/* Print styles */
@media print {
    .validation-suggestions,
    #username-feedback,
    .username-counter {
        display: none;
    }
}

/* -------------------------------------------------- */
/* Anti-Cheat System Visual Styles */
/* -------------------------------------------------- */

/* Locked challenge tiles */
.bingo-tile.locked {
    background: rgba(156, 163, 175, 0.3); /* gray-400 with opacity */
    border-color: #9ca3af; /* gray-400 */
    cursor: not-allowed;
    position: relative;
    opacity: 0.6;
}

.bingo-tile.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: #ef4444; /* red-500 */
}

.bingo-tile.locked .bingo-tile-text {
    color: #6b7280; /* gray-500 */
}

/* Lock icon for locked challenges */
.lock-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    opacity: 0.8;
    z-index: 2;
}

/* Timer indicator for recently completed challenges */
.timer-indicator {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.6rem;
    text-align: center;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 3;
    display: none;
}

.bingo-tile.completed .timer-indicator {
    background: rgba(220, 38, 38, 0.8); /* red-600 with opacity */
}

/* Challenge unlock notification */
.unlock-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--endure-purple) 0%, var(--endure-light-purple) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
    z-index: 1000;
    text-align: center;
    animation: unlockPulse 2s ease-in-out;
}

@keyframes unlockPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Suspicious activity warning overlay */
.suspicious-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(239, 68, 68, 0.9); /* red-500 with opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
    text-align: center;
    animation: suspiciousFade 0.5s ease-in-out;
}

.suspicious-warning-content {
    background: white;
    color: #1f2937; /* gray-800 */
    padding: 2rem;
    border-radius: 1rem;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.suspicious-warning-content h3 {
    color: #ef4444; /* red-500 */
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.suspicious-warning-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

@keyframes suspiciousFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Challenge progress indicators with timing */
.challenge-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 0.75rem 0.75rem;
    overflow: hidden;
}

.challenge-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--endure-yellow) 0%, var(--endure-green) 100%);
    transition: width 0.3s ease;
    border-radius: inherit;
}


/* Event timeline indicator */
.event-timeline {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.event-day {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-weight: 600;
    transition: all 0.3s ease;
}

.event-day.current {
    background: var(--endure-purple);
    color: white;
    border-color: var(--endure-purple);
}

.event-day.past {
    opacity: 0.6;
    background: var(--endure-green);
    color: white;
}

.event-day.future {
    opacity: 0.8;
    color: #6b7280; /* gray-500 */
}

/* Anti-cheat status indicator */
.anticheat-status {
    position: static;
    display: inline-block;
    margin-top: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    z-index: 100;
    transition: all 0.3s ease;
}

.anticheat-status.warning {
    border-color: #f59e0b; /* yellow-500 */
    color: #f59e0b;
}

.anticheat-status.error {
    border-color: #ef4444; /* red-500 */
    color: #ef4444;
}

.anticheat-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Challenge unlock countdown */
.unlock-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    z-index: 2;
    min-width: 80px;
}

/* Pulsing effect for newly unlocked challenges */
.bingo-tile.newly-unlocked {
    animation: newUnlockPulse 3s ease-in-out;
    border-color: var(--endure-yellow);
    box-shadow: 0 0 20px rgba(245, 222, 57, 0.5);
}

@keyframes newUnlockPulse {
    0%, 100% {
        border-color: var(--glass-border);
        box-shadow: none;
    }
    50% {
        border-color: var(--endure-yellow);
        box-shadow: 0 0 20px rgba(245, 222, 57, 0.5);
    }
}

/* Rate limiting warning */
.rate-limit-warning {
    background: rgba(245, 158, 11, 0.9); /* yellow-500 with opacity */
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    border-left: 4px solid #f59e0b;
    animation: slideDown 0.3s ease;
}

.rate-limit-warning h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rate-limit-warning p {
    font-size: 0.875rem;
    margin: 0;
}

/* Enhanced notification styles */
.notification.anti-cheat {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.notification.unlock {
    border-left: 4px solid var(--endure-yellow);
    background: rgba(245, 222, 57, 0.1);
}

.notification.encouragement {
    border-left: 4px solid var(--endure-green);
    background: rgba(122, 180, 146, 0.1);
}

/* Mobile responsiveness for anti-cheat elements */
@media (max-width: 768px) {
    .timer-indicator {
        font-size: 0.55rem;
        padding: 1px 3px;
    }

    .lock-icon {
        font-size: 1rem;
        top: 6px;
        right: 6px;
    }

    .unlock-countdown {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        min-width: 60px;
    }

    .anticheat-status {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        margin-top: 0.25rem;
    }

    .suspicious-warning-content {
        margin: 1rem;
        padding: 1.5rem;
    }

    .event-timeline {
        padding: 0.5rem;
    }

    .event-day {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
        margin: 0.125rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bingo-tile.locked {
        background: rgba(75, 85, 99, 0.3); /* gray-600 with opacity */
        border-color: #6b7280; /* gray-500 */
    }

    .bingo-tile.locked .bingo-tile-text {
        color: #9ca3af; /* gray-400 */
    }

    .unlock-countdown {
        background: rgba(255, 255, 255, 0.9);
        color: #1f2937; /* gray-800 */
    }

    .event-timeline {
        background: rgba(31, 41, 55, 0.8); /* gray-800 with opacity */
    }

    .anticheat-status {
        background: rgba(31, 41, 55, 0.8);
        color: #d1d5db; /* gray-300 */
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bingo-tile.locked {
        border-width: 3px;
        border-color: #000000;
        background: #cccccc;
    }

    .timer-indicator {
        background: #000000;
        color: #ffffff;
        border: 1px solid #ffffff;
    }

    .suspicious-warning {
        background: #ff0000;
    }

    .unlock-notification {
        background: #0000ff;
        border: 2px solid #ffffff;
    }
}

/* Print styles - hide anti-cheat elements */
@media print {
    .timer-indicator,
    .lock-icon,
    .unlock-countdown,
    .anticheat-status,
    .suspicious-warning,
    .unlock-notification {
        display: none !important;
    }

    .bingo-tile.locked {
        opacity: 0.3;
    }
}

/* Accessibility improvements */
.bingo-tile.locked:focus {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.timer-indicator[aria-label] {
    cursor: help;
}

/* Animation for smooth transitions */
.bingo-tile {
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.bingo-tile.locked {
    transition: all 0.3s ease;
}

/* Pulse animation for urgent notifications */
@keyframes urgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.urgent-notification {
    animation: urgentPulse 1s infinite;
}
/* Enhanced Anti-Cheat Visual Styles - ADD TO styles/global.css */

/* Event Status Indicator */
#event-status {
    transition: all 0.3s ease;
    font-weight: 600;
}

#event-status.active {
    background: rgba(34, 197, 94, 0.1) !important; /* green-500 */
    border-color: #10b981 !important; /* green-600 */
}

#event-status.pending {
    background: rgba(59, 130, 246, 0.1) !important; /* blue-500 */
    border-color: #3b82f6 !important; /* blue-500 */
}

#event-status.completed {
    background: rgba(156, 163, 175, 0.1) !important; /* gray-400 */
    border-color: #9ca3af !important; /* gray-400 */
}

/* Enhanced Locked Challenge Tiles */
.bingo-tile.locked {
    background: rgba(156, 163, 175, 0.2) !important; /* gray-400 with opacity */
    border-color: #9ca3af !important; /* gray-400 */
    cursor: not-allowed;
    position: relative;
    opacity: 0.6;
    filter: grayscale(0.5);
    transform: none !important;
}

.bingo-tile.locked:hover {
    transform: none !important;
    box-shadow: 0 0 0 2px #ef4444 !important; /* red-500 */
    border-color: #ef4444 !important;
}

.bingo-tile.locked .bingo-tile-text {
    color: #6b7280 !important; /* gray-500 */
}

/* Cooldown State */

/* Newly Unlocked Animation */
.bingo-tile.newly-unlocked {
    animation: unlockGlow 3s ease-in-out;
    border-color: var(--endure-yellow) !important;
    box-shadow: 0 0 20px rgba(245, 222, 57, 0.6) !important;
}

@keyframes unlockGlow {
    0%, 100% {
        border-color: var(--glass-border);
        box-shadow: none;
    }
    50% {
        border-color: var(--endure-yellow);
        box-shadow: 0 0 20px rgba(245, 222, 57, 0.6);
    }
}

/* Lock Icon Styling */
.lock-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    opacity: 0.8;
    z-index: 3;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    pointer-events: none;
}

/* Timer Indicator Styling */
.timer-indicator {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9); /* red-500 */
    color: white;
    font-size: 0.7rem;
    text-align: center;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 700;
    z-index: 3;
    display: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: timerPulse 1s infinite;
}

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

/* Anti-Cheat Status Indicator */
.anticheat-status {
    position: static;
    display: inline-block;
    margin-top: 0.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #10b981; /* green-600 */
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.anticheat-status.warning {
    border-color: #f59e0b; /* yellow-500 */
    color: #f59e0b;
    animation: warningPulse 2s infinite;
}

.anticheat-status.error {
    border-color: #ef4444; /* red-500 */
    color: #ef4444;
    animation: errorPulse 1s infinite;
}

@keyframes warningPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4); }
}

@keyframes errorPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5); }
}

.anticheat-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Challenge Unlock Notification */
.unlock-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--endure-purple) 0%, var(--endure-light-purple) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.3);
    z-index: 1000;
    text-align: center;
    animation: unlockNotificationAnimation 3s ease-in-out forwards;
    pointer-events: none;
}

@keyframes unlockNotificationAnimation {
    0% { 
        transform: translate(-50%, -50%) scale(0.5); 
        opacity: 0; 
    }
    20% { 
        transform: translate(-50%, -50%) scale(1.1); 
        opacity: 1; 
    }
    80% { 
        transform: translate(-50%, -50%) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(0.9); 
        opacity: 0; 
    }
}

/* Rate Limit Warning */
.rate-limit-warning {
    background: rgba(245, 158, 11, 0.9); /* yellow-500 */
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
    border-left: 4px solid #f59e0b;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.rate-limit-warning h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.rate-limit-warning p {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* Enhanced Notification Styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 400px;
    animation: notificationSlideIn 0.4s ease-out;
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.warning {
    background: rgba(245, 158, 11, 0.95);
    color: white;
    border: 1px solid #f59e0b;
}

.notification.success {
    background: rgba(34, 197, 94, 0.95);
    color: white;
    border: 1px solid #10b981;
}

.notification.error {
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: 1px solid #dc2626;
}

/* Suspicious Activity Overlay */
.suspicious-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(239, 68, 68, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    color: white;
    text-align: center;
    animation: suspiciousOverlayFade 0.5s ease-in-out;
}

.suspicious-warning-content {
    background: white;
    color: #1f2937;
    padding: 2rem;
    border-radius: 1rem;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: suspiciousContentPop 0.6s ease-out;
}

@keyframes suspiciousOverlayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes suspiciousContentPop {
    from { 
        transform: scale(0.7);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

.suspicious-warning-content h3 {
    color: #ef4444;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.suspicious-warning-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .timer-indicator {
        font-size: 0.6rem;
        padding: 1px 3px;
    }

    .lock-icon {
        font-size: 1rem;
        top: 6px;
        right: 6px;
    }

    .anticheat-status {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .suspicious-warning-content {
        margin: 1rem;
        padding: 1.5rem;
        max-width: calc(100vw - 2rem);
    }

    .unlock-notification {
        padding: 1rem 1.5rem;
        max-width: calc(100vw - 2rem);
    }

    .notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }

    .rate-limit-warning {
        margin: 0.5rem 0;
        padding: 0.75rem;
    }

    #event-status {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .bingo-tile.locked {
        border-width: 3px !important;
        border-color: #000000 !important;
        background: #cccccc !important;
    }


    .timer-indicator {
        background: #000000 !important;
        color: #ffffff !important;
        border: 2px solid #ffffff !important;
    }

    .lock-icon {
        filter: contrast(2) brightness(0.8);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .bingo-tile.locked {
        background: rgba(75, 85, 99, 0.3) !important;
        border-color: #6b7280 !important;
    }

    .bingo-tile.locked .bingo-tile-text {
        color: #9ca3af !important;
    }

    .anticheat-status {
        background: rgba(31, 41, 55, 0.8);
        color: #d1d5db;
    }

    #event-status {
        background: rgba(31, 41, 55, 0.8) !important;
        border-color: #4b5563 !important;
        color: #d1d5db !important;
    }
}

/* Print Styles - Hide Anti-Cheat Elements */
@media print {
    .timer-indicator,
    .lock-icon,
    .anticheat-status,
    .suspicious-warning,
    .unlock-notification,
    .rate-limit-warning,
    #event-status {
        display: none !important;
    }

    .bingo-tile.locked {
        opacity: 0.3;
        filter: none;
    }
}

/* Accessibility Improvements */
.bingo-tile.locked:focus {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.timer-indicator[aria-label],
.lock-icon[aria-label] {
    cursor: help;
}

/* Smooth Transitions */
.bingo-tile {
    transition: all 0.3s ease;
}

.bingo-tile.locked {
    transition: all 0.3s ease;
}

/* Challenge completion celebration */
.bingo-tile.just-completed {
    animation: completionCelebration 1s ease-out;
}

@keyframes completionCelebration {
    0% { transform: scale(1); }
    25% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.05) rotate(-5deg); }
    75% { transform: scale(1.02) rotate(2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Current user highlighting in leaderboard */
.leaderboard-current-user {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(162, 59, 176, 0.1) 100%) !important;
    border-color: var(--primary-purple) !important;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.leaderboard-current-user:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    transform: translateY(-1px);
}

.user-indicator {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 0.75rem;
}

/* Center the "Start Challenge" button */
#submit-username-btn {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

