/* Hotline Miami Multiplayer - styles.css */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%; height: 100%;
    overflow: hidden;
    background: #0a0a0a;
    font-family: 'Courier New', monospace;
    color: #e8eaf0;
}

/* Lobby */
#lobby-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 100%);
}
#lobby-screen.hidden { display: none; }

.lobby-panel {
    background: rgba(20, 10, 10, 0.95);
    border: 2px solid #ff2d55;
    padding: 30px 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.lobby-panel h1 {
    font-size: 36px;
    color: #ff2d55;
    text-shadow: 0 0 20px rgba(255, 45, 85, 0.5);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.subtitle {
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
}

.connection-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    font-size: 12px;
}

#connection-status {
    font-weight: bold;
}
#connection-status.connected { color: #00ff88; }
#connection-status.connecting { color: #ffcc00; }
#connection-status.disconnected { color: #ff4444; }

.server-url { color: #666; font-size: 11px; }

.room-section {
    margin-bottom: 20px;
}

#room-code-input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    text-align: center;
    text-transform: uppercase;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 12px;
}
#room-code-input:focus {
    outline: none;
    border-color: #ff2d55;
}

.lobby-buttons {
    display: flex;
    gap: 10px;
}
.lobby-buttons button {
    flex: 1;
}

button {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: #ff2d55;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}
button:hover:not(:disabled) {
    background: #ff4d75;
    transform: translateY(-1px);
}
button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-secondary {
    background: #333;
}
.btn-secondary:hover:not(:disabled) {
    background: #444;
}

.room-code {
    font-size: 32px;
    letter-spacing: 6px;
    color: #ffcc00;
    margin: 15px 0;
    font-weight: bold;
}

#btn-copy-link {
    width: 100%;
    margin-bottom: 20px;
}

.player-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.player-slot {
    background: rgba(0,0,0,0.4);
    border: 1px solid #333;
    padding: 12px;
    text-align: left;
}
.player-slot.connected {
    border-color: #555;
}
.player-slot.p1 { border-left: 3px solid #00bfff; }
.player-slot.p2 { border-left: 3px solid #ffaa22; }
.player-slot.p3 { border-left: 3px solid #66dd66; }
.player-slot.p4 { border-left: 3px solid #dd66dd; }

.slot-name {
    display: block;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 4px;
}
.slot-status {
    display: block;
    font-size: 11px;
    color: #666;
}
.slot-ping {
    display: block;
    font-size: 10px;
    color: #555;
}
.slot-badges {
    margin-top: 4px;
}
.slot-host-badge {
    background: #ffcc00;
    color: #000;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: bold;
    margin-right: 4px;
}
.slot-ready-badge {
    background: #00ff88;
    color: #000;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: bold;
}

.status-text {
    color: #888;
    font-size: 13px;
    margin-bottom: 10px;
}

.error-text {
    color: #ff4444;
    font-size: 12px;
    min-height: 18px;
    margin-bottom: 10px;
}

.ready-section {
    display: flex;
    gap: 10px;
}
.ready-section button {
    flex: 1;
}

#btn-ready.is-ready {
    background: #00ff88;
    color: #000;
}

/* Game wrapper */
#game-wrapper {
    position: absolute;
    inset: 0;
    display: none;
    background: #000;
}
#game-wrapper.visible {
    display: block;
}

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

/* Countdown */
#countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-weight: bold;
    color: #ff2d55;
    text-shadow: 0 0 40px rgba(255, 45, 85, 0.8);
    z-index: 100;
}

@keyframes countPop {
    0% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
}

/* Network warning */
#net-warning {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 100, 0, 0.9);
    color: #fff;
    padding: 8px 16px;
    font-size: 12px;
    display: none;
    z-index: 50;
}
#net-warning.visible { display: block; }

/* Round over */
#round-over-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #ff2d55;
    padding: 30px 50px;
    text-align: center;
    display: none;
    z-index: 100;
}
#round-over-overlay.visible { display: block; }

#round-over-title {
    font-size: 36px;
    margin-bottom: 20px;
}
#round-over-title.victory { color: #00ff88; }
#round-over-title.defeat { color: #ff4444; }

#round-over-stats {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #aaa;
}

.round-over-buttons {
    display: flex;
    gap: 10px;
}
.round-over-buttons button {
    flex: 1;
}

/* Disconnected overlay */
#disconnected-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #ff4444;
    padding: 30px 50px;
    text-align: center;
    display: none;
    z-index: 100;
}
#disconnected-overlay.visible { display: block; }

#dc-title {
    font-size: 28px;
    color: #ff4444;
    margin-bottom: 15px;
}
#dc-message {
    color: #888;
    margin-bottom: 20px;
    font-size: 13px;
}

.dc-buttons {
    display: flex;
    gap: 10px;
}
.dc-buttons button {
    flex: 1;
}
