* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0d1117; }
body { font-family: "Noto Serif SC", "Source Han Serif SC", "STKaiti", "KaiTi", "SimSun", serif; color: #e8e2d0; }
#app { position: fixed; inset: 0; }
#game { display: block; width: 100%; height: 100%; }
.hidden { display: none !important; }

#crosshair { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,0.85); box-shadow: 0 0 4px rgba(0,0,0,0.6); pointer-events: none; z-index: 20; }

/* 覆盖层 */
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(15,18,24,0.72), rgba(10,12,16,0.9)); z-index: 30; }
.panel { text-align: center; padding: 34px 44px; max-width: 640px; }
.panel h1 { font-size: 44px; letter-spacing: 6px; margin-bottom: 8px; font-weight: 700; }
.panel h1.red { color: #d8604e; }
.panel h1.gold { color: #e8c26a; }
.panel p { font-size: 15px; line-height: 1.8; color: #cfc8b4; margin: 6px 0; }

#menu-title { font-size: 64px; color: #f2e7c8; text-shadow: 0 2px 12px rgba(0,0,0,0.6); }
#menu-sub { letter-spacing: 2px; color: #b9b19a; margin-bottom: 22px; }
#menu-credit { font-size: 13px; color: #968e7a; margin-top: 22px; }
.seal { display: inline-block; width: 58px; height: 58px; line-height: 58px; margin-bottom: 10px; background: #b8362e; color: #fff; font-size: 34px; border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,0.4); }
.btns { margin-top: 20px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn { font-family: inherit; font-size: 16px; letter-spacing: 2px; padding: 11px 26px; border: 1px solid #6a6252; background: rgba(30,32,38,0.7); color: #e8e2d0; border-radius: 6px; cursor: pointer; transition: all .15s; }
.btn:hover { background: #3a3d45; border-color: #b9a06a; }
.btn.primary { background: #a3302a; border-color: #c85a4a; }
.btn.primary:hover { background: #c04538; }
#how { margin: 14px auto 0; text-align: left; background: rgba(0,0,0,0.3); border: 1px solid #4a4436; border-radius: 8px; padding: 16px 20px; font-size: 14px; max-width: 520px; }
#how b { color: #f0d88a; }

/* 关卡开场 */
#levelintro { pointer-events: none; }
#levelintro .panel { animation: fadein 0.5s ease; }
.li-name { font-size: 18px; color: #d8a93c; letter-spacing: 4px; }
.li-title { font-size: 56px; color: #f2e7c8; margin: 6px 0 2px; }
.li-sub { color: #c9c1a8; letter-spacing: 2px; }
.li-obj { color: #9fd08a; margin-top: 14px; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud-tl { position: absolute; left: 18px; top: 16px; }
.bar-wrap { width: 220px; height: 18px; background: rgba(0,0,0,0.5); border: 1px solid #4a4436; border-radius: 4px; overflow: hidden; }
#health-bar { position: relative; width: 100%; height: 100%; }
#health-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: #5aa33a; transition: width .2s, background .2s; }
#health-text { position: absolute; left: 0; right: 0; top: 0; text-align: center; font-size: 12px; line-height: 18px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.7); }
#rage-bar { width: 220px; height: 8px; background: rgba(0,0,0,0.5); border: 1px solid #4a4436; border-radius: 4px; overflow: hidden; margin-top: 5px; }
#rage-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #d87a2e, #ffd75a); transition: width .15s; }
#rage-bar.full #rage-fill { animation: rageglow .5s infinite alternate; }
@keyframes rageglow { from { box-shadow: 0 0 4px #ffd75a; } to { box-shadow: 0 0 16px #fff2b0; } }
#streak { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); font-size: 34px; color: #ffd75a; text-shadow: 0 2px 8px rgba(0,0,0,0.7); letter-spacing: 2px; pointer-events: none; }
#embed-badge { position: fixed; right: 12px; bottom: 10px; z-index: 40; }
#embed-badge a { font-family: inherit; font-size: 12px; color: #d8c9a0; text-decoration: none; background: rgba(0,0,0,0.55); border: 1px solid #4a4436; padding: 6px 12px; border-radius: 5px; }
#embed-badge a:hover { background: #3a3d45; border-color: #b9a06a; }
.stat { margin-top: 8px; font-size: 14px; color: #d9d2be; text-shadow: 0 1px 2px rgba(0,0,0,0.7); }
.stat b { color: #f0d88a; }
#hud-tr { position: absolute; right: 18px; top: 16px; text-align: right; text-shadow: 0 1px 2px rgba(0,0,0,0.7); }
#level-name { font-size: 18px; color: #f0d88a; letter-spacing: 2px; }
#objective { font-size: 13px; color: #cfc8b4; margin-top: 4px; }
#kill-count { font-size: 13px; color: #a9c9a0; margin-top: 4px; }

#disarm-warn { position: absolute; top: 26%; left: 50%; transform: translateX(-50%); background: rgba(150,30,24,0.88); border: 1px solid #ff7a5a; color: #fff; padding: 12px 26px; font-size: 20px; border-radius: 8px; letter-spacing: 2px; animation: pulse .5s infinite alternate; }
@keyframes pulse { from { opacity: 1; } to { opacity: 0.6; } }

#banner-wrap { position: absolute; top: 34%; left: 0; right: 0; text-align: center; pointer-events: none; }
#banner-wrap.show { animation: bannerin .4s ease; }
#banner { font-size: 58px; color: #f7ecd0; letter-spacing: 8px; text-shadow: 0 3px 16px rgba(0,0,0,0.7); }
#banner-sub { font-size: 20px; color: #d8c9a0; margin-top: 8px; letter-spacing: 3px; }
@keyframes bannerin { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

#toast { position: absolute; bottom: 18%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.6); border: 1px solid #4a4436; color: #efe8d2; padding: 9px 20px; border-radius: 6px; font-size: 15px; opacity: 0; transition: opacity .3s; pointer-events: none; }
#toast.show { opacity: 1; }

#controls-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #9a927e; text-shadow: 0 1px 2px rgba(0,0,0,0.7); white-space: nowrap; }
