/**
 * Spectator Mode Styles
 */

body {
    margin: 0;
    padding: 0;
    background: #000;
    font-family: 'WizardOfWor', monospace;
    overflow: hidden;
}

#spectator-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

#spectator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #111;
    border-bottom: 2px solid #333;
    color: #aaf;
    font-size: 14px;
    letter-spacing: 1px;
}

.spectator-label {
    font-weight: bold;
    color: #66a;
}

#dungeon-info {
    color: #888;
    font-size: 12px;
}

.back-btn {
    padding: 6px 16px;
    background: #222;
    border: 1px solid #444;
    color: #aaa;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #333;
    border-color: #66a;
    color: #fff;
}

#spectator-canvas {
    flex: 1;
    display: block;
    margin: auto;
    background: #000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* Overlay for loading / errors */
#spectator-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#spectator-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    color: #aaf;
}

#overlay-message {
    font-size: 16px;
    letter-spacing: 1px;
    margin: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #spectator-header {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .back-btn {
        width: 100%;
        text-align: center;
    }
}

/* ─── Game Browser ────────────────────────────────────────────────────────── */
#game-browser {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    background: #000;
    z-index: 900;
    overflow-y: auto;
}
#game-browser h2 {
    color: #DFF60A;
    font-size: 24px;
    letter-spacing: 4px;
    margin-bottom: 4px;
}
.browser-subtitle {
    color: #666;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 24px;
}
#game-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 90%;
    max-width: 500px;
}
.game-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #111;
    border: 1px solid #333;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.game-card:hover {
    border-color: #DFF60A;
    background: #181818;
}
.game-mode {
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
    min-width: 120px;
}
.game-level {
    color: #888;
    font-size: 12px;
}
.game-players {
    color: #aaa;
    font-size: 12px;
}
.game-watch {
    color: #DFF60A;
    font-size: 12px;
    letter-spacing: 2px;
}

#spectator-overlay.hide,
#game-browser.hide {
    display: none;
}
