:root {
    --bg-main: #000000;
    --text-main: #ffffff;
    --font: 'Outfit', sans-serif;
}

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

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

.game-container {
    position: relative; width: 100%; height: 100%; max-width: 600px; margin: 0 auto;
    background: var(--bg-main);
    overflow: hidden; display: flex; flex-direction: column;
}

#webgl-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }

.ui-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 10; display: flex; flex-direction: column;
}

.header {
    display: flex; justify-content: center; align-items: center;
    padding: 20px; pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.score-container { text-align: center; }

.value { 
    font-size: 3rem; font-weight: 900; color: #fff; 
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    display: inline-block; transition: transform 0.1s; 
}

.combo-badge {
    position: absolute; top: 120px; left: 50%; transform: translateX(-50%);
    font-weight: 900; font-size: 3rem; color: #ffeb3b; 
    text-shadow: 0 0 20px #ff9800, 2px 2px 0 #000;
    pointer-events: none; opacity: 1;
    z-index: 20; white-space: nowrap;
}

.combo-badge.hidden { display: none; }

@keyframes comboAnim { 
    0% { transform: translate(-50%, 20px) scale(0.5); opacity: 0; } 
    20% { transform: translate(-50%, 0) scale(1.2); opacity: 1; }
    80% { transform: translate(-50%, -10px) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -30px) scale(1.5); opacity: 0; }
}

.overlay-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.85); z-index: 30;
    pointer-events: none; transition: opacity 0.3s ease;
}

#startScreen {
    background: linear-gradient(-45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 400%;
    animation: rainbowAnim 8s ease infinite;
}

@keyframes rainbowAnim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.overlay-screen.active { opacity: 1; pointer-events: auto; }
.overlay-screen.hidden { display: none; }

.modal { text-align: center; }

.modal h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 40px; color: #fff; text-shadow: 2px 2px 10px rgba(0,0,0,0.8); }

.btn-primary {
    background: #fff; border: none; color: #000;
    padding: 15px 50px; border-radius: 50px; font-family: var(--font);
    font-size: 1.5rem; font-weight: 900; cursor: pointer; 
    transition: transform 0.1s; width: 100%;
}

.btn-primary:active { transform: scale(0.9); }
