:root { --bg: #020617; --card: #1e293b; --accent: #3b82f6; --danger: #ef4444; --text: #f8fafc; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background-color: var(--bg); color: var(--text); font-family: system-ui, sans-serif; }
#app-shell { display: flex; flex-direction: column; height: 100vh; width: 100vw; padding: 10px 15px; box-sizing: border-box; }
#header-ui { flex-shrink: 0; }
#score-banner { display: flex; justify-content: space-between; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.controls { display: flex; background: var(--card); padding: 3px; border-radius: 10px; }
.speed-tab { flex: 1; background: transparent; border: none; color: #64748b; padding: 8px 0; font-weight: 700; font-size: 0.65rem; text-transform: uppercase; }
.speed-tab.active { background: var(--accent); color: white; border-radius: 6px; }
#game-container { flex-grow: 1; display: flex; align-items: center; justify-content: center; min-height: 0; position: relative; }
canvas { background: #000; border-radius: 10px; max-width: 100%; max-height: 100%; }
#winner-overlay { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.9); display: flex; align-items: center; justify-content: center; text-align: center; border-radius: 10px; z-index: 10; }
.hidden { display: none !important; }
.overlay-content h1 { font-size: 2.5rem; margin: 0; color: var(--accent); }
.overlay-content button { margin-top: 20px; padding: 10px 20px; background: var(--accent); border: none; color: white; border-radius: 5px; font-weight: bold; }
#stats-area { flex-shrink: 0; height: 20vh; margin-top: 10px; }
.table-wrapper { height: 100%; overflow-y: auto; background: rgba(15, 23, 42, 0.5); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.05); }
table { width: 100%; border-collapse: collapse; font-size: 0.7rem; }
th { background: var(--card); padding: 6px; position: sticky; top: 0; }
td { padding: 6px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
#action-bar { flex-shrink: 0; padding: 10px 0; padding-bottom: env(safe-area-inset-bottom); }
#resetBtn { width: 100%; padding: 12px; background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 8px; font-weight: 800; text-transform: uppercase; }