:root {
  --bg:#201810; --panel:#2f261c; --accent:#d1b070; --text:#f2e5cd; --muted:#c7b090; --danger:#c65a4a;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; background: var(--bg); color: var(--text); font-family: "Georgia", "Times New Roman", serif; }
#wrap { position: relative; width: 100%; height: 100%; overflow: hidden; }
canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; background:
  radial-gradient(1200px 800px at 55% 45%, #4b3b2a 0%, #2b2218 60%),
  linear-gradient(0deg, rgba(120,100,70,0.18) 0%, rgba(0,0,0,0) 55%),
  repeating-linear-gradient(35deg, rgba(255,255,255,0.03) 0 6px, rgba(0,0,0,0.03) 6px 12px);
  z-index: 1; pointer-events: none; }
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(12,10,7,0.92); z-index: 3; pointer-events: auto; }
.panel { background:
  linear-gradient(180deg, #3a2f22 0%, #261f17 100%);
  padding: 20px 24px; border: 2px double #6b5134; border-radius: 8px; min-width: 320px; max-width: 520px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), 0 12px 40px rgba(0,0,0,0.4); }
.panel h1 { margin: 0 0 12px; font-size: 22px; }
.panel p { margin: 6px 0; color: var(--muted); }
button { cursor: pointer; background: linear-gradient(180deg, #dfc088 0%, #b98c4e 100%); color: #2b1e12; border: 1px solid #7d5c34; padding: 10px 16px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }
button:hover { filter: brightness(1.08); }
.weapon-row { display: flex; gap: 8px; margin: 10px 0 6px; }
.weapon-btn { background: #3a2f22; color: var(--text); border: 1px solid #5a4530; font-weight: 600; }
.weapon-btn.active { background: linear-gradient(180deg, #dfc088 0%, #b98c4e 100%); color: #2b1e12; border-color: #7a5a33; }
.hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: center; justify-content: space-between; pointer-events: none; z-index: 2; }
.hud .box { background: rgba(34,27,20,0.85); border: 1px solid #5a4530; padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.bar { height: 8px; background: #4a3a28; border-radius: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }
#hpbar > span { background: var(--danger); }
#levelup { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(6,8,12,0.85); z-index: 4; pointer-events: auto; }
#levelup .panel button { width: 100%; margin-top: 8px; text-align: left; }
#end { display: none; }
#start { display: flex; }
.stats { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #313a4a; font-size: 13px; color: var(--muted); }
#upgrades { max-width: 240px; }
#admin { position: absolute; right: 10px; bottom: 10px; background: rgba(34,27,20,0.9); border: 1px solid #5a4530; padding: 10px; border-radius: 10px; font-size: 12px; display: none; z-index: 3; pointer-events: auto; }
#admin input { width: 120px; margin-top: 6px; background: #1f1812; color: var(--text); border: 1px solid #5a4530; border-radius: 6px; padding: 4px 6px; }
.admin-row { display: flex; gap: 6px; margin-top: 6px; }
