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

body {
    font-family: system-ui, sans-serif;
    background: #0a0a0f;
    color: #fff;
    overflow: hidden;
    touch-action: none;
}

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

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

/* HUD Styles */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 10;
}

.hud-left, .hud-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-container,
.combo-container,
.wave-container,
.health-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.score-label,
.combo-label,
.wave-label,
.health-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score,
.combo,
.wave {
    font-size: 28px;
    font-weight: bold;
    display: block;
}

.score {
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.combo {
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8);
    transition: transform 0.1s ease-out;
}

.wave {
    color: #ffff00;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
}

.health-bar {
    width: 150px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff3366, #ff00ff);
    width: 100%;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

/* Screen Styles */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(5px);
    z-index: 20;
    transition: opacity 0.3s ease;
}

.screen-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Start Screen */
.game-title {
    text-align: center;
    margin-bottom: 40px;
}

.title-text {
    font-size: 72px;
    font-weight: bold;
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
    letter-spacing: 8px;
    margin-bottom: 10px;
}

.title-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.instructions {
    margin-bottom: 30px;
}

.instruction {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #00ffff;
}

/* Game Over Screen */
.game-over-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-over-title {
    font-size: 48px;
    font-weight: bold;
    color: #ff00ff;
    text-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    margin-bottom: 30px;
    letter-spacing: 6px;
}

.final-score {
    margin-bottom: 30px;
}

.final-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.final-score-value {
    font-size: 64px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    display: block;
    margin-top: 5px;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #ffff00;
    display: block;
    margin-top: 5px;
}

/* Pause Screen */
.pause-content {
    text-align: center;
    padding: 40px;
}

.pause-title {
    font-size: 48px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 30px;
    letter-spacing: 6px;
}

/* Button Styles */
.btn {
    padding: 18px 50px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    color: #000;
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Combo Animation */
@keyframes combo-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.combo.animate {
    animation: combo-pulse 0.15s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title-text {
        font-size: 48px;
        letter-spacing: 4px;
    }

    .title-subtitle {
        font-size: 14px;
        letter-spacing: 2px;
    }

    .instructions {
        width: 90%;
    }

    .instruction {
        font-size: 14px;
        padding: 8px 15px;
    }

    .game-over-content {
        width: 90%;
        padding: 25px;
    }

    .game-over-title {
        font-size: 36px;
        letter-spacing: 4px;
    }

    .final-score-value {
        font-size: 48px;
    }

    .final-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat {
        padding: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .hud {
        padding: 15px;
    }

    .score-container,
    .combo-container,
    .wave-container,
    .health-container {
        padding: 8px 12px;
    }

    .score,
    .combo,
    .wave {
        font-size: 22px;
    }

    .score-label,
    .combo-label,
    .wave-label,
    .health-label {
        font-size: 10px;
    }

    .health-bar {
        width: 120px;
        height: 10px;
    }

    .btn {
        padding: 15px 40px;
        font-size: 16px;
    }
}

/* Cross-platform Controls */
.desktop {
    display: none;
}

.cross-platform {
    display: none;
}

@media (hover: hover) {
    .desktop {
        display: inline;
    }
}

@media (pointer: coarse) {
    .mobile {
        display: inline;
    }
}

.cross-platform {
    display: inline;
}
