/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0f;
    color: #fff;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Game Container */
.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Canvas */
#gameCanvas {
    background: #0d0d14;
    border: 2px solid #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3),
                inset 0 0 50px rgba(0, 255, 255, 0.1);
    display: block;
}

/* 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, 15, 0.95);
    z-index: 10;
    transition: opacity 0.3s ease;
}

.screen.hidden {
    display: none;
}

/* Title */
.title {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff,
                 0 0 20px #00ffff,
                 0 0 40px #00ffff;
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #00ffff,
                     0 0 20px #00ffff,
                     0 0 40px #00ffff;
    }
    to {
        text-shadow: 0 0 20px #ff00ff,
                     0 0 40px #ff00ff,
                     0 0 60px #ff00ff;
    }
}

/* Subtitle */
.subtitle {
    font-size: 1.5rem;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    margin-bottom: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Instructions */
.instructions {
    margin-top: 2rem;
    text-align: center;
    color: #888;
    font-size: 1rem;
    line-height: 1.8;
}

.instructions p {
    margin: 0.5rem 0;
}

/* Final Score */
.final-score,
.wave-reached {
    font-size: 2rem;
    color: #00ffff;
    margin: 1rem 0;
    text-shadow: 0 0 10px #00ffff;
}

.final-score span,
.wave-reached span {
    color: #ff00ff;
    font-weight: bold;
}

/* Neon Button */
.neon-button {
    margin-top: 2rem;
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    color: #00ffff;
    background: transparent;
    border: 2px solid #00ffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.neon-button:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8),
                0 0 40px rgba(0, 255, 255, 0.4);
    transform: scale(1.05);
}

.neon-button:active {
    transform: scale(0.95);
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    padding: 20px;
}

.hud.hidden {
    display: none;
}

.hud-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3rem;
}

.hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3rem;
}

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

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

.hud-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.hud-separator {
    color: #666;
    margin: 0 0.25rem;
}

/* Health Bar */
.health-bar-container {
    min-width: 200px;
}

.health-bar {
    width: 200px;
    height: 20px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0066;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(255, 0, 102, 0.3);
}

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

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

    .subtitle {
        font-size: 1.2rem;
    }

    .instructions {
        font-size: 0.9rem;
    }

    .final-score,
    .wave-reached {
        font-size: 1.5rem;
    }

    .neon-button {
        padding: 0.8rem 2rem;
        font-size: 1.2rem;
    }

    .hud-top,
    .hud-bottom {
        gap: 1.5rem;
    }

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

    .health-bar {
        width: 150px;
        height: 15px;
    }

    .health-bar-container {
        min-width: 150px;
    }
}

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

    .subtitle {
        font-size: 1rem;
    }

    .instructions {
        font-size: 0.8rem;
    }

    .hud-top,
    .hud-bottom {
        gap: 1rem;
    }

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

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

    .health-bar-container {
        min-width: 120px;
    }
}
