/* ─────────────────────────────────────────────────────────────────────────────
   Global top bar (non-game views)
──────────────────────────────────────────────────────────────────────────────*/
.global-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    z-index: 1000;
}

/* ── Home view ──────────────────────────────────────────────────────────────*/
.home-logo {
    max-width: 120px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.home-view {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 60px;
    background: var(--bg-app);
    color: var(--text-primary);
}

/* Dark-theme join code input */
.home-view .code-input.form-control {
    background: var(--bg-surface-2);
    border-color: var(--border-default);
    color: var(--accent-teal);
    font-weight: 700;
}
.home-view .code-input.form-control:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.25);
}
.home-view .code-input.form-control::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* .home-view h1 font set via .brand-text class */

.code-input {
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    text-align: center;
    max-width: 220px;
    font-family: monospace;
}

/* ── Lobby view ─────────────────────────────────────────────────────────────*/
.lobby-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-app);
    color: var(--text-primary);
    padding: calc(2rem + 60px) 1rem 2rem;
}

.lobby-card {
    width: 100%;
    max-width: 1000px;
}

.lobby-card.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.lobby-card .card-body {
    color: var(--text-primary);
}

/* Override Bootstrap text-muted in lobby/hiding/waiting contexts */
.lobby-view .text-muted {
    color: var(--text-secondary) !important;
}

/* Override Bootstrap's h3 default dark text */
.lobby-view h3 {
    color: var(--text-primary);
}

/* Dark-theme dropdowns in lobby & hiding screens */
.lobby-view .form-control,
.lobby-view select.form-control {
    background: var(--bg-surface-2);
    border-color: var(--border-default);
    color: var(--text-primary);
}
.lobby-view .form-control:focus,
.lobby-view select.form-control:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.25);
}
.lobby-view select.form-control option {
    background: var(--bg-surface-2);
    color: var(--text-primary);
}
.lobby-view .form-group label {
    color: var(--text-secondary);
}

.code-display {
    font-size: 2.5rem;
    font-family: monospace;
    letter-spacing: 0.3em;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
    color: var(--accent-teal);
}
.code-display:hover  { color: var(--accent-teal-2); }
.code-display.copied { color: var(--success); }

.player-list-box {
    min-height: 42px;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border-default) !important;
    border-radius: 6px;
}

.player-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border-default);
    font-size: 0.9rem;
    color: var(--text-primary);
}
.player-item:last-child { border-bottom: none; }

.player-item-hider {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-purple);
}
.player-item-hider .text-secondary { color: var(--accent-purple) !important; }

.you-badge {
    font-size: 0.7rem;
    background: var(--bg-surface-2);
    color: var(--text-muted);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-left: auto;
}

/* ── Start Game button ─────────────────────────────────────────────*/
.btn-start-game {
    background: var(--accent-teal-2);
    border-color: var(--accent-teal-2);
    color: var(--text-dark);
    font-weight: 700;
}
.btn-start-game:hover:not(:disabled) {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: var(--text-dark);
}
.btn-start-game:disabled {
    background: var(--bg-elevated);
    border-color: transparent;
    color: var(--text-secondary);
    opacity: 1;
}

/* ── Game Length Slider ──────────────────────────────────────────────*/
.game-length-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    margin: 10px 0;
    background: transparent;
    outline: none;
    cursor: pointer;
}

/* WebKit track */
.game-length-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--bg-surface-3);
    border-radius: 3px;
}
/* WebKit thumb */
.game-length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-teal-2);
    border: 2px solid var(--bg-surface);
    cursor: pointer;
    margin-top: -7px;
    transition: background 0.15s;
}
.game-length-slider::-webkit-slider-thumb:hover {
    background: var(--accent-teal);
}

/* Firefox track */
.game-length-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--bg-surface-3);
    border-radius: 3px;
}
/* Firefox thumb */
.game-length-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-teal-2);
    border: 2px solid var(--bg-surface);
    cursor: pointer;
}

.game-length-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.25);
}
.game-length-slider:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.2rem rgba(45, 212, 191, 0.25);
}

.game-length-labels {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 0 2px;
    margin-top: 2px;
}

/* ── Lobby Exit button ───────────────────────────────────────────*/
.lobby-exit-btn {
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
    border-width: 2px;
    font-weight: 600;
}
