:root {
    color-scheme: dark;
    --ink: #edf4ff;
    --muted: #a9b9d1;
    --night: #08111f;
    --arena: #101d32;
    --panel: #14253f;
    --button: #171e28;
    --line: #385c7c;
    --mint: #67f0c9;
    --cyan: #63d8ff;
    --mono: "JetBrains Mono", "Cascadia Code", monospace;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
    background: var(--night);
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--night);
    color: var(--ink);
}

* { box-sizing: border-box; }
::selection { color: var(--night); background: var(--mint); }
a { color: inherit; }

a:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 4px;
    border-radius: 2px;
}

h1:focus {
    outline: none;
}

.site-layout,
.site-main,
.game-page {
    min-height: 100vh;
    background: var(--night);
}

.site-main { padding-top: 68px; }

.site-appbar {
    border-bottom: 1px solid var(--line);
    background: var(--night) !important;
}

.appbar-container,
.hero-container { width: 100%; }

.appbar-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
}

.brand-emoji {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--arena);
    font-size: 1.45rem;
}

.brand-link > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-link strong {
    color: var(--mint);
    font-family: var(--mono);
    font-size: .9rem;
    letter-spacing: .08em;
}

.brand-link small {
    margin-top: 4px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: .56rem;
    letter-spacing: .08em;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav > a {
    color: var(--muted);
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav > a:hover { color: var(--mint); }

.site-nav .mud-button-root,
.hero-actions .mud-button-root {
    border-radius: 5px;
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: none;
}

.site-nav .mud-button-root { min-height: 38px; }

.hero-section {
    min-height: calc(100vh - 68px);
    display: grid;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: var(--night);
}

.hero-container {
    padding-top: clamp(52px, 7vw, 92px);
    padding-bottom: clamp(62px, 8vw, 104px);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .55fr);
    align-items: center;
    gap: clamp(52px, 8vw, 112px);
}

.status-line {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
}

.status-line span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .16em;
}

.hero-copy > .eyebrow { margin-top: 48px; }

.hero-copy h1 {
    margin: 0;
    color: var(--mint);
    font-family: var(--mono);
    font-size: clamp(3.8rem, 8vw, 7.5rem);
    font-weight: 700;
    letter-spacing: -.07em;
    line-height: .9;
}

.hero-copy h2 {
    margin: 25px 0 0;
    max-width: 720px;
    font-size: clamp(2.15rem, 4.2vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1.02;
}

.hero-lead {
    max-width: 650px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.72;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 32px;
}

.hero-actions .mud-button-root { min-height: 50px; }

.hero-actions .mud-button-filled-primary {
    border: 1px solid var(--mint);
    background: var(--button) !important;
    color: var(--ink) !important;
}

.hero-actions .mud-button-filled-primary:hover { background: var(--arena) !important; }

.hero-community {
    max-width: 650px;
    margin: 16px 0 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.6;
}

.party-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 42px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.party-line > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--arena);
    font-size: 1.1rem;
}

.party-line small {
    margin-left: 10px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.game-preview {
    width: min(100%, 370px);
    justify-self: end;
    margin: 0;
}

.game-preview figcaption {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .11em;
}

.game-preview figcaption span {
    width: 24px;
    height: 2px;
    background: var(--cyan);
}

.game-frame {
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #030913;
}

.game-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.play-section {
    padding: clamp(76px, 9vw, 118px) 0;
    border-bottom: 1px solid var(--line);
    background: var(--arena);
}

.section-heading {
    max-width: 780px;
    margin-bottom: 42px;
}

.section-heading h2,
.beta-copy h2,
.contact-layout h2 {
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 5rem);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: 1;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.feature-grid article {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
}

.feature-number {
    color: var(--mint);
    font-family: var(--mono);
    font-size: .68rem;
    font-weight: 700;
}

.feature-grid h3 {
    margin: auto 0 12px;
    font-size: 1.45rem;
    letter-spacing: -.025em;
}

.feature-grid p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.beta-section {
    padding: clamp(78px, 9vw, 120px) 0;
    border-bottom: 1px solid var(--line);
    background: var(--night);
}

.beta-layout {
    display: grid;
    grid-template-columns: minmax(300px, .62fr) minmax(480px, 1fr);
    align-items: start;
    gap: clamp(42px, 7vw, 92px);
}

.beta-copy {
    position: sticky;
    top: 106px;
}

.beta-copy h2 {
    margin: 0;
}

.beta-intro {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.72;
}

.beta-points {
    display: grid;
    gap: 14px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.beta-points li {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: start;
    gap: 13px;
    color: var(--muted);
    line-height: 1.55;
}

.beta-points li > span:first-child {
    min-height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--mint);
    font-family: var(--mono);
    font-size: .62rem;
    font-weight: 700;
}

.beta-points a {
    color: var(--mint);
    font-weight: 700;
}

.beta-note {
    margin: 30px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .9rem;
}

.beta-note a {
    color: var(--mint);
    font-weight: 700;
}

.beta-signup-card {
    min-width: 0;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(30px, 5vw, 54px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(103, 240, 201, .1), transparent 46%),
        var(--panel);
}

.beta-signup-mark {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--arena);
    font-size: 2rem;
}

.beta-signup-card > .eyebrow {
    margin-top: 38px;
}

.beta-signup-card h3 {
    max-width: 600px;
    margin: 0;
    font-size: clamp(2.35rem, 4.5vw, 4.6rem);
    letter-spacing: -.055em;
    line-height: 1;
}

.beta-signup-card > p:not(.eyebrow) {
    max-width: 570px;
    margin: 22px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.beta-signup-card .mud-button-root {
    min-height: 52px;
    margin-top: 32px;
    border: 1px solid var(--mint);
    border-radius: 5px;
    background: var(--button) !important;
    color: var(--ink) !important;
    font-family: var(--mono);
    font-weight: 700;
    text-transform: none;
}

.beta-signup-card .mud-button-root:hover {
    background: var(--arena) !important;
}

.beta-signup-card small {
    margin-top: 14px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: .62rem;
    letter-spacing: .02em;
}

.contact-section {
    padding: clamp(78px, 9vw, 120px) 0;
    background: var(--night);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, .72fr) minmax(460px, 1fr);
    align-items: start;
    gap: clamp(54px, 8vw, 100px);
}

.contact-intro {
    max-width: 450px;
    margin: 22px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.contact-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.contact-list a {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 6px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.contact-list a:hover { color: var(--mint); }

.contact-list a > span:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-list small {
    color: var(--cyan);
    font-family: var(--mono);
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .1em;
}

.contact-list strong {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
}

.contact-list a > span:last-child {
    color: var(--mint);
    font-family: var(--mono);
    font-size: 1.2rem;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--arena);
}

.footer-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner > span {
    color: var(--mint);
    font-family: var(--mono);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.footer-inner a {
    color: var(--muted);
    font-family: var(--mono);
    font-size: .68rem;
    text-decoration: none;
}

.footer-inner a:hover { color: var(--mint); }

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.privacy-page {
    min-height: calc(100vh - 156px);
    padding: clamp(58px, 8vw, 96px) 0 clamp(76px, 10vw, 128px);
    background: var(--night);
}

.privacy-container {
    width: 100%;
}

.privacy-header {
    padding-bottom: clamp(38px, 6vw, 64px);
    border-bottom: 1px solid var(--line);
}

.privacy-header h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(3.25rem, 8vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -.06em;
    line-height: .95;
}

.privacy-summary {
    max-width: 760px;
    margin: 28px 0 0;
    color: var(--ink);
    font-size: clamp(1.12rem, 2vw, 1.35rem);
    line-height: 1.65;
}

.privacy-date {
    margin: 24px 0 0;
    color: var(--muted);
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .02em;
}

.privacy-content {
    max-width: 820px;
}

.privacy-content section {
    padding: clamp(34px, 5vw, 52px) 0;
    border-bottom: 1px solid var(--line);
}

.privacy-content h2 {
    margin: 0 0 18px;
    color: var(--ink);
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    letter-spacing: -.035em;
}

.privacy-content p,
.privacy-content li {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.privacy-content p {
    margin: 0;
}

.privacy-content p + p {
    margin-top: 16px;
}

.privacy-content ul {
    display: grid;
    gap: 9px;
    margin: 18px 0 0;
    padding-left: 24px;
}

.privacy-content a {
    color: var(--mint);
    font-weight: 700;
    text-underline-offset: 3px;
}

.privacy-content a:hover {
    color: var(--cyan);
}

.not-found-container {
    min-height: calc(100vh - 156px);
    display: grid;
    place-items: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.not-found-panel {
    width: min(100%, 680px);
    padding: clamp(28px, 6vw, 58px);
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    text-align: center;
}

.not-found-panel .section-kicker {
    margin: 0 0 14px;
    color: var(--cyan);
    font-family: var(--mono);
    font-size: .7rem;
    letter-spacing: .14em;
}

.not-found-panel h1 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5rem);
    letter-spacing: -.055em;
    line-height: 1;
}

.not-found-panel > p:not(.section-kicker) {
    margin: 22px 0 30px;
    color: var(--muted);
}

.not-found-panel .mud-button-root {
    min-height: 48px;
    border: 1px solid var(--mint);
    border-radius: 5px;
    background: var(--button) !important;
    color: var(--ink) !important;
    font-family: var(--mono);
    font-weight: 700;
    text-transform: none;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 1rem;
    width: min(52rem, calc(100vw - 2rem));
    transform: translateX(-50%);
    padding: .9rem 4rem .9rem 1rem;
    border: 1px solid #ff8c82;
    border-radius: 6px;
    background: var(--panel);
    color: var(--ink);
}

#blazor-error-ui .reload { margin-left: .5rem; color: var(--mint); font-weight: 700; }
#blazor-error-ui .dismiss { position: absolute; top: .55rem; right: 1rem; cursor: pointer; }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: var(--line);
    stroke-width: .6rem;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.loading-progress circle:last-child {
    stroke: var(--mint);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
    transition: stroke-dasharray .05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    inset: calc(20vh + 3.25rem) 0 auto .2rem;
    color: var(--muted);
    font-family: var(--mono);
    font-weight: 700;
    text-align: center;
}

.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading"); }

@media (max-width: 900px) {
    .hero-layout,
    .beta-layout,
    .contact-layout { grid-template-columns: 1fr; }

    .game-preview {
        width: min(72vw, 370px);
        justify-self: center;
    }

    .feature-grid { grid-template-columns: 1fr; }
    .feature-grid article { min-height: 210px; }
    .beta-copy { position: static; }
    .beta-signup-card { width: min(100%, 720px); justify-self: center; }
}

@media (max-width: 600px) {
    html { scroll-padding-top: 62px; }
    .site-main { padding-top: 62px; }
    .appbar-inner { min-height: 62px; }
    .brand-link small,
    .site-nav > a { display: none; }
    .site-nav { gap: 0; }
    .hero-container { padding-top: 42px; }
    .hero-copy > .eyebrow { margin-top: 38px; }
    .hero-copy h1 { font-size: clamp(3.5rem, 18vw, 5.2rem); }
    .hero-copy h2 { font-size: clamp(2.2rem, 11vw, 3.3rem); }
    .hero-actions .mud-button-root { width: 100%; }
    .party-line small { width: 100%; margin: 8px 0 0; }
    .game-preview { width: min(88vw, 350px); }
    .section-heading h2,
    .beta-copy h2,
    .contact-layout h2 { font-size: clamp(2.55rem, 12vw, 3.7rem); }
    .feature-grid article { min-height: 230px; padding: 22px; }
    .contact-layout { gap: 38px; }
    .beta-layout { gap: 38px; }
    .beta-signup-card { min-height: 0; padding: 28px; }
    .beta-signup-card h3 { font-size: clamp(2.3rem, 11vw, 3.2rem); }
    .beta-signup-card .mud-button-root { width: 100%; }
    .contact-list a { min-height: 84px; }
    .footer-inner { align-items: flex-start; flex-direction: column; padding: 24px 0; }
    .footer-links { align-items: flex-start; flex-direction: column; gap: 12px; }
    .privacy-page { padding-top: 44px; }
    .privacy-content p,
    .privacy-content li { font-size: .96rem; }
}
