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

:root {
    --geo-surface: rgba(16, 25, 30, 0.9);
    --geo-surface-strong: rgba(8, 16, 20, 0.72);
    --geo-panel: rgba(19, 25, 30, 0.96);
    --geo-panel-alt: rgba(34, 45, 50, 0.9);
    --geo-border: rgba(150, 255, 220, 0.18);
    --geo-accent: #00e6a0;
    --geo-accent-strong: #00f5b3;
    --geo-accent-dark: #00c78a;
    --geo-teal: #00ffae;
    --geo-teal-dark: #00c78a;
    --geo-text: #f4fff9;
    --geo-muted: rgba(255, 255, 255, 0.72);
    --geo-muted-strong: rgba(255, 255, 255, 0.82);
    --geo-muted-green: #92aaa6;
    --geo-panel-muted: rgba(255, 255, 255, 0.03);
    --geo-control-bg: rgba(5, 14, 18, 0.72);
    --geo-control-bg-focus: rgba(8, 22, 25, 0.92);
    --geo-control-border: rgba(159, 255, 220, 0.28);
    --geo-focus-ring: 0 0 0 3px rgba(0, 255, 174, 0.12);
    --geo-slider-track: rgba(4, 12, 16, 0.86);
    --geo-shadow-panel: 0 0 20px rgba(0, 0, 0, 0.4);
    --geo-line: #346354;
    --geo-radius: 12px;
    --geo-radius-large: 18px;
    --geo-shadow: rgba(0, 0, 0, 0.28);
    --geo-shadow-strong: rgba(0, 0, 0, 0.4);
}

html {
    scrollbar-color: #176c58 #081318;
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 0.7rem;
    height: 0.7rem;
}

::-webkit-scrollbar-track {
    background: #081318;
}

::-webkit-scrollbar-thumb {
    border: 2px solid #081318;
    border-radius: 999px;
    background: #176c58;
}

::-webkit-scrollbar-thumb:hover {
    background: #20a77e;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

.no-select {
    -webkit-user-select: none;
    user-select: none;
}

.selectable {
    -webkit-user-select: text;
    user-select: text;
}

:where(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    input[type="range"],
    select,
    [role="button"],
    [role="tab"],
    [role="switch"],
    .site-header .brand,
    .site-header nav a,
    .footer-column a,
    a[class$="-button"],
    a[class$="-cta"],
    a[class*="button--"],
    .custom-select-trigger,
    .custom-select-options span,
    .dropdown-selected,
    .dropdown-options li,
    .game-type-trigger,
    .icon-option,
    .tag-chip
) {
    -webkit-user-select: none;
    user-select: none;
}

[aria-hidden="true"] {
    -webkit-user-select: none;
    user-select: none;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid rgba(154, 255, 220, 0.95);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.geo-panel-shell,
.mode-card,
.map-background {
    background: linear-gradient(145deg, var(--geo-panel), var(--geo-panel-alt));
    border: 1px solid var(--geo-border);
    border-radius: 18px;
    box-shadow: 0 18px 38px var(--geo-shadow);
}

.geo-card-hover,
.mode-card:hover,
.map-background:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 174, 0.6);
    box-shadow:
        0 18px 40px var(--geo-shadow-strong),
        0 0 28px rgba(0, 255, 174, 0.12);
}

.geo-button-primary,
.mode-action.primary,
.loadMoreBtn,
.play-button {
    background: linear-gradient(135deg, var(--geo-accent-strong), var(--geo-accent-dark));
    color: #031a15;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 255, 174, 0.2);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.geo-button-primary:hover,
.mode-action.primary:hover,
.loadMoreBtn:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 255, 174, 0.25);
}

.geo-button-secondary,
.mode-action.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.geo-page-title,
.title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Shared form fields */
:where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea) {
    border: 1px solid rgba(159, 255, 220, 0.18);
    border-radius: var(--geo-radius);
    background: rgba(5, 14, 18, 0.72);
    color: var(--geo-text);
    font: inherit;
    line-height: 1.4;
    outline: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

:where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea):focus {
    border-color: rgba(0, 255, 174, 0.7);
    background-color: rgba(8, 22, 25, 0.92);
    box-shadow: 0 0 0 3px rgba(0, 255, 174, 0.12);
}

:where(input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea)::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

:where(
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea
):disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background-color: rgba(0, 0, 0, 0.45);
    height: 5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.nav-container {
    flex: 1;
    display: flex;
    justify-content: right;
}

.vertical-separator {
    position: relative;
    width: 3px;
    height: 40px;

    margin: auto 20px;
    margin-right: 30px;

    background-color: #00ffae;
    border-radius: 2px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.logo img {
    width: 40px;
    height: auto;
}

nav a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 1;
    border-radius: 6px;
    white-space: nowrap;

    transition:
        color 0.3s,
        background-color 0.3s;
}

nav a:hover {
    color: #00ffae;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 2px #00ffae55;
}

nav#nav-menu .dropdown {
    position: relative;
}

nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(0, 255, 174, 0.25), rgba(0, 199, 138, 0.25));
    font-weight: bold;
    box-shadow: 0 0 8px rgba(0, 255, 174, 0.4);
}

nav a.active::after {
    content: "";
    position: absolute;
    bottom: 0.1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0px;
    height: 2px;
    background-color: #00df99;
    border-radius: 4px;
    transition: width 0.3s ease;
}

nav a.active:hover::after {
    width: 70%;
}

.dropdown-content a.active::after {
    display: none !important;
    content: none !important;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 230px;
    background: rgba(25, 25, 35, 0.95);
    backdrop-filter: blur(7px);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    box-shadow: none !important;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: #fff;
    padding: 12px 18px;
    text-decoration: none;
    display: block;
    font-size: 15px;
    border-radius: 12px;

    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-content a:nth-child(1) {
    transition-delay: 0.05s;
}

.dropdown:hover .dropdown-content a:nth-child(2) {
    transition-delay: 0.1s;
}

.dropdown:hover .dropdown-content a:nth-child(3) {
    transition-delay: 0.15s;
}

.dropdown-content a:hover {
    background-color: rgba(0, 255, 174, 0.15);
    color: #00ffae;
    border-radius: 12px;
    opacity: 1;
    transform: translateY(0);
}

#modes-separator {
    width: 90%;
    height: 2px;
    margin: 7px auto;
    border-radius: 3px;
    background-color: #00ffae99;
}

.dropdown-content a {
    opacity: 0;
    transform: translateY(5px);
    animation: fadeInUp 0.25s forwards;
}

.dropdown:hover .dropdown-content a {
    animation-delay: 0.05s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#sign-in-button {
    padding: 0.4rem 1rem;
    background-color: #00ffae;
    border-radius: 20px;
    font-weight: bold;
    transition: background-color 0.3s;
    text-decoration: none;
    color: #003827;
}

#sign-in-button:hover {
    background-color: #00c78a;
}

.footer {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(11, 17, 19, 0.97), rgba(9, 13, 14, 0.99));
    border-top: 1px solid rgba(159, 255, 220, 0.18);
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.18);
    color: var(--geo-text, #f4fff9);
    font-size: 0.9rem;
}

.footer-inner {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 0.8rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(159, 255, 220, 0.1);
}

.footer-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(221, 175, 89, 0.5);
    border-radius: 0.8rem;
    background: linear-gradient(145deg, rgba(41, 76, 122, 0.55), rgba(10, 27, 56, 0.82));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 5px 14px rgba(0, 0, 0, 0.2);
}

.footer-brand-mark img {
    width: 2.55rem;
    height: 2.55rem;
    display: block;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.footer-brand-name {
    display: block;
    color: var(--geo-text, #f4fff9);
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.footer-brand-name span:last-child {
    color: #e6c477;
}

.footer-brand-tagline {
    display: block;
    margin-top: 0.1rem;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.footer-column h3 {
    margin: 0 0 0.1rem;
    color: var(--geo-accent, #00e6a0);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.footer-column a {
    position: relative;
    width: fit-content;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.footer-column a:hover,
.footer-column a:focus-visible {
    color: var(--geo-accent, #00e6a0);
    transform: translateX(2px);
}

.footer-column a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 0;
    height: 1px;
    background: rgba(0, 255, 174, 0.8);
    transition: width 0.2s ease;
}

.footer-column a:hover::after,
.footer-column a:focus-visible::after {
    width: 100%;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    padding: 0.7rem 1rem 1rem;
    border-top: 1px solid rgba(159, 255, 220, 0.08);
    background: rgba(255, 255, 255, 0.01);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.75rem;
    text-align: center;
    letter-spacing: 0.02em;
}

.footer-link-separator {
    display: none;
}

@media (max-width: 860px) {
    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .footer-inner {
        width: min(100%, calc(100% - 2rem));
        padding: 1rem 0 0.65rem;
    }

    .footer-brand {
        justify-content: center;
        gap: 0.6rem;
        margin-bottom: 0.65rem;
        padding-bottom: 0.7rem;
        text-align: left;
    }

    .footer-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem 1rem;
    }

    .footer-column {
        min-width: 0;
        gap: 0.15rem;
        padding: 0 0 0.55rem;
        border-bottom: 1px solid rgba(159, 255, 220, 0.1);
    }

    .footer-column h3 {
        margin-bottom: 0.15rem;
        font-size: 0.64rem;
        letter-spacing: 0.08em;
    }

    .footer-column a {
        display: inline-flex;
        align-items: center;
        width: fit-content;
        min-height: 2rem;
        padding: 0.1rem 0;
        font-size: 0.76rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .footer-column a::after {
        bottom: 0.05rem;
    }

    .footer-bottom {
        padding: 0.65rem 1rem max(0.75rem, env(safe-area-inset-bottom));
    }

    .footer-bottom p {
        max-width: 28rem;
        font-size: 0.7rem;
        line-height: 1.5;
    }
}

@media (max-width: 360px) {
    .footer-inner {
        width: calc(100% - 1.25rem);
    }

    .footer-columns {
        gap: 0.4rem 0.7rem;
    }

    .footer-column {
        padding-bottom: 0.45rem;
    }

    .footer-column a {
        font-size: 0.72rem;
    }
}

#profile-wrapper {
    position: static;
    margin-left: auto;
    display: flex;
    align-items: center;
    z-index: 2;
}

#profile-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    vertical-align: middle;
    border: 2px solid #ddd;
    transition: border 0.2s ease;
}

#profile-icon:hover {
    border: 2px solid #408f47;
}

#profile-menu {
    position: absolute;
    top: 70px;
    right: 30px;
    background-color: #2c2c2c;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    min-width: 180px;
    padding: 8px 0;
    z-index: 1000;
    font-family: sans-serif;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

#profile-menu a,
#profile-menu button {
    all: unset;
    padding: 10px 16px;
    color: white;
    text-align: left;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
    font-size: 14px;
}

#profile-menu a:hover,
#profile-menu button:hover {
    color: #00ffae;
    background-color: rgba(255, 255, 255, 0.1);
}

#profile-menu a.active {
    color: #ffffff;
    background-color: #336253;
    font-weight: bold;
    box-shadow: 0 0 8px #336253aa;
}

.hidden {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
}

#profile-menu #logout-btn:hover {
    color: rgb(239, 48, 0);
}

#gray-line {
    width: 100%;
    height: 1px;
    background-color: rgba(128, 128, 128, 0.3);
    margin: 5px 0;
}

/* Update message */
.update-message {
    margin-top: 1rem;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    display: none;
}

.update-message.success {
    background: rgba(0, 255, 174, 0.1);
    color: #00ffae;
    border: 1px solid #00ffae;
}

.update-message.error {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4c4c;
    border: 1px solid #ff4c4c;
}

.basic-form .input-feedback {
    color: #ccc;
}

#hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(159, 255, 220, 0.22);
    border-radius: 0.75rem;
    background: #0c191f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
    color: #eafff7;
    appearance: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

#hamburger:hover,
#hamburger:focus-visible {
    border-color: rgba(159, 255, 220, 0.55);
    background: #12252d;
}

#hamburger:focus-visible {
    outline: 2px solid #00ffae;
    outline-offset: 2px;
}

#hamburger span {
    position: absolute;
    width: 22px;
    height: 2px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

#hamburger span:nth-child(1) {
    transform: translateY(-8px);
}

#hamburger span:nth-child(2) {
    transform: translateY(0);
}

#hamburger span:nth-child(3) {
    transform: translateY(8px);
}

#hamburger.active span {
    background-color: #00ffae;
}

/* Transform into X */
#hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
}

#hamburger.active span:nth-child(2) {
    opacity: 0;
}

#hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Desktop nav */
nav#nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 1060px) {
    .site-header {
        height: 5.25rem;
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .site-header .brand {
        margin-left: 0;
        font-size: 1rem;
        min-width: 0;
    }

    .site-header .brand img {
        width: 2rem;
        height: 2rem;
    }

    .site-header .nav-container {
        position: absolute;
        left: auto;
        right: 1rem;
        top: calc(100% + 0.35rem);
        width: min(22rem, calc(100vw - 2rem));
        display: block;
        pointer-events: none;
        z-index: 1100;
    }

    .site-header .nav-container.is-open {
        pointer-events: auto;
    }

    .site-header nav#nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0.5rem;
        border: 1px solid rgba(159, 255, 220, 0.14);
        border-radius: 1rem;
        background: #0b1a20;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        transform: translate3d(0, -5px, 0);
        pointer-events: none;
        transition:
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease;
    }

    .site-header nav#nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translate3d(0, 0, 0);
        pointer-events: auto;
    }

    .site-header nav a,
    .site-header .dropdown-toggle {
        width: 100%;
        padding: 0.8rem 0.85rem;
        font-size: 0.95rem;
        text-align: left;
        justify-content: space-between;
    }

    .site-header .dropdown {
        width: 100%;
    }

    .site-header .dropdown-content {
        position: static;
        display: none;
        min-width: 0;
        margin: 0.2rem 0 0;
        border-radius: 0.7rem;
        box-shadow: none;
    }

    .site-header .dropdown.is-open .dropdown-content {
        display: block;
    }

    .site-header .vertical-separator {
        display: none;
    }

    #hamburger {
        display: flex;
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        flex-shrink: 0;
        margin-left: auto;
        order: 2;
    }

    .site-header .auth-controls {
        order: 3;
    }

    .site-header #profile-wrapper,
    .site-header #sign-in-button {
        order: 3;
    }

    nav a.active:hover::after {
        width: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.wave-container {
    position: relative;
    width: 100%;
    line-height: 0;
    font-size: 0;
    overflow: visible;
    overflow-x: clip;
    margin-bottom: -2px;
}

/* Waves */
.shadow-wave {
    position: absolute;
    left: 0;
    width: 200%;
    height: 150px;
    z-index: -1;
}

.bottom-waves {
    position: absolute;
    bottom: 100%;
    left: -30px;
    width: 100%;
    transform: translateY(50px);
    z-index: -1;
}

.bottom-waves .shadow-wave:nth-child(1) {
    bottom: -30px;
    height: 220px;
    opacity: 0.8;
}

.bottom-waves .shadow-wave:nth-child(2) {
    bottom: -40px;
    height: 280px;
    opacity: 0.3;
}

.bottom-waves .shadow-wave:nth-child(3) {
    bottom: -20px;
    height: 320px;
    opacity: 0.3;
}

.bottom-waves .shadow-wave:nth-child(4) {
    bottom: 0px;
    height: 350px;
    opacity: 0.9;
}

.bottom-waves.fixed-bottom {
    position: absolute;
    bottom: 0;
}

.top-waves {
    position: absolute;
    top: -150px;
    left: 0;
    width: 100%;
    height: 150px;
    pointer-events: none;
    z-index: -1;
}

.top-waves .shadow-wave {
    position: absolute;
    left: 0;
    width: 200%;
    height: 100%;
    transform: scaleY(-1);
}

.top-waves .shadow-wave:nth-child(1) {
    top: 0px;
    height: 370px;
    opacity: 0.5;
}

.top-waves .shadow-wave:nth-child(2) {
    top: 0px;
    height: 310px;
    opacity: 0.5;
}

/* Inputs & Dropdowns */
.setting-group input[type="number"],
.setting-group input[type="text"] {
    width: 120px;
    padding: 0.35rem 0.6rem;
    right: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.setting-group input:hover,
.setting-group input:focus {
    border-color: #00ffae;
    outline: none;
    box-shadow: 0 0 6px rgba(0, 255, 174, 0.3);
}

/* Slider */
.slider-setting input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background-color: var(--geo-slider-track, rgba(4, 12, 16, 0.86));
    outline: none;
    transition: background-color 0.3s;
}

.slider-setting input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #00ffae;
    cursor: pointer;
    box-shadow: 0 0 5px #00ffae;
    transition:
        background-color 0.3s,
        transform 0.2s;
}

.slider-setting input[type="range"]::-webkit-slider-thumb:hover {
    background-color: #00ff9a;
    transform: scale(1.1);
}

.slider-setting input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #00ffae;
    cursor: pointer;
    box-shadow: 0 0 5px #00ffae;
    transition:
        background-color 0.3s,
        transform 0.2s;
}

.slider-setting input[type="range"]::-moz-range-thumb:hover {
    background-color: #00ff9a;
    transform: scale(1.1);
}

/* Toggle Switch */
.toggle-setting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: -2px;
}

.toggle-setting input[type="checkbox"] {
    appearance: none;
    width: 38px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.25s ease;
}

.toggle-setting input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background-color: #888;
    border-radius: 50%;
    transition: all 0.25s ease;
}

.toggle-setting input[type="checkbox"]:checked {
    background: rgba(0, 255, 174, 0.25);
    border-color: #00ffae;
    box-shadow: 0 0 6px rgba(0, 255, 174, 0.4);
}

.toggle-setting input[type="checkbox"]:checked::before {
    left: 18px;
    background-color: #00ffae;
    box-shadow: 0 0 6px #00ffae;
}

/* Shared site header */
.site-header {
    height: 6rem;
    padding: 0 2.25rem;
    gap: 1.5rem;
    background: linear-gradient(100deg, rgba(8, 23, 29, 0.92), rgba(16, 42, 49, 0.82));
    border-bottom: 1px solid rgba(106, 255, 207, 0.16);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(16px);
    box-sizing: border-box;
    width: 100%;
    overflow: visible;
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: -0.025em;
    text-decoration: none;
    white-space: nowrap;
}

.site-header .brand img {
    width: clamp(12rem, 18vw, 15rem);
    height: auto;
    max-height: 3.5rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
    transition:
        transform 0.2s ease,
        filter 0.2s ease;
}

.site-header .brand:hover img {
    transform: scale(1.025);
    filter: drop-shadow(0 5px 12px rgba(221, 175, 89, 0.22));
}

.site-header .nav-container {
    position: absolute;
    left: 50%;
    display: flex;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 0;
    width: max-content;
    transform: translateX(-50%);
}

.site-header nav#nav-menu {
    gap: 0.25rem;
    padding: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.85rem;
    background: #0b1a20;
}

.site-header nav a,
.site-header .dropdown-toggle {
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    padding: 0.55rem 0.72rem;
}

.site-header .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.site-header .dropdown-chevron,
.site-header .profile-chevron {
    display: inline-block;
    line-height: 1;
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.site-header .dropdown.is-open .dropdown-chevron {
    transform: rotate(180deg);
}

.site-header nav a:hover,
.site-header .dropdown-toggle:hover,
.site-header .dropdown.is-open .dropdown-toggle {
    color: #a8ffdc;
    background: rgba(0, 255, 174, 0.1);
    box-shadow: none;
}

.site-header nav a.active {
    background: linear-gradient(135deg, rgba(0, 255, 174, 0.22), rgba(0, 193, 138, 0.14));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(105, 255, 205, 0.15);
}

.site-header nav a.active::after {
    display: none;
}

.site-header .vertical-separator {
    width: 1px;
    height: 3.2rem;
    margin: 0 0.55rem 0 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(130, 255, 216, 0.9) 20%,
        rgba(130, 255, 216, 0.9) 80%,
        transparent 100%
    );
    box-shadow: 0 0 12px rgba(112, 255, 205, 0.28);
}

.site-header .auth-controls {
    position: relative;
    display: flex;
    flex: 0 0 19rem;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.site-header #sign-in-button,
.site-header #profile-wrapper {
    position: relative;
    margin-left: 0.2rem;
}

.site-header #sign-in-button {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

html:not(.auth-ready) .site-header #sign-in-button,
html:not(.is-authenticated) .site-header #profile-wrapper {
    visibility: hidden;
}

.site-header #profile-wrapper {
    display: flex;
}

html.is-authenticated .site-header #profile-wrapper {
    visibility: visible;
}

html.is-authenticated .site-header #sign-in-button {
    visibility: hidden;
}

.site-header #sign-in-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.6rem 1.15rem;
    border: 1px solid rgba(181, 255, 228, 0.78);
    border-radius: 999px;
    background: linear-gradient(135deg, #a5ffdc, #51e9b1);
    box-shadow:
        0 5px 16px rgba(0, 230, 160, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.52);
    color: #073b2c;
    font-size: 0.87rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.site-header #sign-in-button:hover,
.site-header #sign-in-button:focus-visible {
    background: linear-gradient(135deg, #c0ffe9, #73f3c2);
    border-color: #d0ffed;
    box-shadow:
        0 7px 20px rgba(0, 230, 160, 0.28),
        0 0 0 3px rgba(136, 255, 211, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(calc(-50% - 1px));
}

.site-header #sign-in-button:active {
    transform: translateY(-50%);
    background: linear-gradient(135deg, #8af3cb, #43dba5);
}

.site-header #profile-wrapper {
    margin-left: 0;
    align-items: center;
    gap: 0.55rem;
}

.site-header .wallet-balance-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.38rem;
    min-height: 2.35rem;
    padding: 0.28rem 0.68rem 0.28rem 0.38rem;
    border: 1px solid rgba(255, 224, 142, 0.3);
    border-radius: 999px;
    color: #fff0bd;
    background: rgba(255, 205, 91, 0.08);
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.site-header .wallet-balance-link:hover,
.site-header .wallet-balance-link:focus-visible {
    border-color: rgba(255, 224, 142, 0.65);
    background: rgba(255, 205, 91, 0.15);
}

.site-header .wallet-header-coin {
    display: block;
    width: 1.38rem;
    height: 1.38rem;
    object-fit: contain;
}

.site-header .wallet-header-amount {
    flex: 0 0 auto;
    min-width: 8ch;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.035em;
    text-align: right;
}

.site-header .wallet-balance-link.is-rewarding {
    animation: wallet-reward-pulse 0.85s ease-out;
}

.coin-reward-burst {
    position: fixed;
    inset: 0;
    z-index: 10000;
    overflow: hidden;
    pointer-events: none;
    --parallax-x: 0px;
    --parallax-y: 0px;
}

.coin-reward-burst__coin {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(1rem, 2.5vw, 1.7rem);
    height: clamp(1rem, 2.5vw, 1.7rem);
    filter: drop-shadow(0 0 8px rgba(255, 211, 93, 0.68));
    animation: coin-reward-flight 1.25s cubic-bezier(0.22, 0.7, 0.28, 1) both;
    animation-delay: var(--coin-delay);
}

@keyframes wallet-reward-pulse {
    35% {
        border-color: rgba(255, 232, 161, 0.98);
        background: rgba(255, 205, 91, 0.28);
        box-shadow: 0 0 24px rgba(255, 205, 91, 0.55);
        transform: scale(1.09);
    }
}

@keyframes coin-reward-flight {
    0% {
        opacity: 0;
        transform: translate(calc(-50% + var(--coin-start-x)), calc(-50% + var(--coin-start-y))) scale(0.4)
            rotate(-30deg);
    }
    18% {
        opacity: 1;
    }
    62% {
        opacity: 1;
        transform: translate(
                calc(-50% + var(--coin-mid-x)),
                calc(-50% + var(--coin-mid-y))
            )
            scale(1.15) rotate(260deg);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--coin-x)), calc(-50% + var(--coin-y))) scale(0.32)
            rotate(540deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header .wallet-balance-link.is-rewarding {
        animation: none;
        border-color: rgba(255, 232, 161, 0.98);
    }
}

.site-header #profile-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: auto;
    min-height: 2.75rem;
    padding: 0.28rem 0.62rem 0.28rem 0.32rem;
    border: 1px solid rgba(159, 255, 220, 0.16);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    color: #eafff7;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.site-header #profile-trigger:hover,
.site-header #profile-trigger[aria-expanded="true"] {
    border-color: rgba(115, 255, 209, 0.42);
    background: rgba(0, 255, 174, 0.1);
    transform: translateY(-1px);
}

.site-header #profile-icon {
    display: block;
    flex: 0 0 2.1rem;
    width: 2.1rem;
    height: 2.1rem;
    object-fit: cover;
    border: 1px solid rgba(188, 255, 227, 0.34);
    box-shadow: 0 0 0 2px rgba(0, 255, 174, 0.09);
}

html.is-authenticated:not(.avatar-ready) .site-header #profile-icon {
    visibility: hidden;
}

.site-header .profile-trigger-label {
    flex: 0 1 auto;
    max-width: 7rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.site-header .profile-chevron {
    flex: 0 0 auto;
}

.site-header #profile-trigger[aria-expanded="true"] .profile-chevron {
    transform: rotate(180deg);
}

.site-header #profile-menu {
    top: calc(80% + 0.65rem);
    right: 1.8rem;
    min-width: 14.5rem;
    padding: 0.45rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.9rem;
    background: rgba(12, 25, 31, 0.96);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.site-header #profile-menu a,
.site-header #profile-menu button {
    padding: 0.72rem 0.8rem;
    border-radius: 0.55rem;
    font-size: 0.88rem;
}

.site-header #profile-menu a[hidden] {
    display: none !important;
}

.site-header #profile-menu a:hover,
.site-header #profile-menu button:hover {
    background: rgba(0, 255, 174, 0.11);
}

.site-header #gray-line {
    margin: 0.4rem 0;
    background: rgba(159, 255, 220, 0.14);
}

.site-header .dropdown-content {
    display: block;
    top: 100%;
    padding: 0.4rem;
    border: 1px solid rgba(159, 255, 220, 0.12);
    background: rgba(13, 32, 38, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0);
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        visibility 180ms ease;
}

.site-header .dropdown-content a {
    opacity: 1;
    transform: none;
    animation: none;
    transition:
        color 160ms ease,
        background-color 160ms ease;
}

.site-header .dropdown:hover:not(.is-dismissed) .dropdown-content,
.site-header .dropdown:focus-within:not(.is-dismissed) .dropdown-content,
.site-header .dropdown.is-open .dropdown-content {
    display: block;
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.site-header .dropdown-content a {
    border-radius: 0.5rem;
}

.site-header .nav-coming-soon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.88rem;
    cursor: default;
}

.site-header .nav-coming-soon small {
    padding: 0.18rem 0.4rem;
    border: 1px solid rgba(255, 204, 102, 0.24);
    border-radius: 999px;
    background: rgba(255, 188, 72, 0.1);
    color: #ffd37e;
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

@media (max-width: 1060px) {
    .site-header {
        padding: 0 1.5rem;
    }

    .site-header .brand {
        font-size: 1.1rem;
        margin-left: 0;
    }

    .site-header #profile-wrapper,
    .site-header #sign-in-button {
        position: relative;
        inset: auto;
        transform: none;
        order: 3;
    }

    .site-header #sign-in-button {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }

    .site-header .auth-controls {
        flex-basis: 19rem;
    }

    .site-header .nav-container {
        left: auto;
        right: 1.5rem;
        top: calc(100% + 0.35rem);
        width: min(22rem, calc(100vw - 2rem));
        transform: none;
    }

    .site-header .dropdown-content {
        max-height: 0;
        overflow: hidden;
        transform: translateY(-0.25rem);
        transition:
            opacity 180ms ease,
            transform 180ms ease,
            max-height 220ms ease,
            visibility 180ms ease;
    }

    .site-header .dropdown:hover:not(.is-dismissed) .dropdown-content,
    .site-header .dropdown:focus-within:not(.is-dismissed) .dropdown-content,
    .site-header .dropdown.is-open .dropdown-content {
        max-height: 30rem;
    }

    .site-header #profile-menu {
        right: 1.5rem;
    }
}

@media (max-width: 520px) {
    .site-header {
        height: 5.25rem;
        padding: 0 0.8rem;
        gap: 0.5rem;
    }

    .site-header .brand {
        flex: 0 0 auto;
        width: 10.75rem;
        max-width: none;
    }

    .site-header .brand img {
        width: 100%;
        max-height: 2.8rem;
    }

    .site-header .profile-trigger-label,
    .site-header .profile-chevron {
        display: none;
    }

    .site-header .auth-controls {
        flex-basis: 6rem;
    }

    .site-header .wallet-balance-link {
        width: 2.35rem;
        min-height: 2.35rem;
        justify-content: center;
        padding: 0.28rem;
    }

    .site-header .wallet-header-amount {
        display: none;
    }

    .site-header #profile-trigger {
        width: auto;
        padding: 0.24rem;
        border-radius: 50%;
    }

    .site-header .nav-container {
        left: auto;
        right: 0.8rem;
        width: min(22rem, calc(100vw - 1.6rem));
        transform: none;
    }
}

@media (max-width: 370px) {
    .site-header .wallet-header-amount {
        display: none;
    }

    .site-header .wallet-balance-link {
        width: 2.35rem;
        justify-content: center;
        padding: 0.28rem;
    }
}

/* Loading Shimmer */
/* Reusable Shimmer */
.shimmer {
    position: relative;
    overflow: hidden;
    background: rgba(123, 255, 200, 0.09);
}

.shimmer::after {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(90deg, transparent 0%, rgba(153, 255, 218, 0.18) 50%, transparent 100%);

    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-line {
    display: block;
    height: 0.75rem;
    border-radius: 999px;
}

.skeleton-circle {
    display: block;
    border-radius: 50%;
}

.party-code-skeleton {
    display: inline-block;
    width: 5.5rem;
    height: 0.9rem;
    border-radius: 999px;
    vertical-align: middle;
}

.player-skeleton {
    display: block;
    width: 100%;
    height: 3.2rem;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Lock background scrolling while any modal is open */
html:has(dialog[open]),
body:has(dialog[open]),
html:has(.app-modal-overlay.show),
body:has(.app-modal-overlay.show) {
    overflow: hidden;
}

/* Admin shortcut in the header (admins only) */
.site-header .admin-header-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.35rem;
    padding: 0.28rem 0.85rem;
    border: 1px solid rgba(255, 138, 138, 0.4);
    border-radius: 999px;
    color: #ffd0d0;
    background: rgba(255, 107, 107, 0.1);
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-decoration: none;
    white-space: nowrap;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.site-header .admin-header-link[hidden] {
    display: none;
}

.site-header .admin-header-link:hover,
.site-header .admin-header-link:focus-visible {
    border-color: rgba(255, 138, 138, 0.75);
    background: rgba(255, 107, 107, 0.2);
}

.site-header .admin-header-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #ff6b6b;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
}

html.is-admin .site-header .auth-controls {
    flex-basis: 25rem;
}

@media (max-width: 520px) {
    html.is-admin .site-header .auth-controls {
        flex-basis: 6rem;
    }

    .site-header .admin-header-link {
        display: none;
    }
}
