


:root {
    color-scheme: dark;

    
    --accent: #8b5cf6;
    --accent-strong: #7c3aed;
    --accent-light: #a78bfa;
    --accent-soft: #c4b5fd;
    --accent-faint: #ddd6fe;

    
    --accent-bg: rgba(139, 92, 246, 0.1);
    --accent-glow: rgba(139, 92, 246, 0.3);
    --accent-glow-strong: rgba(139, 92, 246, 0.5);

    
    --text: #e2e8f0;
    --text-muted: #9ca3af;
    --text-subtle: #94a3b8;

    
    --bg: #0a0e1a;
    --surface: rgba(20, 25, 45, 0.9);
    --border: rgba(139, 92, 246, 0.2);
    --border-strong: rgba(139, 92, 246, 0.4);

    
    --danger: #ef4444;
    --danger-strong: #e11d48;
    --warning: #fbbf24;
    --success: #22c55e;

    
    --font-display: 'Oswald', 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    
    --focus-ring: #c4b5fd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--bg) 0%, #1a1f35 100%);
    color: #ffffff;
    line-height: 1.5;
    min-height: 100vh;
}


.main-nav {
    background: rgba(20, 25, 45, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-mark {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    flex: 0 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 1px;
    text-shadow: 0 0 20px var(--accent-glow-strong);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.logo .logo-line {
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links .profile-link,
.nav-links .leaderboard-link,
.nav-links .user-dropdown {
    display: none;
}

.logged-in .nav-links .profile-link,
.logged-in .nav-links .leaderboard-link,
.logged-in .user-dropdown {
    display: inline-block;
}

.email-unverified .nav-links .leaderboard-link,
.email-unverified .dropdown-leaderboard {
    display: none !important;
}

.logged-in .auth-btn {
    display: none !important;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #3b82f6);
    border-radius: 2px;
}

.user-dropdown .dropdown-leaderboard {
    display: none !important;
}

@media (max-width: 768px) {
    .user-dropdown .dropdown-leaderboard {
        display: flex !important;
    }
}

.logout-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    
    color: #f87171 !important;
    padding: 8px 20px;
    border-radius: 8px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}


.btn {
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    
    background: linear-gradient(135deg, var(--accent-strong), #2563eb);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow-strong);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.2);
    
    color: #93c5fd;
    border: 2px solid rgba(59, 130, 246, 0.4);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}


.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}








input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(20, 25, 45, 0.6);
    border: 2px solid var(--accent-glow);
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    

    color-scheme: dark;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(20, 25, 45, 0.8);
    box-shadow: 0 0 20px var(--accent-glow);
}







input[type="date"] {
    
    min-height: 51px;
    -webkit-appearance: none;
    appearance: none;
}

input[type="date"]::-webkit-datetime-edit {
    padding: 0;
    line-height: 1.2;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}


input[type="date"]:invalid:not(:focus)::-webkit-datetime-edit {
    color: rgba(255, 255, 255, 0.45);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    


    opacity: 0.55;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 0.95;
}



::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 25, 45, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-glow-strong);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}




.user-dropdown {
    position: relative;
    display: none; 
}

.user-dropdown.active {
    display: inline-block;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-glow);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown-toggle:hover {
    background: var(--border);
    border-color: var(--accent-glow-strong);
}

.user-dropdown-toggle:focus-visible {
    outline: 3px solid rgba(196, 181, 253, 0.95);
    outline-offset: 3px;
}

.user-dropdown-toggle .username {
    color: #fff;
    font-weight: 600;
}

.user-dropdown-toggle .arrow {
    color: var(--accent);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-dropdown.open .arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1f35;
    border: 1px solid var(--accent-glow);
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
    color: var(--danger);
}

.user-dropdown-menu a:hover {
    background: var(--accent-bg);
}

.user-dropdown-menu a:last-child:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-menu .icon {
    font-size: 16px;
}


.hero-buttons.centered {
    justify-content: center;
}


.logo {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.12em;
}

h1, h2, h3,
.modal-title {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.04em;
}


.nav-links > a:not(.auth-btn) {
    padding: 9px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--text);
}

.nav-links > a:not(.auth-btn):hover {
    color: #fff;
    background: rgba(139, 92, 246, 0.14);
    border-color: rgba(139, 92, 246, 0.35);
}

.nav-links > a.active:not(.find-game-link) {
    color: var(--accent-light);
    background: var(--accent-bg);
    border-color: var(--border-strong);
}

.nav-links > a.active::after {
    display: none;
}

.nav-links > a.find-game-link {
    color: #fff;
    
    background: linear-gradient(135deg, var(--accent-strong) 0%, #6d28d9 100%);
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.35);
}

.nav-links > a.find-game-link:hover {
    background: linear-gradient(135deg, var(--accent-strong) 0%, #6d28d9 100%);
    box-shadow: 0 6px 24px var(--accent-glow-strong);
    transform: translateY(-1px);
}


.nav-links .auth-btn {
    padding: 10px 24px;
}



.user-dropdown .dropdown-rules {
    display: none !important;
}






@media (max-width: 768px) {
    .nav-container {
        padding: 10px 12px;
        gap: 8px;
    }

    .logo {
        font-size: 15px;
        letter-spacing: 0.06em;
        gap: 4px;
        flex-shrink: 0;
    }

    .nav-links {
        gap: 6px;
    }

    .nav-links .leaderboard-link {
        display: none !important;
    }

    
    .logged-in .nav-links .rules-link {
        display: none !important;
    }

    .user-dropdown .dropdown-rules {
        display: flex !important;
    }

    .nav-links > a:not(.auth-btn) {
        padding: 8px 10px;
        font-size: 12px;
    }

    .nav-links .auth-btn {
        padding: 9px 14px;
        font-size: 14px;
    }

    .user-dropdown-toggle {
        padding: 6px 8px;
        gap: 6px;
    }

    .user-dropdown-toggle .arrow {
        font-size: 10px;
    }

    
    .nav-links {
        min-width: 0;
    }

    .user-dropdown-toggle .username {
        display: inline-block;
        max-width: clamp(48px, 18vw, 96px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
    }

    .container {
        padding: 24px 16px;
    }
}




















@media (max-width: 480px) {
    
    .nav-links .rules-link {
        display: inline-flex !important;
        align-items: center;
    }

    


    .logo .logo-line-sub {
        display: none;
    }

    .nav-container {
        padding: 8px;
        gap: 4px;
    }

    .logo {
        font-size: 13px;
    }

    




    .nav-links {
        gap: 3px;
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 4px;
    }

    .nav-links > a:not(.auth-btn) {
        padding: 7px;
        font-size: 11px;
    }

    .nav-links .auth-btn {
        padding: 7px 9px;
        font-size: 12px;
    }
}


.auth-logo h1 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.12em;
}


.site-footer {
    



    position: sticky;
    top: 100vh;
    margin-top: 48px;
    padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(10, 14, 26, 0.6);
}

.site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 18px;
}

.site-footer-links a {
    color: var(--text-subtle);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.site-footer-links a:hover {
    color: var(--accent-light);
}

.site-footer-sep {
    color: rgba(148, 163, 184, 0.4);
}

.site-footer-copy {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}





.site-footer-langs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 14px;
    max-width: 720px;
}

.site-footer-lang {
    appearance: none;
    background: none;
    border: 0;
    padding: 2px 0;
    font: inherit;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.site-footer-lang:hover {
    color: var(--accent-light);
}


.site-footer-lang.is-current {
    color: var(--text);
    font-weight: 600;
    cursor: default;
}





@media (pointer: coarse) {
    .site-footer-lang {
        





        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .site-footer-sep { display: none; }
    .site-footer-langs { gap: 0 12px; }
    .site-footer-lang { font-size: 12px; }
}














[hidden] { display: none !important; }


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20000;
    padding: 10px 18px;
    background: var(--accent-strong);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transform: translateY(-160%);
    transition: transform 0.15s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}


[role="main"]:focus,
main:focus,
#main-content:focus {
    outline: none;
}


:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.app-ui-layer {
    position: fixed;
    inset: 0;
    z-index: 12000;
    pointer-events: none;
}

.app-toast-region {
    position: absolute;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    width: min(380px, calc(100vw - 32px));
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-left: 4px solid #60a5fa;
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
    animation: app-toast-enter 0.18s ease-out;
    pointer-events: auto;
}

.app-toast-error { border-left-color: #fb7185; }
.app-toast-success { border-left-color: #34d399; }
.app-toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity 0.16s ease, transform 0.16s ease; }
.app-toast-message { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.4; }

.app-toast-action,
.app-toast-close {
    border: 0;
    color: var(--accent-faint);
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.app-toast-action { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.app-toast-close { width: 28px; min-width: 28px; height: 28px; margin: -3px -3px -3px 0; border-radius: 7px; font-size: 22px; line-height: 1; }
.app-toast-close:hover { background: rgba(255, 255, 255, 0.1); }

.app-confirm-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(6px);
    pointer-events: auto;
}

.app-confirm-dialog {
    width: min(440px, 100%);
    padding: 24px;
    border: 1px solid rgba(167, 139, 250, 0.5);
    border-radius: 18px;
    color: #f8fafc;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.48);
}

.app-confirm-dialog.is-danger { border-color: rgba(251, 113, 133, 0.68); }
.app-confirm-dialog h2 { margin: 0 0 10px; font-size: 24px; }
.app-confirm-dialog p { margin: 0; color: var(--text); line-height: 1.5; }
.app-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.app-confirm-button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.app-confirm-cancel { color: var(--text); border-color: rgba(148, 163, 184, 0.45); background: rgba(51, 65, 85, 0.72); }
.app-confirm-approve { color: #fff; background: linear-gradient(135deg, var(--accent-strong), #2563eb); }
.app-confirm-dialog.is-danger .app-confirm-approve { background: linear-gradient(135deg, var(--danger-strong), #f43f5e); }

@keyframes app-toast-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .app-toast-region {
        right: 12px;
        left: 12px;
        width: auto;
    }

    .app-confirm-dialog { padding: 20px; }
}










.verification-banner {
  display: none;
  margin: 16px auto;
  padding: 16px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #e5e7eb;
}

.verification-banner .title {
  font-weight: 700;
  margin-bottom: 6px;
  color: #c4b5fd;
}

.verification-banner .actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.verification-banner .actions button {
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.verification-banner .actions .primary {
  background: #8b5cf6;
  color: white;
}

.verification-banner .actions .secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
