:root {
    --primary-color: #ff0055;
    --secondary-color: #00ffaa;
    --ui-bg: rgba(0, 0, 0, 0.85);
    --text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: #000;
    overflow: hidden;
    user-select: none;
}

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

canvas { display: block; }

/* CRT Overlay */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 2px 100%;
    pointer-events: none;
    z-index: 15;
}

/* Minimap */
#minimap {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--ui-bg);
    border: 2px solid var(--secondary-color);
    box-shadow: 0 0 10px var(--secondary-color);
    z-index: 10;
}

/* Top UI (Kills & Score) */
#top-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.stat-box-small {
    background: var(--ui-bg);
    border-left: 4px solid var(--secondary-color);
    padding: 5px 15px;
    display: flex;
    align-items: center;
}

.label { color: var(--secondary-color); font-size: 0.9rem; font-weight: bold; margin-right: 10px; }
.value-small { color: #fff; font-size: 1.2rem; font-weight: bold; }

/* Bottom UI (Health & Ammo) */
#ui-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.stat-box {
    background: var(--ui-bg);
    border-bottom: 5px solid var(--primary-color);
    padding: 10px 30px;
    box-shadow: 0 0 15px var(--primary-color);
}

.stat-box .label { color: var(--primary-color); font-size: 1rem; }
.stat-box .value { color: #fff; font-size: 2.5rem; font-weight: bold; }

/* Weapon Sprite */
#weapon {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 5;
}

#weapon.shoot {
    animation: recoil 0.1s ease-out;
}

@keyframes recoil {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(50px) scale(1.1); }
    100% { transform: translateX(-50%) translateY(0); }
}

/* Crosshair */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 50%;
    z-index: 10;
}

#crosshair::before, #crosshair::after { content: ''; position: absolute; background: #0f0; }
#crosshair::before { width: 100%; height: 1px; top: 11px; left: 0; }
#crosshair::after { width: 1px; height: 100%; top: 0; left: 11px; }

/* Instructions */
#instructions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#instructions h1 {
    font-size: 6rem;
    color: var(--primary-color);
    text-shadow: 0 0 30px var(--primary-color);
    margin-bottom: 20px;
}

#start-btn {
    margin-top: 30px;
    padding: 20px 50px;
    background: transparent;
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-color);
}

#start-btn:hover {
    background: var(--primary-color);
    color: #fff;
}
