:root {
    color-scheme: dark;
    --primary-color: #FFCD01;
    --error-color: #FF1488;
    --ghost-color: #00F0FF;
    --violet-color: #B06CFF;
    --ok-color: #39FF88;
    --background-color: #0a0814;
    --panel-color: rgba(8, 7, 16, 0.70);
    --text-color: #ffffff;
    --shadow-color: #ff6b81;
    --border-color: #3b3554;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Press Start 2P', cursive;
    color: var(--text-color);
    overflow-x: hidden;
}

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

body {
    position: relative;
    background: transparent;
}

a {
    color: var(--ghost-color);
}

/* ── Semi-transparent RO3 background ── */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(255, 20, 136, 0.22), transparent 38%),
        radial-gradient(circle at 100% 100%, rgba(0, 240, 255, 0.16), transparent 34%),
        radial-gradient(circle at 0% 70%, rgba(176, 108, 255, 0.14), transparent 30%),
        linear-gradient(rgba(6, 5, 14, 0.25), rgba(6, 5, 14, 0.55) 60%, rgba(6, 5, 14, 0.85)),
        url('images/bg.webp');
    background-size: cover;
    background-position: center 30%;
}

/* ── Header ── */
.then-site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(8, 7, 16, 0.82);
    border-bottom: 2px solid rgba(0, 240, 255, 0.28);
    box-shadow:
        0 0 18px rgba(0, 240, 255, 0.18),
        0 18px 40px rgba(0, 0, 0, 0.4);
}

.then-site-header__inner {
    width: min(1240px, calc(100vw - 2rem));
    margin: 0 auto;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.then-site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: inherit;
    text-decoration: none;
    flex-shrink: 0;
}

.then-site-brand img {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 20, 136, 0.35));
}

.then-site-brand__copy {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.then-site-brand__title {
    color: var(--primary-color);
    font-size: 0.95rem;
    text-shadow:
        0 0 10px rgba(255, 205, 1, 0.5),
        2px 2px 0 #000;
}

.then-site-brand__tagline {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.12em;
}

.then-site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

.then-site-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1rem;
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-size: 0.56rem;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: 999px;
    transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.then-site-nav__link:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 240, 255, 0.45);
    background: rgba(0, 240, 255, 0.06);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.3);
    color: #fff;
}

.then-site-nav__link--active {
    color: var(--primary-color);
    border-color: rgba(255, 205, 1, 0.42);
    background: rgba(255, 205, 1, 0.08);
    box-shadow: 0 0 12px rgba(255, 205, 1, 0.2);
}

.then-site-nav__link--cta {
    color: #161616;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 18px rgba(255, 205, 1, 0.55);
}

.then-site-nav__link--cta:hover {
    background: #ffe04a;
    border-color: #ffe04a;
    color: #111;
    box-shadow: 0 0 26px rgba(255, 205, 1, 0.75);
}

.then-site-nav__link--discord {
    color: #8e99ff;
    border-color: rgba(88, 101, 242, 0.45);
    background: rgba(88, 101, 242, 0.12);
    box-shadow: 0 0 12px rgba(88, 101, 242, 0.25);
}

/* ── Language switch ── */
.lang-switch {
    display: inline-flex;
    padding: 3px;
    gap: 3px;
    border: 2px solid rgba(176, 108, 255, 0.4);
    border-radius: 999px;
    background: rgba(176, 108, 255, 0.08);
    box-shadow: 0 0 12px rgba(176, 108, 255, 0.22);
}

.lang-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font: inherit;
    font-size: 0.5rem;
    cursor: pointer;
    transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.lang-switch__btn svg {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.55;
    transition: opacity 0.14s ease;
}

.lang-switch__btn:hover {
    color: #fff;
}

.lang-switch__btn:hover svg {
    opacity: 1;
}

.lang-switch__btn[aria-pressed="true"] {
    color: #fff;
    background: rgba(176, 108, 255, 0.3);
    box-shadow: 0 0 10px rgba(176, 108, 255, 0.55);
}

.lang-switch__btn[aria-pressed="true"] svg {
    opacity: 1;
}

/* ── Hero ── */
.hero-shell {
    min-height: calc(100vh - 92px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem 4rem;
}

.container {
    position: relative;
    padding: 2.8rem 2.4rem 2.4rem;
    border: 3px solid var(--border-color);
    background: var(--panel-color);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow:
        0 0 0 1px rgba(0, 240, 255, 0.12),
        0 0 30px rgba(255, 20, 136, 0.18),
        0 0 60px rgba(0, 240, 255, 0.10),
        0 24px 54px rgba(0, 0, 0, 0.6);
    max-width: 100%;
    width: 940px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border: 2px solid rgba(0, 240, 255, 0.4);
    background: rgba(0, 240, 255, 0.08);
    color: var(--ghost-color);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.7);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.25), inset 0 0 12px rgba(0, 240, 255, 0.12);
}

.eyebrow__dot {
    width: 8px;
    height: 8px;
    background: var(--ok-color);
    box-shadow: 0 0 8px var(--ok-color);
    animation: blink 1.6s steps(2, start) infinite;
}

.brand-logo {
    display: block;
    width: min(340px, 72vw);
    height: auto;
    margin: 0 auto 1.25rem;
    filter:
        drop-shadow(0 0 14px rgba(255, 20, 136, 0.35))
        drop-shadow(0 0 28px rgba(255, 205, 1, 0.2));
    animation: float 6s ease-in-out infinite;
}

h1 {
    font-size: 3rem;
    color: var(--primary-color);
    text-shadow:
        0 0 5px var(--primary-color),
        0 0 15px var(--shadow-color),
        0 0 32px rgba(255, 20, 136, 0.6),
        3px 3px 0 #000;
    margin: 0;
    animation: pulse 2s infinite;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0.9em 0 1em;
    letter-spacing: 2px;
    line-height: 1.5;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
}

.status {
    margin: 0 auto 1.8rem;
    max-width: 640px;
    font-size: 0.56rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.72);
}

/* ── Getting started ── */
.getting-started {
    text-align: left;
    max-width: 740px;
    margin: 0 auto 2rem;
    padding: 1.5rem 1.6rem;
    border: 2px solid rgba(255, 205, 1, 0.3);
    background: rgba(255, 205, 1, 0.04);
    box-shadow: 0 0 18px rgba(255, 205, 1, 0.1), inset 0 0 18px rgba(255, 205, 1, 0.04);
}

.getting-started__title,
.prereg__title {
    font-size: 0.78rem;
    color: var(--primary-color);
    margin: 0 0 1.1rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 205, 1, 0.6);
}

.getting-started ol {
    margin: 0;
    padding: 0 0 0 1.6em;
    list-style: none;
    counter-reset: steps;
}

.getting-started li {
    counter-increment: steps;
    position: relative;
    font-size: 0.62rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 0.6rem;
}

.getting-started li::before {
    content: counter(steps) ".";
    position: absolute;
    left: -1.6em;
    color: var(--ghost-color);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}

.getting-started code {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 0.15em 0.45em;
    color: var(--ghost-color);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.56rem;
}

.getting-started .note {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 2px solid rgba(255, 20, 136, 0.35);
    background: rgba(255, 20, 136, 0.07);
    box-shadow: 0 0 14px rgba(255, 20, 136, 0.15);
    font-size: 0.58rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

.getting-started .note strong {
    color: var(--error-color);
    text-shadow: 0 0 8px rgba(255, 20, 136, 0.6);
}

/* ── Pre-registration ── */
.prereg {
    max-width: 740px;
    margin: 0 auto;
    padding: 1.6rem;
    border: 2px solid rgba(176, 108, 255, 0.45);
    background: rgba(176, 108, 255, 0.06);
    box-shadow: 0 0 22px rgba(176, 108, 255, 0.22), inset 0 0 20px rgba(176, 108, 255, 0.06);
}

.prereg__lead {
    margin: 0 0 1.3rem;
    font-size: 0.58rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
}

.prereg__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: left;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.field__label {
    font-size: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.field input {
    width: 100%;
    padding: 0.9rem 0.8rem;
    border: 2px solid rgba(0, 240, 255, 0.3);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font: inherit;
    font-size: 0.6rem;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.field input::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.field input:focus {
    border-color: var(--ghost-color);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.45);
}

.field input[aria-invalid="true"] {
    border-color: var(--error-color);
    box-shadow: 0 0 14px rgba(255, 20, 136, 0.45);
}

.field--hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.prereg__submit {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 260px;
    padding: 1.05rem 1.6rem;
    border: 3px solid #000;
    background: var(--primary-color);
    color: #111;
    font: inherit;
    font-size: 0.68rem;
    cursor: pointer;
    box-shadow: 6px 6px 0 #000, 0 0 24px rgba(255, 205, 1, 0.55);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.prereg__submit:hover {
    background: #ffe04a;
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #000, 0 0 32px rgba(255, 205, 1, 0.75);
}

.prereg__submit:disabled {
    opacity: 0.6;
    cursor: progress;
}

.prereg__counter {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    margin: 0.6rem 0 0;
    text-align: center;
}

.prereg__counter[hidden] {
    display: none;
}

.prereg__count {
    font-size: 1.6rem;
    color: var(--ghost-color);
    text-shadow:
        0 0 6px var(--ghost-color),
        0 0 18px rgba(0, 240, 255, 0.6),
        2px 2px 0 #000;
    font-variant-numeric: tabular-nums;
}

.prereg__count--bump {
    animation: bump 0.5s ease-out;
}

.prereg__count-label {
    font-size: 0.52rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

.prereg__counter--empty .prereg__count {
    display: none;
}

.prereg__msg {
    grid-column: 1 / -1;
    margin: 0;
    min-height: 1.2em;
    text-align: center;
    font-size: 0.56rem;
    line-height: 1.9;
}

.prereg__msg--ok {
    color: var(--ok-color);
    text-shadow: 0 0 8px rgba(57, 255, 136, 0.6);
}

.prereg__msg--err {
    color: var(--error-color);
    text-shadow: 0 0 8px rgba(255, 20, 136, 0.6);
}

/* ── Floating CTA cards ── */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.2rem;
}

.cta-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1rem;
    border: 3px solid #000;
    text-decoration: none;
    text-align: left;
    min-height: 108px;
    color: var(--text-color);
    animation: float-card 5s ease-in-out infinite;
    transition: box-shadow 0.14s ease, filter 0.14s ease;
}

.cta-card:nth-child(2) { animation-delay: -1.6s; }
.cta-card:nth-child(3) { animation-delay: -3.2s; }

.cta-card:hover {
    filter: brightness(1.15);
}

.cta-card--download {
    background: rgba(255, 205, 1, 0.1);
    box-shadow: 6px 6px 0 #000, 0 0 22px rgba(255, 205, 1, 0.28);
}

.cta-card--download:hover {
    box-shadow: 6px 6px 0 #000, 0 0 34px rgba(255, 205, 1, 0.6);
}

.cta-card--download .cta-card__copy strong {
    color: var(--primary-color);
}

.cta-card--wiki {
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 6px 6px 0 #000, 0 0 22px rgba(0, 240, 255, 0.25);
}

.cta-card--wiki:hover {
    box-shadow: 6px 6px 0 #000, 0 0 34px rgba(0, 240, 255, 0.55);
}

.cta-card--wiki .cta-card__copy strong {
    color: var(--ghost-color);
}

.cta-card--discord {
    background: rgba(88, 101, 242, 0.14);
    box-shadow: 6px 6px 0 #000, 0 0 22px rgba(88, 101, 242, 0.35);
}

.cta-card--discord:hover {
    box-shadow: 6px 6px 0 #000, 0 0 34px rgba(88, 101, 242, 0.7);
}

.cta-card--discord .cta-card__copy strong {
    color: #8e99ff;
}

.cta-card .cta-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.cta-card__copy {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cta-card__copy strong {
    font-size: 0.66rem;
    line-height: 1.5;
}

.cta-card__copy span {
    font-size: 0.5rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
}

footer {
    margin-top: 2.5em;
    font-size: 0.65rem;
    color: var(--ghost-color);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.6);
    line-height: 1.9;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes float-card {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

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

@keyframes bump {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); color: var(--primary-color); }
    100% { transform: scale(1); }
}

@keyframes blink {
    to { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    html {
        scroll-behavior: auto;
    }
}

@media (max-width: 1080px) {
    .then-site-header__inner {
        flex-direction: column;
        padding: 0.85rem 0;
        gap: 0.8rem;
    }
    .then-site-nav {
        justify-content: center;
    }
    html {
        scroll-padding-top: 170px;
    }
    .then-site-header {
        position: relative;
    }
}

@media (max-width: 760px) {
    .cta-grid {
        grid-template-columns: 1fr;
    }
    .prereg__form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .then-site-header__inner {
        width: calc(100vw - 32px);
    }
    .then-site-brand img {
        height: 44px;
    }
    .then-site-brand__tagline {
        display: none;
    }
    .then-site-nav {
        gap: 0.45rem;
    }
    .then-site-nav__link {
        font-size: 0.48rem;
        padding: 0.75rem 0.8rem;
    }
    .hero-shell {
        min-height: auto;
        padding: 1.5rem 16px 3rem;
    }
    .container {
        padding: 1.6rem 1rem;
        width: 100%;
    }
    .brand-logo {
        width: min(240px, 76vw);
        margin-bottom: 1rem;
    }
    h1 { font-size: 1.9rem; }
    .subtitle { font-size: 0.8rem; letter-spacing: 1px; }
    .getting-started,
    .prereg {
        padding: 1rem 0.9rem;
    }
    .getting-started li {
        font-size: 0.54rem;
    }
    .prereg__submit {
        min-width: 0;
        width: 100%;
    }
}
