* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #12151c; color: #e6e9ef; font-family: system-ui, "Segoe UI", sans-serif; }
#app { max-width: 980px; margin: 0 auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 100%; }

#hud { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.stat { display: flex; flex-direction: column; line-height: 1.1; min-width: 52px; }
.stat span { font-size: 11px; color: #8b93a5; text-transform: uppercase; letter-spacing: .05em; }
.stat b { font-size: 20px; }
.spacer { flex: 1; }

button { background: #252b38; color: inherit; border: 1px solid #39414f; border-radius: 6px; padding: 8px 12px; font: inherit; cursor: pointer; }
button:hover:not(:disabled) { background: #2e3646; }
button:disabled { opacity: .45; cursor: default; }
select { background: #252b38; color: inherit; border: 1px solid #39414f; border-radius: 6px; padding: 8px; font: inherit; }
button.primary { background: #2f6fed; border-color: #2f6fed; }
button.primary:hover:not(:disabled) { background: #4a82f0; }

#stage { position: relative; }
canvas { width: 100%; height: auto; display: block; background: #1d2a1d; border-radius: 8px; touch-action: manipulation; cursor: crosshair; }

#overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(8, 10, 14, .78); border-radius: 8px; text-align: center; }
#overlay[hidden] { display: none; }
#overlay h2 { margin: 0; font-size: 32px; }

#panel { display: flex; flex-wrap: wrap; gap: 10px; }
#shop { display: flex; gap: 6px; flex-wrap: wrap; }
.tower-btn { display: flex; flex-direction: column; align-items: flex-start; min-width: 108px; }
.tower-btn small { color: #8b93a5; }
.tower-btn.active { outline: 2px solid #2f6fed; }
.tower-btn i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
#info { flex: 1; min-width: 220px; background: #1a1f2a; border: 1px solid #2c3342; border-radius: 6px; padding: 8px 12px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
#info .grow { flex: 1; min-width: 160px; }
