/* css/game.css */
.game-container {
    max-width: 700px;
    width: 100%;
    background: rgba(18, 26, 40, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.05);
    padding: 1.5rem 1.8rem 2.2rem;
    transition: all 0.2s ease;
}

/* Multiplayer Bar */
.multiplayer-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 2rem;
}

.players {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.player-chip {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.65rem 1.2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b3c3e0;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.player-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.player-chip.locked {
    cursor: default;
    opacity: 0.7;
}

.player-chip.locked:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    transform: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.player-chip i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.player-chip.active-turn {
    background: #3b4e78;
    border-color: #7e9cd9;
    color: white;
    box-shadow: 0 0 12px #3f6ac0;
    transform: scale(1.02);
}

.player-chip.name-updated {
    animation: namePop 0.5s ease forwards;
}

@keyframes namePop {
    0% { transform: scale(1); filter: brightness(1); box-shadow: 0 4px 8px rgba(0,0,0,0.25); }
    40% { transform: scale(1.1); filter: brightness(1.25); }
    100% { transform: scale(1); filter: brightness(1); box-shadow: 0 6px 12px rgba(0,0,0,0.35); }
}

.player-chip.active-turn i {
    opacity: 1;
    color: #ffe484;
}

.score-badge {
    background: #0f172a;
    border-radius: 24px;
    padding: 0.4rem 1.2rem;
    font-weight: 600;
    font-size: 1rem;
    color: #cbd5e1;
    border: 1px solid #2d3a5e;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.score-badge:hover {
    background: #1e293b;
    border-color: #4f6aa3;
}

.multiplayer-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.timer {
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.timer:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

.score-badge i {
    color: #fbbf24;
}

/* Question Card */
.question-card {
    background: #121b2f;
    border-radius: 2rem;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 12px 24px -8px #00000080;
    margin-bottom: 1.8rem;
}

.category-badge {
    display: inline-block;
    background: rgba(255,215,0,0.12);
    color: #ffe484;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255,215,0,0.25);
    backdrop-filter: blur(4px);
}

.question-text {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2rem;
    word-break: break-word;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-btn {
    background: #1e2a41;
    border: 2px solid transparent;
    padding: 1.2rem 0.8rem;
    border-radius: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #d1defa;
    text-align: left;
    padding-left: 1.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.03);
}

.option-btn:hover:not(:disabled) {
    background: #2d3d60;
    border-color: #6f8ad0;
    transform: translateY(-2px);
}

.option-btn.correct {
    background: #1e4a3b;
    border-color: #2ecc71;
    color: white;
    box-shadow: 0 0 15px #2ecc7180;
}

.option-btn.wrong {
    background: #4a2a2a;
    border-color: #e74c3c;
    color: #ffb8b8;
    opacity: 0.8;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.option-prefix {
    background: #0f1a2f;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #94a3b8;
}

/* Turn Indicator */
.turn-indicator {
    background: #0d1727;
    border-radius: 60px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #adb9d4;
    font-weight: 500;
    border: 1px solid #2a3b5a;
    margin-top: 0.5rem;
}

.turn-indicator i {
    font-size: 1.2rem;
    color: #7e9cd9;
}

.lifeline-btn {
    margin-top: 0.8rem;
    width: 100%;
    background: linear-gradient(135deg, #e67e22, #d35400);
    border: none;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.85rem;
    border-radius: 1.2rem;
    cursor: pointer;
    letter-spacing: 0.03rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.lifeline-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.35);
    filter: brightness(1.1);
}

.lifeline-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.35);
}

.option-btn.fifty-disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(211, 223, 255, 0.7);
}

/* Next Button */
.next-btn {
    width: 100%;
    background: linear-gradient(135deg, #2a4480, #1f3a6b);
    border: none;
    padding: 1.1rem 1.5rem;
    border-radius: 3rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #4f74c0;
    box-shadow: 0 10px 20px -5px #00000080;
    cursor: pointer;
    transition: all 0.2s;
}

.next-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #315396, #254883);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px #000000cc;
}

.next-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.start-btn {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #1e8449);
    border: none;
    padding: 1.1rem 1.5rem;
    border-radius: 3rem;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #2d8a56;
    box-shadow: 0 10px 20px -5px #00000080;
    cursor: pointer;
    transition: all 0.2s;
}

.start-btn:hover {
    background: linear-gradient(135deg, #2abf73, #209a58);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px #000000cc;
}

.start-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.question-time-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.question-time-selector label {
    font-weight: 500;
}

.question-time-selector select {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #98c0f1;
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.question-time-selector select option {
    background: #000000cc;
    color: #ffffff;
    border-radius: 0.8rem;
}

.question-time-selector select:hover {
    background: rgba(0, 0, 0, 0.553);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.question-time-selector select:focus {
    outline: none;
    border-color: #7e9cd9;
    background: rgba(255, 255, 255, 0.1);
}

/* Score Modal (simple popup) */
.score-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1e2a41;
    border-radius: 2rem;
    padding: 2rem;
    max-width: 320px;
    width: 90%;
    border: 1px solid #6f8ad0;
    color: white;
    box-shadow: 0 30px 40px #000;
}

.modal-content h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    color: #ffe484;
}

.score-list {
    list-style: none;
    margin-bottom: 2rem;
}

.score-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #3e517a;
    font-weight: 500;
}

.close-modal {
    background: #2d4480;
    border: none;
    color: white;
    padding: 0.8rem;
    width: 100%;
    border-radius: 2rem;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-container {
        padding: 1.2rem 1.5rem 1.8rem;
    }
    .question-text {
        font-size: 1.4rem;
    }
    .options-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .option-btn {
        padding: 1rem;
    }
    .player-chip {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 500px) {
    .game-container {
        padding: 1.2rem 1.2rem 1.8rem;
    }
    .question-text {
        font-size: 1.3rem;
    }
    .options-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .option-btn {
        padding: 1rem;
    }
    .player-chip {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 380px) {
    .multiplayer-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .players {
        justify-content: center;
    }
}