* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #eef2f6; font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { display: flex; align-items: center; justify-content: center; }

#stage { position: relative; width: min(96vw, 1280px); aspect-ratio: 16 / 9; background: #cfe4f5; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 40px rgba(20,40,60,.18); }
#game { display: block; width: 100%; height: 100%; }

#hud { position: absolute; inset: 0; pointer-events: none; transition: opacity .2s; }
#hud.hidden { opacity: 0; }
.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 16px; }
/* 品牌压在斜塔上时完全读不出来，给它一个独立浅底胶囊 */
.brand { font-weight: 700; font-size: 14px; color: #1f3346; letter-spacing: .5px; background: rgba(255,255,255,.88); padding: 5px 12px; border-radius: 9px; border: 1px solid rgba(30,60,45,.14); box-shadow: 0 2px 8px rgba(20,40,30,.1); }
.stats { display: flex; gap: 14px; font-size: 13px; color: #3a4b5e; background: rgba(255,255,255,.82); padding: 5px 12px; border-radius: 9px; border: 1px solid rgba(30,60,45,.12); }
.stats b { color: #b8491a; font-weight: 700; }

.skills { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 10px; align-items: center; padding: 0 16px; }
.skill { pointer-events: auto; position: relative; width: 116px; height: 52px; border: 1px solid rgba(30,50,70,.22); border-radius: 10px; background: rgba(255,255,255,.94); color: #1f3346; font: inherit; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 0 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(20,40,30,.1); transition: transform .08s, border-color .15s; }
.skill:hover { transform: translateY(-2px); border-color: #c2571f; }
.skill .key { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 6px; background: #1f3346; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.skill .name { white-space: nowrap; font-weight: 600; }
.skill .cd { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(23,38,52,.78); color: #fff; font-size: 18px; font-weight: 700; }
.skill.cooling .cd { display: flex; }
.skill.aiming { border-color: #d93838; box-shadow: 0 0 0 2px rgba(217,56,56,.35); }
/* 提示文字曾和草地颜色混在一起，改成实底 + 深灰字，并允许在窄屏换行 */
.tips { font-size: 13px; line-height: 1.4; color: #3d4f60; background: rgba(255,255,255,.9); padding: 8px 14px; border-radius: 9px; border: 1px solid rgba(30,60,45,.1); box-shadow: 0 2px 8px rgba(20,40,30,.08); flex: 0 1 auto; min-width: 0; }

#overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(18,32,46,.55); }
#overlay.show { display: flex; }
.card { width: min(90%, 560px); background: #fff; border-radius: 16px; padding: 30px 34px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.card h1 { margin: 0 0 12px; font-size: 26px; color: #1f3346; letter-spacing: .5px; }
.card p { margin: 0 0 20px; font-size: 14.5px; line-height: 1.8; color: #4a5c6e; text-align: center; }
/* 只有主菜单那段长文案左对齐并带小标题胶囊；结算文案保持居中 */
.card p .menu { display: block; text-align: left; }
.card p .tag { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 6px; background: #eef3f8; border: 1px solid rgba(30,60,45,.1); color: #1f3346; font-size: 13px; line-height: 1.6; }
.card p b { color: #1f3346; }
.card button { border: 0; border-radius: 10px; background: #c2571f; color: #fff; font: inherit; font-size: 16px; font-weight: 600; padding: 11px 30px; cursor: pointer; }
.card button:hover { background: #a94716; }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.card button.alt { background: #2f7d5a; }
.card button.alt:hover { background: #256248; }
.card button.ghost { background: rgba(255,255,255,.9); color: #2c3e4f; border: 1px solid rgba(30,50,70,.22); }
.card button.ghost:hover { background: #eef3f8; border-color: #c2571f; color: #23364a; }
.card .hint { margin-top: 14px; font-size: 13px; color: #6b7a86; min-height: 18px; }
/* 围猎的 HUD 全在 canvas 里画（含左上角），DOM 的品牌和顶部统计必须让位，否则叠字 */
#hud.horde .stats,
#hud.horde .brand { display: none; }

#pause { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(18,32,46,.55); backdrop-filter: blur(2px); z-index: 5; }
#pause.show { display: flex; }
#pause .card { width: min(94%, 620px); }
#pause .card p { margin-bottom: 20px; text-align: center; color: #5a6b7a; }
#pause .btns { gap: 9px; }
#pause .card button { padding: 10px 14px; font-size: 15px; }
#pause .card button:disabled { opacity: .55; cursor: not-allowed; }

