:root {
    color-scheme: dark;
    --bg: #090b1a;
    --surface: rgba(21, 24, 48, 0.78);
    --surface-solid: #151830;
    --surface-soft: #1c2040;
    --border: rgba(255, 255, 255, 0.11);
    --text: #f7f7ff;
    --muted: #aeb3cf;
    --primary: #ff9d45;
    --primary-strong: #ff7a3d;
    --secondary: #8b7cff;
    --green: #61dfa1;
    --danger: #ff7d8f;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
    --radius-lg: 28px;
    --radius-md: 18px;
    --content-width: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% -20%, rgba(102, 78, 255, 0.2), transparent 38rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

button {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid rgba(255, 157, 69, 0.72);
    outline-offset: 3px;
}

.page-glow {
    position: fixed;
    z-index: -1;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.14;
    pointer-events: none;
}

.page-glow-one {
    top: 8rem;
    right: -16rem;
    background: #ff8c42;
}

.page-glow-two {
    bottom: 4rem;
    left: -18rem;
    background: #6857ff;
}

.site-header,
.hero,
.section,
.site-footer {
    width: min(var(--content-width), calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 84px;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 10px;
    width: fit-content;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 157, 69, 0.35);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255, 157, 69, 0.25), rgba(139, 124, 255, 0.18));
    color: var(--primary);
    font-size: 25px;
    line-height: 1;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease;
}

.main-nav a:hover {
    color: var(--text);
}

.account-actions {
    display: flex;
    justify-self: end;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.68;
}

.button-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #271305;
    box-shadow: 0 12px 34px rgba(255, 126, 61, 0.22);
}

.button-primary:hover:not(:disabled) {
    box-shadow: 0 16px 40px rgba(255, 126, 61, 0.3);
}

.button-secondary {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.button-ghost {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.button-ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.button-full {
    width: 100%;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(139, 124, 255, 0.42);
    border-radius: 50%;
    background: rgba(139, 124, 255, 0.18);
    color: #cec8ff;
    font-weight: 800;
}

.user-summary {
    display: flex;
    max-width: 190px;
    flex-direction: column;
    line-height: 1.25;
}

.user-summary strong,
.user-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-summary strong {
    font-size: 13px;
}

.user-summary span {
    color: var(--muted);
    font-size: 11px;
}

.icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.icon-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon-button svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.hero {
    display: grid;
    min-height: 650px;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    align-items: center;
    gap: clamp(36px, 7vw, 90px);
    padding-block: 78px 92px;
}

.hero-copy,
.hero-art,
.game-card,
.game-card-content {
    min-width: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #bcb3ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(97, 223, 161, 0.11);
}

.hero h1 {
    max-width: 760px;
    margin: 20px 0 24px;
    font-size: clamp(48px, 7vw, 84px);
    line-height: 0.96;
    letter-spacing: -0.065em;
}

.hero h1 span {
    background: linear-gradient(115deg, var(--primary) 15%, #ffd071 48%, #a99cff 88%);
    background-clip: text;
    color: transparent;
}

.hero-copy > p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.hero-copy .hero-note {
    margin-top: 18px;
    font-size: 13px;
}

.hero-art {
    position: relative;
    display: grid;
    min-height: 500px;
    place-items: center;
}

.hero-art::before {
    position: absolute;
    width: 84%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(from 180deg, rgba(255, 157, 69, 0.38), rgba(139, 124, 255, 0.2), rgba(97, 223, 161, 0.2), rgba(255, 157, 69, 0.38));
    content: "";
    filter: blur(30px);
    opacity: 0.56;
}

.game-preview {
    position: relative;
    width: min(100%, 390px);
    aspect-ratio: 0.79;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 32px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        #0d1023;
    background-size: 24px 24px;
    box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.08);
    transform: rotate(2deg);
}

.preview-topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 800;
}

.live-pill,
.availability-badge,
.soon-badge {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-pill,
.availability-badge {
    background: rgba(97, 223, 161, 0.12);
    color: var(--green);
}

.bubble-field {
    display: grid;
    grid-template-columns: repeat(4, 58px);
    justify-content: center;
    gap: 8px 3px;
    padding-top: 52px;
}

.bubble {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: inset -7px -9px 16px rgba(0, 0, 0, 0.18), inset 5px 5px 10px rgba(255, 255, 255, 0.25);
}

.bubble:nth-child(5) {
    margin-left: 30px;
}

.bubble-orange { background: #ff784d; }
.bubble-pink { background: #ec58c7; }
.bubble-blue { background: #4d79ff; }
.bubble-green { background: #4ed68c; }
.bubble-yellow { background: #f0d849; }

.preview-cannon {
    position: absolute;
    bottom: 22px;
    left: 50%;
    width: 82px;
    height: 42px;
    border-radius: 42px 42px 10px 10px;
    background: #363c5f;
    transform: translateX(-50%);
}

.preview-cannon span {
    position: absolute;
    top: -43px;
    left: 32px;
    width: 18px;
    height: 60px;
    border-radius: 9px;
    background: #596184;
}

.section {
    padding-block: 84px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(34px, 4vw, 48px);
    letter-spacing: -0.045em;
}

.game-count {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
}

.game-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 20px;
}

.game-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
}

.game-card:first-child {
    display: grid;
    grid-template-columns: minmax(230px, 0.8fr) 1.2fr;
}

.game-card-visual {
    position: relative;
    display: block;
    min-height: 330px;
    overflow: hidden;
    border-right: 1px solid var(--border);
    background: linear-gradient(145deg, #31204f, #172145 48%, #122739);
}

.game-card-visual::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 45%);
    content: "";
}

.game-number {
    position: absolute;
    right: 20px;
    bottom: 12px;
    color: rgba(255, 255, 255, 0.12);
    font-size: 72px;
    font-weight: 900;
    letter-spacing: -0.08em;
}

.mini-bubble {
    position: absolute;
    z-index: 1;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    box-shadow: inset -10px -12px 20px rgba(0, 0, 0, 0.2), 0 18px 30px rgba(0, 0, 0, 0.2);
}

.mini-one { top: 38px; left: 28px; background: #ff784d; }
.mini-two { top: 82px; left: 116px; background: #4d79ff; }
.mini-three { top: 168px; left: 58px; background: #4ed68c; }
.mini-four { top: 192px; left: 152px; background: #ec58c7; }

.race-card-visual {
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at center, #244a43, #172c32 70%);
}

.race-art-road {
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: 22%;
    width: 56%;
    overflow: hidden;
    border-inline: 5px solid rgba(228, 238, 225, 0.22);
    background: linear-gradient(90deg, #27343a, #344047 50%, #27343a);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.3);
}

.race-art-lane {
    position: absolute;
    top: -25%;
    bottom: -25%;
    width: 3px;
    background: repeating-linear-gradient(to bottom, rgba(228, 238, 225, 0.65) 0 20px, transparent 20px 42px);
}

.race-art-lane.lane-one { left: 33%; }
.race-art-lane.lane-two { left: 66%; }

.race-art-player,
.race-art-traffic {
    position: absolute;
    width: 30px;
    height: 51px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-radius: 9px 9px 7px 7px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.32), inset 0 8px rgba(255, 255, 255, 0.14);
}

.race-art-player { bottom: 48px; left: calc(50% - 15px); background: #52d29d; }
.race-art-traffic { background: #ef766c; }
.race-art-traffic.traffic-one { top: 78px; left: calc(17% - 15px); }
.race-art-traffic.traffic-two { top: 174px; left: calc(83% - 15px); background: #e5b85c; }

.game-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px;
}

.game-card-heading {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.game-card h3,
.feature-card h3 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.game-card p,
.feature-card p {
    color: var(--muted);
}

.game-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 24px;
}

.game-card-meta span {
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #c7cae0;
    font-size: 11px;
    font-weight: 700;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.game-card-coming-soon {
    display: flex;
    min-height: 330px;
    flex-direction: column;
}

.coming-soon-visual {
    display: grid;
    min-height: 128px;
    place-items: center;
    border-bottom: 1px solid var(--border);
    background: repeating-linear-gradient(135deg, transparent, transparent 12px, rgba(255, 255, 255, 0.025) 12px, rgba(255, 255, 255, 0.025) 24px);
}

.coming-soon-visual span {
    color: rgba(255, 255, 255, 0.32);
    font-size: 52px;
    font-weight: 200;
}

.soon-badge {
    background: rgba(139, 124, 255, 0.13);
    color: #bdb5ff;
}

.roadmap-section {
    padding-bottom: 110px;
}

.centered-heading {
    max-width: 720px;
    margin-inline: auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.centered-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card {
    display: flex;
    min-height: 250px;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
}

.feature-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 24px;
    place-items: center;
    border: 1px solid rgba(139, 124, 255, 0.28);
    border-radius: 13px;
    background: rgba(139, 124, 255, 0.1);
    color: #bcb4ff;
    font-size: 22px;
}

.feature-status {
    margin-top: auto;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feature-status.muted {
    color: #9499b7;
}

.site-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding-block: 34px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.site-footer p {
    margin: 0;
}

.site-footer > span {
    justify-self: end;
}

.footer-brand {
    color: var(--muted);
}

.auth-dialog {
    width: min(520px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    background: #12152a;
    color: var(--text);
    box-shadow: var(--shadow);
}

.auth-dialog::backdrop {
    background: rgba(3, 4, 14, 0.78);
    backdrop-filter: blur(8px);
}

.dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 26px 18px;
}

.dialog-header h2 {
    margin: 5px 0 0;
    font-size: 30px;
    letter-spacing: -0.04em;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin: 0 26px 20px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.18);
}

.auth-tab {
    min-height: 40px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.auth-tab.active {
    background: var(--surface-soft);
    color: var(--text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.auth-dialog [role="tabpanel"] {
    padding-inline: 26px;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: #daddf0;
    font-size: 13px;
    font-weight: 700;
}

.auth-form small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: 0;
    background: rgba(5, 7, 20, 0.55);
    color: var(--text);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form input::placeholder {
    color: #6f7596;
}

.auth-form input:focus {
    border-color: rgba(139, 124, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-message {
    margin: 0 26px 16px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 125, 143, 0.25);
    border-radius: 10px;
    background: rgba(255, 125, 143, 0.08);
    color: #ffb6c0;
    font-size: 13px;
}

.auth-message.success {
    border-color: rgba(97, 223, 161, 0.24);
    background: rgba(97, 223, 161, 0.08);
    color: #a5f0ca;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 26px 16px;
    color: #7f85a6;
    font-size: 11px;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    flex: 1;
    background: var(--border);
    content: "";
}

.google-signin-button {
    display: flex;
    min-height: 44px;
    justify-content: center;
    padding-inline: 26px;
}

.auth-terms {
    margin: 18px 26px 26px;
    color: #777d9b;
    font-size: 11px;
    text-align: center;
}

.toast-region {
    position: fixed;
    z-index: 80;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    display: grid;
    width: min(360px, calc(100% - 36px));
    gap: 10px;
}

.toast {
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #202441;
    color: var(--text);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    animation: toast-in 200ms ease-out;
}

.toast.error {
    border-color: rgba(255, 125, 143, 0.3);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 900px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .main-nav {
        display: none;
    }

    .hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-block: 64px 50px;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy > p,
    .hero-actions {
        justify-content: center;
        margin-inline: auto;
    }

    .hero-art {
        min-height: 450px;
    }

    .game-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .game-card-coming-soon {
        min-height: auto;
    }

    .feature-card {
        min-height: 220px;
    }

    .site-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .site-footer > span,
    .footer-brand {
        justify-self: center;
    }
}

@media (max-width: 620px) {
    .site-header,
    .hero,
    .section,
    .site-footer {
        width: min(calc(100% - 28px), var(--content-width));
    }

    .site-header {
        min-height: 70px;
    }

    .brand > span:last-child {
        display: none;
    }

    .user-summary {
        display: none;
    }

    .hero {
        padding-top: 48px;
    }

    .hero h1 {
        font-size: clamp(42px, 12.5vw, 58px);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button {
        width: 100%;
    }

    .hero-art {
        min-height: 410px;
    }

    .game-preview {
        width: min(92%, 340px);
    }

    .bubble-field {
        grid-template-columns: repeat(4, 48px);
    }

    .bubble {
        width: 46px;
        height: 46px;
    }

    .game-card:first-child {
        grid-template-columns: 1fr;
    }

    .game-card-visual {
        min-height: 270px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .game-card-content {
        padding: 23px;
    }

    .section {
        padding-block: 64px;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-heading h2 {
        font-size: 36px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dialog-header,
    .auth-dialog [role="tabpanel"] {
        padding-inline: 20px;
    }

    .auth-tabs,
    .auth-message,
    .auth-divider,
    .auth-terms {
        margin-inline: 20px;
    }

    .google-signin-button {
        padding-inline: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
