/* ========================================================================
 * 网页游戏页：银河飞机大战
 * 沿用 retro.css 的 Win95 桌面风格，只在游戏封面/舞台两处切换到深色。
 * ====================================================================== */

.game-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 88px 20px 56px;
}

/* ---------- 窗口外壳 ---------- */

.game-window {
    border: 2px solid;
    border-color: #ffffff #202020 #202020 #ffffff;
    background: var(--retro-panel, #c0c0c0);
    box-shadow: 3px 3px 0 #202020;
}

.game-window-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 10px;
    background: var(--retro-navy, #000080);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
}

.game-window-badge {
    flex-shrink: 0;
    font-family: var(--retro-mono, "Courier New", monospace);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

/* ---------- 封面 ---------- */

.game-poster {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 440px;
    padding: clamp(20px, 4vw, 40px);
    color: #ffffff;
    background: #06090f url("../../covers/galaxy-raid.jpg") center / cover no-repeat;
}

.game-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 6, 12, 0.95) 0%, rgba(3, 6, 12, 0.86) 52%, rgba(3, 6, 12, 0.55) 100%);
}

.game-poster[hidden],
.game-play[hidden] {
    display: none;
}

.game-poster-copy {
    position: relative;
    max-width: 640px;
}

.game-kicker {
    margin: 0 0 10px;
    color: #8fe3ff;
    font-family: var(--retro-mono, "Courier New", monospace);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
}

.game-poster h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-family: var(--retro-ui, Verdana, sans-serif);
    font-size: clamp(2rem, 4.4vw, 3.1rem);
    line-height: 1.08;
    text-shadow: 2px 2px 0 #000000;
}

.game-lead {
    margin: 0 0 24px;
    max-width: 56ch;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.8;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.game-start {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 11px 28px;
    border-color: #ffffff #000000 #000000 #ffffff;
    background: var(--retro-navy, #000080);
    color: #ffffff;
    font-family: var(--retro-ui, Verdana, sans-serif);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.game-start small {
    color: #c9d7ff;
    font-size: 0.72rem;
    font-weight: 400;
}

.game-start:hover:not(:disabled) {
    background: #00006a;
    color: #ffffff;
}

.game-link {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.game-link:hover {
    color: #8fe3ff;
}

.game-facts {
    display: grid;
    gap: 8px;
    margin: 24px 0 0;
}

.game-facts div {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 10px;
}

.game-facts dt {
    color: #8fe3ff;
    font-size: 0.82rem;
    font-weight: 700;
}

.game-facts dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.88rem;
    line-height: 1.6;
}

.game-mobile-note {
    margin: 0;
    padding: 10px 14px;
    border-top: 2px solid;
    border-color: #ffffff #202020 #202020 #ffffff;
    background: var(--retro-paper-soft, #f4f4f0);
    color: var(--retro-text, #111111);
    font-size: 0.86rem;
}

/* ---------- 说明卡片 ---------- */

.game-notes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.game-note {
    padding: 16px 18px;
    border: 2px solid;
    border-color: #ffffff #202020 #202020 #ffffff;
    background: var(--retro-paper, #ffffff);
}

.game-note h2 {
    margin: 0 0 10px;
    color: var(--retro-navy, #000080);
    font-size: 1rem;
}

.game-note p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.75;
}

.game-note p:last-child {
    margin-bottom: 0;
}

.game-note ul {
    margin: 0;
    padding-left: 1.2em;
    font-size: 0.9rem;
    line-height: 1.9;
}

.game-note kbd {
    display: inline-block;
    min-width: 1.9em;
    padding: 0 5px;
    border: 1px solid #808080;
    border-bottom-width: 2px;
    background: #f4f4f0;
    font-family: var(--retro-mono, "Courier New", monospace);
    font-size: 0.82em;
    text-align: center;
}

/* ---------- 游戏舞台 ---------- */

body.is-playing {
    overflow: hidden;
}

body.is-playing .site-nav,
body.is-playing .site-footer {
    display: none;
}

.game-play {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: #06090f;
}

.game-toolbar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    padding: 7px 12px;
    border-bottom: 2px solid #202020;
    background: var(--retro-panel, #c0c0c0);
    color: var(--retro-text, #111111);
}

.game-toolbar button {
    flex-shrink: 0;
    min-height: 34px;
    padding: 5px 14px;
    font-size: 0.85rem;
}

.game-progress {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--retro-muted, #404040);
    font-family: var(--retro-mono, "Courier New", monospace);
    font-size: 0.82rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.game-frame {
    flex: 1;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #06090f;
    display: block;
}

.game-play:fullscreen {
    background: #06090f;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 760px) {
    .game-page {
        padding: 82px 12px 40px;
    }

    .game-poster {
        min-height: 0;
        padding: 22px 18px;
    }

    .game-poster::before {
        background: rgba(3, 6, 12, 0.82);
    }

    .game-lead {
        font-size: 0.94rem;
        line-height: 1.7;
    }

    .game-facts div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .game-toolbar {
        gap: 8px;
        padding: 6px 8px;
    }

    .game-toolbar button {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .game-progress {
        font-size: 0.72rem;
    }
}
