/* Host Screen Styles - Multiplayer Asteroids */

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

body {
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Game Canvas */
#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
}

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

#hudTimer {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

#hudScores {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 16px;
    text-align: right;
    line-height: 1.6;
}

#hudTeamScores {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 22px;
    font-weight: bold;
}

.team-score-red {
    color: #ff4444;
    margin-bottom: 5px;
}

.team-score-blue {
    color: #4488ff;
}

/* Lobby Overlay */
#lobbyOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: opacity 0.5s ease;
}

#lobbyOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.lobby-content {
    text-align: center;
    max-width: 800px;
    width: 90%;
}

.lobby-content h1 {
    font-size: 48px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #00ffcc;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

.subtitle {
    font-size: 20px;
    color: #aaa;
    margin-bottom: 30px;
}

#qrCodeContainer {
    display: inline-block;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 15px;
}

.join-url {
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
    word-break: break-all;
}

/* Player List */
#playerList {
    margin: 20px 0;
}

#playerList h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #ccc;
}

#players {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

#players li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 16px;
}

.player-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Lobby Controls */
.lobby-controls {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    border: 2px solid #00ffcc;
    background: transparent;
    color: #00ffcc;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn:hover {
    background: #00ffcc;
    color: #000;
}

.btn-start {
    border-color: #ffcc00;
    color: #ffcc00;
}

.btn-start:hover {
    background: #ffcc00;
    color: #000;
}

/* Timer Display */
.timer-display {
    font-size: 24px;
    color: #ffcc00;
    margin-top: 20px;
}

/* Countdown Overlay */
#countdownOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    transition: opacity 0.3s ease;
}

#countdownOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.countdown-number {
    font-size: 200px;
    font-weight: bold;
    color: #00ffcc;
    text-shadow: 0 0 50px rgba(0, 255, 204, 0.8);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Game Over Overlay */
#gameOverOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    transition: opacity 0.5s ease;
}

#gameOverOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.gameover-content {
    text-align: center;
}

.gameover-content h1 {
    font-size: 64px;
    color: #ffcc00;
    text-shadow: 0 0 30px rgba(255, 204, 0, 0.6);
    margin-bottom: 30px;
}

#gameOverResults {
    font-size: 24px;
    line-height: 2;
    margin-bottom: 30px;
}

#gameOverResults .winner {
    font-size: 32px;
    color: #00ffcc;
    margin-bottom: 20px;
}

#gameOverResults .score-line {
    color: #ccc;
}

#gameOverNext {
    font-size: 20px;
    color: #888;
}

/* Utility */
.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lobby-content h1 {
        font-size: 28px;
    }

    .countdown-number {
        font-size: 120px;
    }

    .gameover-content h1 {
        font-size: 40px;
    }

    .lobby-controls {
        flex-direction: column;
        align-items: center;
    }
}
