:root {
    --bg: #07060f;
    --bg-2: #110e1c;
    --panel: #161326;
    --panel-2: #1c1830;
    --ink: #f4f1ff;
    --muted: #a9a3c7;
    --line: #3c3658;
    --gold: #ffd45a;
    --gold-deep: #c47a14;
    --cyan: #6df0ff;
    --cyan-deep: #1a8ea3;
    --magenta: #ff6b9d;
    --violet: #8b73ff;
    --px: 4px;
    --hud: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    line-height: 1.7;
    min-height: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--cyan);
    text-decoration: none;
}

button {
    font-family: inherit;
}

.skip {
    position: absolute;
    left: -999px;
    top: 8px;
    background: var(--gold);
    color: #1a1200;
    padding: 8px 12px;
    z-index: 100;
}

.skip:focus {
    left: 8px;
}

.pixel-grid,
.scanlines,
.vignette {
    pointer-events: none;
    position: fixed;
    inset: 0;
}

.pixel-grid {
    z-index: 1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.45;
}

.scanlines {
    z-index: 8;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.07) 0 1px,
        transparent 1px 4px
    );
}

.vignette {
    z-index: 7;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.42) 100%);
}

#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.site {
    position: relative;
    z-index: 2;
}

.px-label {
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--cyan);
    font-weight: 700;
}

.px-panel {
    background: var(--panel);
    border: 4px solid #f6f3ff;
    outline: 4px solid var(--violet);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
}

.px-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 4px solid #fff;
    background: var(--gold);
    color: #2a1a00;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow: 4px 4px 0 #000;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.px-btn:hover,
.px-btn:focus-visible {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.px-btn.ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--cyan);
    box-shadow: 4px 4px 0 var(--cyan-deep);
}

.hud {
    position: sticky;
    top: 0;
    z-index: 20;
    height: var(--hud);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(7, 6, 15, 0.88);
    border-bottom: 4px solid var(--violet);
    backdrop-filter: blur(8px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: 0.22em;
}

.brand-mark {
    width: 28px;
    height: 28px;
    background:
        linear-gradient(var(--gold), var(--gold)) 8px 4px / 12px 4px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 12px 8px / 4px 12px no-repeat,
        linear-gradient(var(--cyan), var(--cyan)) 4px 12px / 20px 4px no-repeat,
        #1a1628;
    box-shadow: 0 0 0 3px #fff, 3px 3px 0 #000;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 3px solid #fff;
    background: var(--panel);
    color: #fff;
    box-shadow: 3px 3px 0 #000;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 3px;
    margin: 4px auto;
    background: #fff;
}

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

.nav a {
    color: var(--ink);
    padding: 8px 12px;
    border: 3px solid transparent;
    letter-spacing: 0.08em;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255, 212, 90, 0.08);
}

.hero {
    min-height: calc(100vh - var(--hud));
    display: grid;
    place-items: center;
    padding: 48px 20px 80px;
    position: relative;
}

.hero-constellation {
    position: absolute;
    inset: auto 8% 18% auto;
    width: 180px;
    height: 120px;
    opacity: 0.9;
}

.hero-inner {
    width: min(980px, 100%);
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 12px;
    border: 3px solid var(--cyan);
    color: var(--cyan);
    letter-spacing: 0.32em;
    font-size: 12px;
    background: rgba(109, 240, 255, 0.08);
}

.logo-title {
    margin: 0;
    display: flex;
    justify-content: center;
    gap: clamp(8px, 2vw, 18px);
    font-size: clamp(42px, 10vw, 92px);
    line-height: 1;
    font-weight: 900;
}

.logo-title span {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(72px, 16vw, 128px);
    height: clamp(72px, 16vw, 128px);
    border: 4px solid #fff;
    background: var(--panel-2);
    box-shadow: 6px 6px 0 #000;
}

.logo-title span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.18) 0 2px,
        transparent 2px 6px
    );
    pointer-events: none;
}

.logo-title span:nth-child(1),
.logo-title span:nth-child(2) {
    color: var(--gold);
    text-shadow: 4px 4px 0 var(--gold-deep);
}

.logo-title span:nth-child(3),
.logo-title span:nth-child(4) {
    color: var(--cyan);
    text-shadow: 4px 4px 0 var(--cyan-deep);
}

.hero-sub {
    margin: 22px 0 8px;
    font-size: clamp(16px, 2.4vw, 22px);
    letter-spacing: 0.28em;
}

.hero-tag {
    margin: 0 0 32px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.blink {
    animation: blink 1.1s steps(2, start) infinite;
}

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

.pixel-ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: repeating-linear-gradient(90deg, #241b3f 0 16px, #1b1532 16px 32px);
    box-shadow: inset 0 4px 0 #6df0ff;
}

.pixel-hills {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 72px;
    width: 100%;
    height: 56px;
    image-rendering: pixelated;
}

.wanderer {
    position: absolute;
    left: 14%;
    bottom: 78px;
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    animation: wander 6s steps(4, end) infinite;
}

.pixel-moon {
    position: absolute;
    right: 10%;
    top: 18%;
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    opacity: 0.95;
}

@keyframes wander {
    0%,
    20% {
        left: 12%;
    }
    50% {
        left: 22%;
    }
    100% {
        left: 12%;
    }
}

.section {
    padding: 88px 24px;
    scroll-margin-top: 84px;
}

.wrap {
    width: min(1080px, 100%);
    margin: 0 auto;
}

.section-head {
    text-align: center;
    margin-bottom: 36px;
}

.section-head h2,
.download-box h2,
.contact-box h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: 0.18em;
}

.about-box {
    padding: 28px 28px 24px;
    text-align: left;
}

.about-box p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 17px;
}

.about-box p strong {
    color: var(--gold);
    font-weight: 800;
}

.about-box p:last-child {
    margin-bottom: 0;
}

.game-copy {
    max-width: 820px;
    margin: 0 auto;
    text-align: left;
}

.game-copy h3 {
    margin: 8px 0 12px;
    font-size: 32px;
    letter-spacing: 0.16em;
    color: var(--gold);
}

.game-copy p,
.game-copy li {
    color: var(--muted);
}

.game-copy ul {
    margin: 0;
    padding-left: 18px;
}

.game-copy li {
    margin: 8px 0;
}

.download-box,
.contact-box {
    text-align: center;
    padding: 36px 24px;
}

.qr {
    width: 196px;
    margin: 18px auto 22px;
    padding: 10px;
    background: #fff;
    border: 4px solid #111;
    box-shadow: 6px 6px 0 var(--violet);
}

.qr img {
    width: 100%;
    image-rendering: pixelated;
}

.taptap {
    width: min(360px, 100%);
    margin: 0 auto;
    border: 4px solid #fff;
    box-shadow: 6px 6px 0 #000;
}

.contact-mail {
    display: inline-block;
    margin-top: 8px;
    font-size: 22px;
    letter-spacing: 0.08em;
    color: var(--gold);
    border-bottom: 4px solid var(--gold);
}

.site-footer {
    padding: 28px 20px 40px;
    text-align: center;
    border-top: 4px solid var(--violet);
    background: rgba(0, 0, 0, 0.35);
}

.site-footer p {
    margin: 8px 0;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.site-footer a {
    color: var(--cyan);
}

.site-footer a:hover {
    color: var(--gold);
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-block;
    }

    .nav {
        display: none;
        position: absolute;
        top: var(--hud);
        right: 12px;
        flex-direction: column;
        min-width: 180px;
        padding: 8px;
        background: var(--panel);
        border: 4px solid #fff;
        box-shadow: 6px 6px 0 #000;
        z-index: 30;
    }

    .hud.open .nav {
        display: flex;
    }

    .hero-kicker {
        letter-spacing: 0.14em;
        font-size: 10px;
    }

    .logo-title {
        gap: 6px;
    }

    .logo-title span {
        width: clamp(52px, 19vw, 88px);
        height: clamp(52px, 19vw, 88px);
        font-size: 0.86em;
    }

    .hero-constellation {
        display: none;
    }

    .pixel-moon {
        width: 40px;
        height: 40px;
        top: 14%;
        right: 6%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .blink,
    .wanderer {
        animation: none;
    }
}
