/* Last Brain Standing — danger red theme */
:root {
    --game-primary: #dc3545;
    --lbs-primary: #dc3545;
    --lbs-primary-dark: #a71d2a;
    --lbs-ghost: #6c757d;
    --lbs-alive: #28a745;
}

/* Override common.css accent colors */
h1, h2 { color: var(--lbs-primary); }

input[type="text"] {
    border-color: var(--lbs-primary);
}

#join-btn, #start-btn, #playagain-btn {
    background: var(--lbs-primary);
    color: #fff;
}

.join-room-code {
    color: var(--lbs-primary);
}

.room-code-display {
    color: var(--lbs-primary);
}

.room-code-lobby {
    text-align: center;
    font-size: 1.3rem;
    color: #aaa;
    margin-bottom: 20px;
}

.room-code-lobby span {
    color: var(--lbs-primary);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.15em;
}

/* --- Player Mode --- */
.player-mode #app {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

/* Trivia header */
.trivia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 0;
}

#round-info {
    color: var(--lbs-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

#lives-display {
    font-size: 1.4rem;
    letter-spacing: 4px;
}

/* Question text */
#question-text, #sprint-question-text {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 20px 0;
    text-align: center;
    padding: 0 10px;
}

/* Choice buttons */
.choice-btn {
    width: 100%;
    padding: 18px 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    color: #fff;
    text-align: left;
    transition: transform 0.1s, opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.choice-btn:active { transform: scale(0.97); }
.choice-btn.selected { outline: 3px solid #fff; outline-offset: -3px; }
.choice-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Choice colors */
.choice-red { background: #c0392b; }
.choice-blue { background: #2471a3; }
.choice-green { background: #1e8449; }
.choice-yellow { background: #b7950b; }

/* Answer feedback */
.answer-feedback {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 16px;
    border-radius: 10px;
    margin-top: 16px;
}

.answer-feedback.correct {
    background: #1a4a2e;
    color: #27ae60;
}

.answer-feedback.wrong {
    background: #4a1a1a;
    color: #e74c3c;
}

/* Ghost overlay */
#ghost-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.ghost-content {
    text-align: center;
    padding: 40px;
}

.ghost-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: ghost-float 2s ease-in-out infinite;
}

@keyframes ghost-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.ghost-content p {
    font-size: 1.5rem;
    color: var(--lbs-ghost);
    margin-bottom: 10px;
}

.ghost-sub {
    font-size: 1rem !important;
    font-style: italic;
}

/* Killing floor (player view) */
.kf-matchup {
    text-align: center;
    padding: 30px 20px;
}

.kf-type {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--lbs-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.kf-desc {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 12px;
}

.kf-wait {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

/* Sprint lives */
.sprint-lives {
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.sprint-lives.eliminated {
    color: var(--lbs-ghost);
    letter-spacing: 0.1em;
    font-size: 1.2rem;
}

/* Final scores */
.winner-banner {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--lbs-primary);
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 12px;
}

.final-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #16213e;
    font-size: 1.1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.final-score-row.alive {
    border: 2px solid var(--lbs-alive);
}

.final-score-row .rank {
    color: var(--lbs-primary);
    font-weight: 700;
    margin-right: 12px;
}

.player-status {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* --- Display Mode --- */
.display-mode #app {
    width: 100%;
    max-width: 1100px;
    padding: 20px;
}

.display-header {
    text-align: center;
    margin-bottom: 16px;
}

.display-header #round-info {
    font-size: 1.3rem;
    color: var(--lbs-primary);
    font-weight: 600;
}

/* Display question */
.display-mode #question-text,
.display-mode #sprint-question-text {
    font-size: 1.8rem;
    text-align: center;
    line-height: 1.6;
    margin: 30px 0;
    padding: 0 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Display choices */
.display-choice {
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.choice-label {
    font-weight: 700;
    font-size: 1.4rem;
    min-width: 30px;
}

/* Player status bar */
#player-status-bar, #sprint-player-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.player-status-tag {
    padding: 8px 16px;
    background: #16213e;
    border: 2px solid var(--lbs-alive);
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: opacity 0.3s, border-color 0.3s;
}

.player-status-tag.ghost {
    border-color: var(--lbs-ghost);
    opacity: 0.5;
}

.ps-name {
    font-weight: 600;
}

.ps-hearts {
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.player-status-tag.ghost .ps-hearts {
    color: var(--lbs-ghost);
    letter-spacing: 0.1em;
    font-size: 0.75rem;
}

/* Killing floor arena (display) */
.kf-arena-inner {
    text-align: center;
    padding: 40px 20px;
}

.kf-type-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--lbs-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 40px;
    text-shadow: 0 0 30px rgba(220, 53, 69, 0.5);
    animation: kf-pulse 0.8s ease-in-out 3;
}

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

.kf-vs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-top: 20px;
}

.kf-fighter {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    min-width: 200px;
}

.ghost-fighter {
    background: rgba(108, 117, 125, 0.2);
    border: 2px solid var(--lbs-ghost);
}

.living-fighter {
    background: rgba(40, 167, 69, 0.2);
    border: 2px solid var(--lbs-alive);
}

.kf-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}

.kf-label {
    font-size: 1.3rem;
    font-weight: 600;
}

.ghost-fighter .kf-label {
    color: var(--lbs-ghost);
}

.living-fighter .kf-label {
    color: var(--lbs-alive);
}

.kf-vs-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--lbs-primary);
}

/* Player list overrides */
.player-item {
    display: inline-block;
    padding: 10px 20px;
    margin: 8px;
    background: #16213e;
    border: 2px solid var(--lbs-primary);
    border-radius: 8px;
    font-size: 1.1rem;
}

/* TV mode link */
.tv-mode-link {
    display: none;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 16px;
    text-decoration: none;
}
.tv-mode-link:hover {
    color: var(--lbs-primary);
    text-decoration: underline;
}
@media (min-width: 768px) {
    .tv-mode-link { display: block; }

    .player-mode .choice-btn {
        padding: 20px 20px;
        font-size: 1.2rem;
    }

    .player-mode #question-text {
        font-size: 1.3rem;
    }
}
