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

body {
    font-family: system-ui, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Canvas */
#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    transition: opacity 0.3s ease;
}

.screen.hidden {
    display: none;
}

/* Start Screen */
#start-screen {
    text-align: center;
    padding: 20px;
}

.logo {
    font-size: 4rem;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow:
        0 0 10px #ff6b6b,
        0 0 20px #ff6b6b,
        0 0 40px #ff6b6b,
        0 0 80px #ff6b6b;
    margin-bottom: 10px;
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.tagline {
    font-size: 1.5rem;
    color: #4ecdc4;
    margin-bottom: 30px;
    text-shadow: 0 0 10px #4ecdc4;
}

.instructions {
    color: #a0a0a0;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 500px;
}

.instructions p {
    margin: 10px 0;
}

#start-btn {
    font-size: 1.8rem;
    padding: 20px 60px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
}

#start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.6);
}

#start-btn:active {
    transform: translateY(-1px);
}

.high-score-display {
    color: #ffd93d;
    font-size: 1.3rem;
    margin-top: 20px;
}

.high-score-display .value {
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.5rem;
}

/* Game Over Screen */
#game-over-screen {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.98) 0%, rgba(25, 35, 55, 0.98) 100%);
}

.game-over-title {
    font-size: 4rem;
    color: #ff6b6b;
    text-shadow:
        0 0 10px #ff6b6b,
        0 0 20px #ff6b6b;
    margin-bottom: 30px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.final-score {
    font-size: 3rem;
    color: white;
    margin-bottom: 20px;
}

.final-score .value {
    color: #4ecdc4;
    font-weight: bold;
}

.new-high-score {
    font-size: 1.5rem;
    color: #ffd93d;
    margin-bottom: 30px;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Buttons */
button {
    font-size: 1.3rem;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

#restart-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #45b7aa 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(78, 205, 196, 0.4);
}

#restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(78, 205, 196, 0.6);
}

#menu-btn {
    background: linear-gradient(135deg, #a8a8a8 0%, #888888 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(136, 136, 136, 0.4);
}

#menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(136, 136, 136, 0.6);
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 5;
}

.score-display,
.lives-display,
.combo-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.label {
    color: #a0a0a0;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
}

.value {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

#score {
    color: #4ecdc4;
    text-shadow: 0 0 10px #4ecdc4;
}

#lives {
    color: #ff6b6b;
    font-size: 1.3rem;
}

.combo-display {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.2), rgba(255, 217, 61, 0.1));
    border: 2px solid #ffd93d;
    animation: pulseCombo 1s ease-in-out infinite;
}

@keyframes pulseCombo {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

#combo {
    color: #ffd93d;
    text-shadow: 0 0 10px #ffd93d;
}

/* Responsive */
@media (max-width: 600px) {
    .logo {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .instructions {
        font-size: 1rem;
        padding: 0 20px;
    }

    .instructions p {
        font-size: 0.95rem;
    }

    #start-btn {
        font-size: 1.4rem;
        padding: 15px 40px;
    }

    .game-over-title {
        font-size: 3rem;
    }

    .final-score {
        font-size: 2.5rem;
    }

    .new-high-score {
        font-size: 1.2rem;
    }

    button {
        font-size: 1.1rem;
        padding: 12px 30px;
        margin: 8px;
    }

    #hud {
        padding: 15px;
    }

    .score-display,
    .lives-display,
    .combo-display {
        padding: 8px 15px;
    }

    .label {
        font-size: 0.85rem;
    }

    .value {
        font-size: 1.2rem;
    }
}

/* Touch Zones Visual Aid (subtle) */
#touch-zones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

#touch-zones::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(78, 205, 196, 0.03), transparent);
}

#touch-zones::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(-90deg, rgba(255, 107, 107, 0.03), transparent);
}
