body { margin: 0; overflow: hidden; background-color: #0b0f19; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; touch-action: none; color: #fff; }
canvas { display: block; width: 100%; height: 100%; position: absolute; z-index: 0; }

#ui-layer { position: absolute; inset: 0; z-index: 10; pointer-events: none; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.glass-panel { background: rgba(15, 20, 30, 0.75); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }

#main-menu { pointer-events: auto; flex-grow: 1; display: flex; flex-direction: column; }
#tab-content { flex-grow: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 90px; }
.tab-section { width: 100%; max-width: 400px; display: none; flex-direction: column; gap: 15px; animation: fadeIn 0.3s ease; }
.tab-section.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

h1 { font-size: 28px; margin: 0 0 5px 0; letter-spacing: 2px; text-align: center; }
h2 { font-size: 20px; margin: 0 0 15px 0; color: #00ffff; border-bottom: 1px solid rgba(0,255,255,0.2); padding-bottom: 5px; }
p.subtitle { color: #aaa; text-align: center; margin: 0 0 25px 0; }

.primary-btn { background: #1a4696; color: #fff; border: none; padding: 16px; font-size: 18px; font-weight: bold; border-radius: 12px; cursor: pointer; width: 100%; box-shadow: 0 4px 15px rgba(26, 70, 150, 0.4); transition: transform 0.1s, background 0.2s; }
.primary-btn:active { transform: scale(0.95); background: #2866d8; }
.secondary-btn { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 12px; border-radius: 8px; font-size: 16px; }

.item-card { padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.item-card span { font-weight: bold; }
.item-card button { padding: 8px 15px; border-radius: 6px; border: none; font-weight: bold; cursor: pointer; }
.btn-buy { background: #54d66a; color: #000; }
.btn-equip { background: #1a4696; color: #fff; }

#bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 70px; display: flex; justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom); border-top-left-radius: 20px; border-top-right-radius: 20px; border-bottom: none; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #667; font-size: 12px; gap: 4px; padding: 10px 0; transition: color 0.2s; }
.nav-item.active { color: #00ffff; font-weight: bold; }
.nav-icon { font-size: 24px; line-height: 1; }

#hud-container { flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; opacity: 0; transition: opacity 0.3s; }
#hud-container.visible { opacity: 1; pointer-events: auto; }

.top-hud { display: flex; justify-content: space-between; padding: 16px; pointer-events: none; }
.hud-panel { background: rgba(10,14,20,.8); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px; font-size: 14px; width: 130px; backdrop-filter: blur(5px); }
.panel-title { color: #888; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
#score { color: #00ffff; font-size: 20px; font-weight: bold; }
#health-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); margin-top: 8px; border-radius: 3px; overflow: hidden; }
#hp-fill { width: 100%; height: 100%; background: #54d66a; transition: width 0.2s; }

#controls { display: flex; justify-content: space-between; padding: 0 20px 25px 20px; pointer-events: none; }
.btn { pointer-events: auto; width: 70px; height: 70px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); background: rgba(20,25,35,0.6); color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; user-select: none; backdrop-filter: blur(4px); }
.btn:active { background: rgba(255,255,255,0.1); }
#shoot { width: 85px; height: 85px; background: rgba(255, 50, 50, 0.6); border-color: rgba(255, 100, 100, 0.3); }

#game-over-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(11, 15, 25, 0.85); pointer-events: auto; z-index: 30; }
