* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #000;
    color: #fff;
}

#menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.menu-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 60px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

#menu h1 {
    font-size: 5em;
    margin-bottom: 40px;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    font-weight: bold;
    letter-spacing: 3px;
}

#instructions {
    margin-bottom: 20px;
}

#instructions h2 {
    margin-bottom: 25px;
    font-size: 1.8em;
    color: #00ff88;
}

#instructions ul {
    list-style: none;
    margin-bottom: 30px;
    font-size: 1.1em;
    text-align: left;
    display: inline-block;
}

#instructions li {
    margin: 10px 0;
    padding: 5px 0;
    color: #ccc;
}

#instructions strong {
    color: #00ff88;
}

#startButton, #restartButton {
    padding: 15px 50px;
    font-size: 1.4em;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    letter-spacing: 2px;
    margin-top: 10px;
}

#startButton:hover, #restartButton:hover {
    background: linear-gradient(135deg, #00ff88 0%, #00ff88 100%);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.8);
    transform: scale(1.05);
}

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
}

.cross-h, .cross-v {
    position: absolute;
    background: rgba(0, 255, 136, 0.8);
}

.cross-h {
    width: 20px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
}

.cross-v {
    width: 2px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translateY(-50%);
}

#stats {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.3em;
    font-family: 'Courier New', monospace;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 25px;
    border-radius: 10px;
    border: 2px solid rgba(0, 255, 136, 0.3);
}

#topStats {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

#bottomStats {
    display: flex;
    gap: 30px;
    font-size: 0.9em;
}

#health, #score, #ammo, #waveInfo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.damage-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 0%, rgba(255, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.damage-indicator.active {
    opacity: 1;
}

#gameOver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.gameover-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 60px;
    border-radius: 20px;
    border: 3px solid #ff4444;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.5);
}

#gameOver h1 {
    font-size: 4em;
    color: #ff4444;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

#gameOver p {
    font-size: 1.5em;
    margin: 15px 0;
    color: #ccc;
}

canvas {
    display: block;
}

#instructions li {
    margin: 10px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    padding: 20px 60px;
    font-size: 1.5em;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 25px rgba(0,0,0,0.4);
}

button:active {
    transform: translateY(0);
}

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

#crosshair::before {
    width: 2px;
    height: 20px;
    left: 50%;
    transform: translateX(-50%);
}

#crosshair::after {
    width: 20px;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

#stats {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    pointer-events: auto;
}

#stats > div {
    margin: 10px 0;
}

#health span {
    color: #ff4444;
}

#score span {
    color: #44ff44;
}

#ammo span {
    color: #ffaa44;
}

#gameOver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

#gameOver h1 {
    font-size: 5em;
    margin-bottom: 30px;
    color: #ff4444;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
}

#gameOver p {
    font-size: 2em;
    margin-bottom: 40px;
}

canvas {
    display: block;
}
