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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', monospace;
    cursor: none;
}

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

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    cursor: pointer;
    z-index: 100;
    user-select: none;
}

#start-screen h1 {
    font-size: 72px;
    font-weight: bold;
    letter-spacing: 16px;
    margin-bottom: 20px;
    color: #ff4444;
    text-shadow: 0 0 40px rgba(255, 68, 68, 0.5);
}

#start-screen p {
    font-size: 18px;
    letter-spacing: 8px;
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

#controls-hint {
    margin-top: 40px;
    font-size: 12px;
    opacity: 0.4;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 500px;
}

#controls-hint span {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 4px;
    font-weight: bold;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.3; }
}

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

/* Crosshair */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    font-weight: 100;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

/* Health */
#health-bar {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 28px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

#health-icon {
    color: #ff4444;
    font-size: 24px;
    font-weight: bold;
}

#health-value {
    font-weight: bold;
    min-width: 40px;
}

/* Ammo */
#ammo-bar {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 28px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

#ammo-value {
    font-weight: bold;
}

#ammo-separator {
    font-size: 18px;
    opacity: 0.5;
}

#ammo-reserve {
    font-size: 18px;
    opacity: 0.6;
}

/* Kill Feed */
#killfeed {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.killfeed-entry {
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 3px;
    animation: killfeedFade 3s ease-out forwards;
    white-space: nowrap;
}

@keyframes killfeedFade {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Hit Marker */
#hit-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4444;
    font-size: 20px;
    font-weight: bold;
    pointer-events: none;
}

#hit-marker.show {
    display: block !important;
    animation: hitPop 0.2s ease-out forwards;
}

@keyframes hitPop {
    0% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Damage Flash */
#damage-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#damage-flash.show {
    display: block !important;
    animation: damageFlash 0.3s ease-out forwards;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(255, 0, 0, 0.3) 100%);
}

@keyframes damageFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Muzzle flash overlay */
.muzzle-flash {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(255, 200, 50, 0.9) 0%, rgba(255, 100, 0, 0.5) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: muzzlePop 0.06s ease-out forwards;
}

@keyframes muzzlePop {
    0% { opacity: 1; transform: translateX(-50%) scale(1.2); }
    100% { opacity: 0; transform: translateX(-50%) scale(0.8); }
}

/* Low ammo warning */
.ammo-low #ammo-value {
    color: #ff4444;
    animation: blink 0.5s ease-in-out infinite;
}

/* Low health warning */
.health-low #health-value {
    color: #ff4444;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
