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

body {
    font-family: 'Arial', sans-serif;
    background: #000;
    overflow: hidden;
    color: #fff;
    cursor: none;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    display: block;
    background: #000;
    cursor: none;
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

#crosshair::before {
    top: 50%;
    left: -10px;
    width: 10px;
    height: 2px;
    transform: translateY(-50%);
}

#crosshair::after {
    top: 50%;
    right: -10px;
    width: 10px;
    height: 2px;
    transform: translateY(-50%);
}

#healthBar {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 300px;
}

.bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

#healthFill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444 0%, #ff6666 100%);
    width: 100%;
    transition: width 0.3s ease;
}

.label {
    font-size: 12px;
    margin-bottom: 5px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.text {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#ammo {
    position: absolute;
    bottom: 30px;
    right: 30px;
    text-align: right;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    border-radius: 10px;
    border: 2px solid #fff;
}

#ammoCount {
    font-size: 36px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#weaponName {
    font-size: 14px;
    color: #aaa;
    margin-top: 5px;
}

#score, #wave {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 200px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    border-radius: 5px;
    text-align: center;
}

#wave {
    top: 100px;
}

.value {
    font-size: 24px;
    font-weight: bold;
    margin-top: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

#controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #fff;
    pointer-events: auto;
}

.control-info h3 {
    margin-bottom: 10px;
    color: #4a90e2;
}

.control-info p {
    margin: 5px 0;
    font-size: 14px;
}

.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 3px solid #ff4444;
    box-shadow: 0 0 50px rgba(255, 68, 68, 0.5);
    min-width: 400px;
}

.modal-content h1 {
    margin-bottom: 20px;
    color: #ff4444;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    font-size: 72px;
    font-weight: bold;
    letter-spacing: 10px;
    animation: boomPulse 2s infinite;
}

@keyframes boomPulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 68, 68, 0.5);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 68, 68, 0.8);
    }
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.modal-content p {
    margin-bottom: 15px;
    font-size: 18px;
}

button {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.6);
    background: linear-gradient(135deg, #ff6666 0%, #ff0000 100%);
}

button:active {
    transform: translateY(0);
}

#finalScore, #finalWave {
    font-size: 24px;
    color: #ffd700;
    font-weight: bold;
}

#reloadIndicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    pointer-events: none;
}

#reloadIndicator.hidden {
    display: none;
}

.reload-text {
    font-size: 32px;
    font-weight: bold;
    color: #ffaa00;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: pulse 0.5s infinite;
}

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