/* Hotline Miami - Deepseek V4 Pro */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

canvas {
    display: block;
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

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

.hp-bar {
    position: absolute;
    top: 16px; left: 16px;
    display: flex;
    gap: 6px;
}

.hp-heart {
    font-size: 24px;
    color: #ff2d55;
    text-shadow: 2px 2px 0 #000;
    transition: opacity 0.2s;
}

.hp-heart.lost {
    opacity: 0.3;
}

.ammo-display {
    position: absolute;
    top: 16px; right: 16px;
    color: #ffeb3b;
    font-size: 22px;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    text-align: right;
    line-height: 1.3;
}

.ammo-count {
    font-size: 36px;
}

.alert-indicator {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #f00;
    text-shadow: 2px 2px 0 #000, 0 0 10px #f00;
    opacity: 0;
    transition: opacity 0.15s;
    letter-spacing: 4px;
}

.alert-indicator.active {
    opacity: 1;
    animation: alertPulse 0.5s infinite alternate;
}

@keyframes alertPulse {
    from { text-shadow: 2px 2px 0 #000, 0 0 8px #f00; }
    to { text-shadow: 2px 2px 0 #000, 0 0 20px #f00; }
}

.weapon-name {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000;
    opacity: 0.8;
}

.kills-display {
    position: absolute;
    top: 70px;
    left: 16px;
    color: #fff;
    font-size: 14px;
    text-shadow: 1px 1px 0 #000;
    opacity: 0.7;
}

.interact-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    text-shadow: 1px 1px 0 #000;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.interact-hint.hidden {
    opacity: 0;
}

.reload-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.15s;
}

.reload-bar.active {
    opacity: 1;
}

.reload-fill {
    height: 100%;
    background: #ffeb3b;
    transition: width 0.05s linear;
}

/* Overlay panels */
.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: all;
}

.overlay.hidden {
    display: none;
}

.overlay h1 {
    font-size: 56px;
    color: #ff2d55;
    text-shadow: 4px 4px 0 #000, 0 0 30px #ff2d55;
    letter-spacing: 6px;
    margin-bottom: 20px;
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
}

.overlay h2 {
    font-size: 28px;
    color: #ffeb3b;
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 8px;
}

.overlay .subtitle {
    font-size: 16px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    opacity: 0.6;
    margin-bottom: 30px;
}

.overlay .btn-text {
    font-size: 18px;
    color: #fff;
    text-shadow: 1px 1px 0 #000;
    animation: blink 1.2s infinite;
    cursor: pointer;
}

.lobby-panel {
    width: min(360px, calc(100vw - 32px));
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
}

.slot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.72);
    border: 2px solid rgba(255,255,255,0.22);
    color: #fff;
    text-shadow: 1px 1px 0 #000;
}

.slot-row span {
    font-weight: bold;
}

.slot-row.p1 { border-left-color: #35a7ff; }
.slot-row.p2 { border-left-color: #ff9f1c; }
.slot-row.p3 { border-left-color: #2ec4b6; }
.slot-row.p4 { border-left-color: #e056fd; }

.ready-button {
    min-width: 160px;
    min-height: 44px;
    padding: 10px 18px;
    margin-bottom: 18px;
    border: 2px solid #ffeb3b;
    background: #111;
    color: #ffeb3b;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 1px 1px 0 #000;
}

.ready-button.ready {
    background: #ffeb3b;
    color: #111;
    text-shadow: none;
}

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

/* Results screen */
.results {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.85);
    border: 2px solid #ff2d55;
    padding: 30px 50px;
    text-align: center;
    pointer-events: all;
}

.results h1 {
    font-size: 40px;
    color: #ff2d55;
    text-shadow: 3px 3px 0 #000;
    margin-bottom: 20px;
}

.results .stat-row {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    color: #fff;
    font-size: 16px;
    margin: 6px 0;
    text-shadow: 1px 1px 0 #000;
}

.results .stat-label {
    opacity: 0.7;
}

.results .stat-value {
    font-weight: bold;
    color: #ffeb3b;
}

.results .btn-text {
    margin-top: 20px;
    display: inline-block;
}
