* {
    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%);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

#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;
    justify-content: center;
    align-items: center;
    background: rgba(10, 10, 30, 0.95);
    z-index: 10;
    transition: opacity 0.3s ease;
}

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

/* Game Title */
.game-title {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-shadow:
        0 0 10px #00d4ff,
        0 0 20px #00d4ff,
        0 0 40px #00d4ff;
    margin-bottom: 0.5rem;
    animation: title-glow 2s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% {
        text-shadow:
            0 0 10px #00d4ff,
            0 0 20px #00d4ff,
            0 0 40px #00d4ff;
    }
    50% {
        text-shadow:
            0 0 20px #00d4ff,
            0 0 40px #00d4ff,
            0 0 60px #00d4ff;
    }
}

.game-subtitle {
    font-size: 1.5rem;
    color: #00d4ff;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Controls Info */
.controls-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.key {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
    border: 2px solid #00d4ff;
    border-radius: 8px;
    color: #00d4ff;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
}

/* Powerups Info */
.powerups-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: #888;
}

.powerups-info p {
    font-size: 1rem;
}

/* Game Buttons */
.game-btn {
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(145deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    margin-top: 1rem;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.6);
    background: linear-gradient(145deg, #33ddff, #00aadd);
}

.game-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.4);
}

/* HUD */
.hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 5;
}

.hud-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00d4ff;
}

/* Shield Indicator */
#shield-indicator {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.shield-bar-container {
    width: 200px;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #00d4ff;
}

.shield-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00d4ff, #33ddff);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.shield-label {
    margin-top: 5px;
    color: #00d4ff;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Wave Announcement */
.wave-announcement {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
}

#wave-text {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    text-shadow:
        0 0 20px #ff6b6b,
        0 0 40px #ff6b6b;
    animation: wave-pop 1.5s ease-out forwards;
}

@keyframes wave-pop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

/* Final Score Display */
.final-score,
.final-wave,
.high-score {
    font-size: 2rem;
    color: #fff;
    margin: 0.5rem 0;
}

.final-score span,
.final-wave span,
.high-score span {
    color: #00d4ff;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }

    .game-subtitle {
        font-size: 1rem;
    }

    .controls-info {
        font-size: 0.9rem;
    }

    .hud {
        gap: 15px;
    }

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

    #shield-indicator {
        top: 70px;
    }

    .shield-bar-container {
        width: 150px;
    }

    .shield-label {
        font-size: 0.8rem;
    }

    .wave-announcement {
        top: 45%;
    }

    #wave-text {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }

    .game-subtitle {
        font-size: 0.9rem;
    }

    .controls-info {
        font-size: 0.8rem;
    }

    .key {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        min-width: 30px;
    }

    .powerups-info {
        font-size: 0.8rem;
    }

    .game-btn {
        padding: 0.8rem 2rem;
        font-size: 1.2rem;
    }

    .hud {
        gap: 10px;
    }

    .hud-value {
        font-size: 1rem;
    }
}
