:root {
    --bg: #05070d;
    --bg-soft: rgba(14, 18, 31, 0.86);
    --bg-card: rgba(15, 19, 30, 0.72);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f4f7ff;
    --muted: #9ca8bf;
    --primary: #86a7ff;
    --primary-strong: #6c8cff;
    --accent: #7df0d2;
    --danger: #ff90a5;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Inter", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(108, 140, 255, 0.20), transparent 28%),
        radial-gradient(circle at 90% 0%, rgba(125, 240, 210, 0.12), transparent 22%),
        linear-gradient(180deg, #04060c 0%, #070b12 42%, #04060b 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at top, #000 35%, transparent 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.brand-text,
.nav a,
.button,
h1,
h2,
h3,
.badge,
.stat-value,
.btn,
.pill,
code {
    font-family: "Space Grotesk", sans-serif;
}

.shell,
.wrap {
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.backdrop-orb {
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.16;
    pointer-events: none;
    z-index: 0;
}

.backdrop-orb.one {
    top: -10rem;
    right: -8rem;
    background: var(--primary-strong);
}

.backdrop-orb.two {
    bottom: -10rem;
    left: -9rem;
    background: #43c6ae;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: rgba(5, 7, 13, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.scrolled {
    background: rgba(5, 7, 13, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: #041018;
    font-weight: 700;
}

.brand-text {
    font-size: 1.08rem;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.95rem;
    transition: 160ms ease;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.header-actions,
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.btn:hover {
    transform: translateY(-1px);
}

.button.primary,
.btn.primary,
.btn,
.primary {
    color: #061018;
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

.button.ghost,
.btn.ghost,
.ghost {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.menu-toggle {
    display: none;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
}

.hero {
    padding: 48px 0 26px;
}

.hero-panel,
.hero-page,
.card {
    padding: 28px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--bg-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.hero-panel {
    animation: fadeUp 0.8s ease both;
}

.hero-page {
    margin-top: 26px;
    margin-bottom: 18px;
}

.hero-badge,
.badge,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(134, 167, 255, 0.12);
    border: 1px solid rgba(134, 167, 255, 0.18);
    color: #c9d5ff;
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-badge {
    gap: 10px;
}

.loader-note-spaced {
    margin-top: 14px;
}

.section-title-wide {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    max-width: none;
}

.hero-actions-spaced {
    margin-top: 20px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(125, 240, 210, 0.7);
    animation: pulse 1.9s infinite;
}

h1 {
    margin: 22px 0 18px;
    max-width: 10ch;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 0.94;
    letter-spacing: -0.04em;
}

.hero-page h1,
.page-title {
    max-width: none;
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.lead,
.section-copy,
p,
li {
    color: var(--muted);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.stat-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: fadeUp 0.8s ease both;
}

.stat-label {
    color: var(--muted);
    font-size: 0.8rem;
}

.stat-value {
    display: block;
    margin-top: 6px;
    font-size: 1.6rem;
    font-weight: 700;
}

.section {
    padding: 26px 0;
}

.section-head {
    margin-bottom: 18px;
    animation: fadeUp 0.8s ease both;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1.02;
    max-width: 14ch;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.duo,
.grid.page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
    transition: transform 0.2s ease, border-color 0.2s ease;
    animation: fadeUp 0.8s ease both;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(134, 167, 255, 0.28);
}

.icon-chip,
.step-number {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(134, 167, 255, 0.18), rgba(125, 240, 210, 0.16));
}

.icon-chip {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.step-number {
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    color: #d8e0ff;
    font-weight: 800;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.loader-card {
    overflow: hidden;
}

.loader-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff6c85; }
.dot.yellow { background: #ffc969; }
.dot.green { background: #58ddb2; }

.file-name {
    margin-left: 10px;
    color: var(--muted);
}

pre {
    overflow-x: auto;
    padding: 18px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 16px;
}

.games-list {
    display: grid;
    gap: 14px;
}

.game-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: fadeUp 0.8s ease both;
}

.game-left h3 {
    margin-bottom: 6px;
    font-size: 1.04rem;
}

.pill.live {
    color: #081a13;
    background: var(--accent);
}

.pill.testing {
    color: #2c2100;
    background: #ffcf73;
}

.pill.updated {
    color: #0a1524;
    background: var(--primary);
}

.community-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.community-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.simple-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.simple-page .card {
    width: min(100%, 760px);
}

.simple-page ul {
    padding-left: 18px;
    margin-top: 12px;
}

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

.site-footer {
    padding: 26px 0 40px;
}

.footer-inner {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 1080px) {
    .grid.features,
    .grid.steps,
    .grid.duo,
    .grid.page-grid,
    .hero-stats,
    .list-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 780px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav,
    .header-actions {
        display: none;
    }

    .nav.open {
        display: flex;
        position: absolute;
        top: 74px;
        left: 14px;
        right: 14px;
        flex-direction: column;
        padding: 14px;
        border-radius: 18px;
        background: rgba(8, 10, 18, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.07);
    }

    .hero-panel,
    .hero-page,
    .card {
        padding: 22px;
    }

    .grid.features,
    .grid.steps,
    .grid.duo,
    .grid.page-grid,
    .hero-stats,
    .list-grid {
        grid-template-columns: 1fr;
    }

    h1,
    h2 {
        max-width: none;
    }

    .game-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
