:root { color-scheme: dark; --bg: #11150f; --panel: #1d2319; --panel-strong: #262d20; --line: #48533b; --line-bright: #879365; --text: #f1f3dc; --muted: #b4ba9b; --olive: #8da04f; --amber: #f0b646; --danger: #d45d45; --shadow: rgba(0, 0, 0, 0.45); --radius: 8px; } * { box-sizing: border-box; } html { min-height: 100%; background: radial-gradient(circle at 20% 10%, rgba(141, 160, 79, 0.18), transparent 28rem), linear-gradient(135deg, #161b13, #0c0f0b 70%); } body { min-height: 100vh; margin: 0; color: var(--text); font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif; letter-spacing: 0; overscroll-behavior: none; } button, canvas, kbd { font: inherit; } button { min-width: 0; min-height: 44px; border: 1px solid #c6d87b; border-radius: 6px; padding: 0.72rem 1rem; background: linear-gradient(180deg, #a0b85a, #617434); color: #10150d; cursor: pointer; font-weight: 900; line-height: 1.1; white-space: nowrap; box-shadow: 0 8px 18px var(--shadow); } .secondary-action { border-color: var(--line-bright); background: #27301f; color: var(--text); } .danger-action { border-color: #f09d7e; background: linear-gradient(180deg, #dc6d50, #883925); color: var(--text); } button:focus-visible { outline: 3px solid rgba(240, 182, 70, 0.65); outline-offset: 2px; } .shell { width: min(980px, calc(100vw - 32px)); min-height: 100vh; margin: 0 auto; padding: 18px 0; display: grid; place-items: center; } .game-panel { width: 100%; display: grid; gap: 14px; } .topbar { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(420px, 620px); gap: 12px; align-items: stretch; } .brand, .hud-item { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--panel); box-shadow: 0 16px 36px var(--shadow); } .brand { min-width: 0; padding: 12px; display: flex; gap: 12px; align-items: center; } .rank-mark { width: 38px; aspect-ratio: 1; flex: 0 0 auto; background: linear-gradient(90deg, transparent 42%, #11150f 42% 58%, transparent 58%), linear-gradient(#a0b85a 0 0) center / 100% 32% no-repeat, #53672f; border: 2px solid #c6d87b; clip-path: polygon(50% 0, 100% 28%, 82% 100%, 18% 100%, 0 28%); } .eyebrow, .status-label { margin: 0; color: var(--amber); font-size: 0.78rem; font-weight: 900; letter-spacing: 0; text-transform: uppercase; } h1, h2, p { margin: 0; } h1 { font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1; } .hud { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .hud-item { min-height: 70px; padding: 10px 12px; border-left: 3px solid var(--olive); display: flex; flex-direction: column; justify-content: center; } .hud-item span { display: block; color: var(--muted); font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; line-height: 1; } .hud-item strong { display: block; margin-top: 6px; color: var(--amber); font-family: Consolas, "Courier New", monospace; font-size: clamp(1.4rem, 2.5vw, 2.1rem); font-weight: 900; line-height: 1; overflow-wrap: anywhere; } .status-chip { min-height: 70px; border: 1px solid #d6c06c; border-radius: var(--radius); padding: 10px 12px; display: grid; place-items: center; background: linear-gradient(180deg, #f0b646, #b9842a); color: #10150d; font-weight: 900; text-align: center; box-shadow: 0 16px 36px var(--shadow); } .stage-wrap { position: relative; width: 100%; aspect-ratio: 4 / 3; margin: 0 auto; min-height: 280px; overflow: hidden; border: 2px solid var(--line-bright); border-radius: var(--radius); background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 28px 28px, #0b0e0a; box-shadow: inset 0 0 0 4px #171d13, 0 18px 42px var(--shadow); } canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; touch-action: none; } .overlay { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 18px; background: rgba(7, 9, 7, 0.72); backdrop-filter: blur(2px); } .overlay.is-hidden { display: none; } .overlay-content { width: min(420px, 100%); border: 1px solid var(--line-bright); border-radius: var(--radius); padding: clamp(18px, 4vw, 30px); text-align: center; background: linear-gradient(180deg, rgba(240, 182, 70, 0.1), transparent 42%), #181e14; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5); } .overlay-content h2 { margin-top: 6px; font-size: clamp(1.75rem, 5vw, 3rem); line-height: 1; } #statusText { margin-top: 12px; color: var(--muted); line-height: 1.55; } .overlay-actions { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; } .overlay-actions button { width: min(180px, 100%); } .controls { display: flex; flex-direction: column; gap: 10px; } .touch-controls { display: grid; grid-template-columns: minmax(150px, 190px) minmax(112px, 1fr); gap: 12px; align-items: center; } .dpad { width: min(190px, 48vw); aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 7px; touch-action: none; user-select: none; } .touch-button, .fire-action { min-height: 54px; padding: 0; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; } .touch-button { font-size: 1.25rem; } .dpad-up { grid-column: 2; grid-row: 1; } .dpad-left { grid-column: 1; grid-row: 2; } .dpad-down { grid-column: 2; grid-row: 3; } .dpad-right { grid-column: 3; grid-row: 2; } .fire-action { min-height: 86px; border-color: #ffd36a; background: linear-gradient(180deg, #f1c55d, #b97127); color: #151007; font-size: 1.1rem; } .key-hints { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent), var(--panel); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 0.82rem; } .key-hint { display: flex; align-items: center; gap: 6px; white-space: nowrap; } .key-hint + .key-hint::before { content: ""; display: block; width: 1px; height: 16px; background: var(--line); margin-right: 8px; flex-shrink: 0; } .controls .action-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .controls .action-group button { width: 100%; padding-inline: 0.6rem; } kbd { min-width: 30px; min-height: 28px; display: inline-grid; place-items: center; border: 1px solid #727b5a; border-bottom-width: 3px; border-radius: 4px; padding: 0 7px; background: #10150d; color: var(--text); font-family: Consolas, "Courier New", monospace; font-size: 0.78rem; font-weight: 900; } @media (max-width: 880px) { .shell { width: min(100vw - 20px, 760px); padding: 10px 0; place-items: start center; } .topbar { grid-template-columns: 1fr; } .stage-wrap { max-height: none; } } @media (max-width: 560px) { .hud { grid-template-columns: repeat(2, minmax(0, 1fr)); } .brand { align-items: flex-start; } .rank-mark { width: 32px; } .hud-item { min-height: 58px; padding: 8px 10px; border-left-width: 2px; } .status-chip { min-height: 52px; } .controls .action-group { grid-template-columns: repeat(3, minmax(0, 1fr)); } .touch-controls { grid-template-columns: minmax(144px, 42vw) minmax(104px, 1fr); gap: 10px; } .dpad { width: min(176px, 44vw); gap: 6px; } .touch-button, .fire-action { min-height: 50px; } .fire-action { min-height: 82px; } .key-hints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 8px 10px; } .key-hint + .key-hint::before { display: none; } button { max-width: 100%; padding-inline: 0.5rem; } }