:root {
    --bg-color: #130F1E;
    --primary: #6C5CE7;
    --accent: #FD79A8;
    --text-main: #FFFFFF;
    --text-dim: #A0A0A0;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }

body, html {
    width: 100%; height: 100%;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
}

#game-canvas {
    width: 100%; height: 100%;
    max-width: 600px;
    box-shadow: 0 0 50px rgba(108, 92, 231, 0.2);
}

.hidden { display: none !important; }

/* HUD */
#hud {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10;
}
.hud-top {
    position: absolute; top: 20px; left: 20px; right: 20px;
    display: flex; justify-content: space-between; align-items: flex-start;
}
.label { font-size: 0.8rem; color: var(--text-dim); display: block; letter-spacing: 2px; }
.value { font-size: 1.2rem; font-weight: bold; }
.accent { color: var(--accent); text-shadow: 0 0 10px var(--accent); }
#score-display { font-size: 2.5rem; font-weight: 900; color: var(--primary); text-shadow: 0 0 15px var(--primary); }
.stats-box { text-align: right; }

/* Overlays */
.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: rgba(19, 15, 30, 0.9);
    backdrop-filter: blur(5px);
    z-index: 100; text-align: center;
}
h1 { font-size: 3rem; color: var(--text-main); text-shadow: 0 0 20px var(--primary); margin-bottom: 10px; }
p { font-size: 1.2rem; color: var(--text-dim); margin-bottom: 30px; letter-spacing: 1px; }

.btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--text-main);
    padding: 15px 40px;
    font-size: 1.5rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 2px;
}
.btn:hover, .btn:active {
    background: var(--primary); box-shadow: 0 0 20px var(--primary); color: #fff;
}
.btn.primary { background: var(--primary); border: none; }
.btn.primary:hover { background: #5a4bcf; }

.stats-summary { margin-bottom: 30px; }
.mt-4 { margin-top: 2rem; }

#leaderboard { width: 300px; text-align: left; }
#leaderboard h3 { color: var(--text-dim); border-bottom: 1px solid var(--primary); padding-bottom: 5px; margin-bottom: 15px; }
#score-list { list-style: none; }
#score-list li { display: flex; justify-content: space-between; padding: 5px 0; font-size: 1.1rem; }

/* Controls */
#mobile-controls {
    position: absolute; bottom: 30px; left: 0; width: 100%; height: 150px;
    display: flex; justify-content: center; z-index: 50; pointer-events: none;
}
#joystick-zone {
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.1);
    position: relative; pointer-events: auto; display: flex; justify-content: center; align-items: center;
}
#joystick-stick {
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(255,255,255,0.3); box-shadow: 0 0 15px rgba(255,255,255,0.2); position: absolute;
}
@media (max-width: 600px) {
    #game-canvas { max-width: 100%; }
    h1 { font-size: 2rem; }
}
