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

body {
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

canvas {
    border: 2px solid #444;
    background: #1a1a2e;
    display: block;
}

#startScreen {
    position: absolute;
    text-align: center;
    color: #fff;
    z-index: 10;
}

#startScreen h1 {
    font-size: 72px;
    color: #ff4444;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    margin-bottom: 20px;
    letter-spacing: 8px;
}

#startScreen p {
    font-size: 18px;
    color: #ccc;
    margin-bottom: 10px;
}

#startBtn, #restartBtn {
    margin-top: 20px;
    padding: 15px 50px;
    font-size: 24px;
    font-weight: bold;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.2s;
}

#startBtn:hover, #restartBtn:hover {
    background: #ff6666;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

#hud {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 5;
    display: none;
}

#healthBar {
    width: 200px;
    height: 20px;
    background: #333;
    border: 2px solid #555;
    border-radius: 10px;
    overflow: hidden;
}

#healthFill {
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #ff4444, #ff6666);
    transition: width 0.3s;
}

#healthText, #waveText, #scoreText {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 3px #000;
}

#gameOverScreen {
    position: absolute;
    text-align: center;
    color: #fff;
    z-index: 10;
}

#gameOverScreen h1 {
    font-size: 64px;
    color: #ff4444;
    text-shadow: 0 0 20px #ff0000;
    margin-bottom: 10px;
}

#gameOverScreen p {
    font-size: 24px;
    color: #ccc;
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

#waveBanner {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    text-align: center;
    pointer-events: none;
}

#waveBanner h2 {
    font-size: 56px;
    color: #ffcc00;
    text-shadow: 0 0 20px #ff8800, 0 0 40px #ff4400;
    letter-spacing: 5px;
    animation: bannerPulse 0.5s ease-in-out;
}

@keyframes bannerPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}
