.table-scroll { width: 100%; overflow-x: auto; }
.table-scroll > table { min-width: 640px; }
/* Center table contents for submissions/history tables */
.submissions-table th, .submissions-table td { text-align: center; vertical-align: middle; }
/* Stronger rule for explicitly centered tables (e.g., Quizzes You Created) */
.submissions-table.centered th, .submissions-table.centered td { text-align: center !important; vertical-align: middle !important; }
/* Clickable row affordance for user-created quizzes */
.created-quiz-row { cursor: pointer; }
.created-quiz-row:hover { background-color: rgba(42,127,185,0.06); }
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    background: linear-gradient(135deg, #ec7313 0%, #2a7fb9 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.user-info {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: 500;
}

.user-info .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-width: 80px;
}

/* Main content styles */
main {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #555;
}

.features {
    margin: 2rem 0;
}

.features h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.features ul {
    list-style: none;
    margin-left: 1rem;
}

.features li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: #555;
}

.cta-section {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 500;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #ec7313 0%, #2a7fb9 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 127, 185, 0.35);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.btn-profile {       background: linear-gradient(135deg, #c96311 0%, #2a33b9 100%); color: white; }
.btn-profile:hover { background: linear-gradient(135deg, #9e4e0d 0%, #1e1681 100%); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4); }

.btn-logout {        background: linear-gradient(135deg, #d1338a 0%, #611740 100%); color: white; }
.btn-logout:hover {  background: linear-gradient(135deg, #a1276b 0%, #4e1334 100%); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4); }

/* Admin grey button variants (same hover treatment) */
.btn-gray-500 { background: #8a9196; color: #fff; }
.btn-gray-500:hover { background: #7a8288; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(122,130,136,0.4); }

.btn-gray-600 { background: #6c757d; color: #fff; }
.btn-gray-600:hover { background: #5a6268; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(108,117,125,0.4); }

.btn-gray-700 { background: #495057; color: #fff; }
.btn-gray-700:hover { background: #3f464c; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(73,80,87,0.4); }

/* Dashboard styles */
.dashboard {
    text-align: center;
}

.dashboard h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.dashboard p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

/* Ensure the question breakdown modal overlays the quiz report modal when both are open */
#quizReportModal { z-index: 1000; }
#qbreakModal { z-index: 1100; }

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
    max-height: 90vh; /* keep content within viewport */
    overflow-y: auto; /* enable scrolling when tall */
    overscroll-behavior: contain;
}

/* Ensure content starts below the absolute-positioned close button in qbreak modals */
#qbreakModal .modal-content,
#qbreakModalPlayer .modal-content,
#savedQImageModal .modal-content {
    padding-top: 64px !important;
}

/* Modal question title: same size as body text and not bold */
#qbreakTitle,
#qbreakTitlePlayer {
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 0.5rem 0;
}

/* Left-align the answer meta block inside modal (override .message center) */
#qbreakMeta,
#qbreakMetaPlayer {
    text-align: left;
}

/* Highlight submitted answers in question breakdown modal */
.qbreak-correct td { background: #d4edda; }
.qbreak-incorrect td { background: #fdecea; }


/* Player breakdown: palette echo */
#qbreakMetaPlayer {
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff4e6 0%, #e8f3ff 100%);
    border: 1px solid #ffd8a8;
    box-shadow: 0 10px 20px rgba(0,0,0,0.12), 0 6px 8px rgba(0,0,0,0.06);
    position: relative;
}
#qbreakMetaPlayer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    border-radius: 12px 0 0 12px;
    background: linear-gradient(180deg, #ec7313 0%, #2a7fb9 100%);
    box-shadow: inset 0 0 2px rgba(255,255,255,0.6);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #000;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2a7fb9;
    box-shadow: 0 0 0 3px rgba(42, 127, 185, 0.15);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

.help-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .user-info {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Keep primary/profile/logout buttons their default sizing on mobile.
       Only make generic buttons (e.g., stacked auth buttons) full-width. */
    .btn:not(.btn-primary):not(.btn-profile):not(.btn-logout):not(.btn) {
        width: 100%;
        max-width: 200px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

/* Trivia-specific styles */
.trivia-waiting {
    text-align: center;
    padding: 2rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Admin page styles (migrated from inline) */
.admin-container { max-width: 1000px; margin: 0 auto; padding: 20px; }
.admin-section { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.admin-section { scroll-margin-top: 80px; }
.status-indicator { display: inline-block; padding: 5px 10px; border-radius: 4px; font-weight: bold; text-transform: uppercase; font-size: 0.8em; }
.status-waiting { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.status-active { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.status-finished { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.control-buttons { display: flex; gap: 10px; margin: 15px 0; }
.btn-start { background: #28a745; color: #fff; }
.btn-stop { background: #dc3545; color: #fff; }
.btn-reset { background: #6c757d; color: #fff; }
.question-selector { margin: 20px 0; }
/* Ensure select controls can render emoji symbols where available (Windows, Linux, macOS) */
.question-selector select { width: 100%; padding: 10px; font-size: 1em; border: 1px solid #dee2e6; border-radius: 4px; font-family: 'Segoe UI Emoji', 'Segoe UI', Tahoma, 'Noto Color Emoji', 'Apple Color Emoji', sans-serif; }
/* Also apply emoji-capable fonts directly to the admin question select for reliability */
#questionSelect { font-family: 'Segoe UI Emoji', 'Segoe UI', Tahoma, 'Noto Color Emoji', 'Apple Color Emoji', sans-serif; }
/* Visual affordances for question grading status in the dropdown. Note: option styling varies by OS/browser,
   but many modern browsers will honor color/background on option elements. These provide a visible fallback
   when emojis are not rendered by the system font. */
#questionSelect option.q-status-pending { color: #a00; background-color: #fdecea; }
#questionSelect option.q-status-graded { color: #0a0; background-color: #e6ffed; }
/* On UAs that don't show colorized option backgrounds, ensure prefix is visible by coloring the option text itself. */
#questionSelect option.q-status-pending::before { content: '● '; color: #a00; }
#questionSelect option.q-status-graded::before { content: '● '; color: #0a0; }
.submissions-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.submissions-table th, .submissions-table td { padding: 12px; text-align: left; border-bottom: 1px solid #dee2e6; }
.submissions-table th { background: #f8f9fa; font-weight: bold; }
.submissions-table tbody tr:hover { background: #f8f9fa; }
.user-quiz-history-table th,
.user-quiz-history-table td {
    text-align: center;
}

.admin-quiz-history-table th,
.admin-quiz-history-table td {
    text-align: center;
}

/* Make clickable rows show a pointer cursor */
.submissions-table tr.quiz-row {
    cursor: pointer;
}
.answers-table th, .answers-table td { text-align: center; }
#qstatsTable th, #qstatsTable td { text-align: center; }
.submissions-table#qstatsTable tbody tr { cursor: pointer; }
.submissions-table#qstatsTable tbody tr:hover { box-shadow: inset 0 0 0 9999px rgba(0,0,0,0.03); }
/* Make quiz history rows show pointer when clickable */
#userQuizHistoryContainer .submissions-table tbody tr { cursor: pointer; }
/* Center all content in Upcoming Quizzes table */
#upcomingQuizzesContainer .submissions-table th,
#upcomingQuizzesContainer .submissions-table td { text-align: center; }
.grade-buttons { display: flex; gap: 5px; }
.btn-correct { background: #28a745; color: #fff; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; font-size: 0.8em; }
.btn-incorrect { background: #dc3545; color: #fff; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; font-size: 0.8em; }
.status-correct { color: #28a745; font-weight: bold; }
.status-incorrect { color: #dc3545; font-weight: bold; }
.status-pending { color: #6c757d; font-style: italic; }
/* Add breathing room between question text and status in player summary */
.summary-container .status-correct,
.summary-container .status-incorrect,
.summary-container .status-pending { padding-left: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0; }
.stat-card { background: #f8f9fa; padding: 15px; border-radius: 8px; text-align: center; border: 1px solid #dee2e6; }
.stat-number { font-size: 2em; font-weight: bold; color: #007bff; display: block; }
.stat-label { color: #6c757d; font-size: 0.9em; }
.message { padding: 10px; border-radius: 4px; margin: 10px 0; }
.message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.leaderboard-table th, .leaderboard-table td { text-align: center; }
.leaderboard-table .col-username { text-align: left; }
.leaderboard-table th.sortable { cursor: pointer; user-select: none; transition: text-shadow 0.15s ease-in-out; }
.leaderboard-table th.sortable:hover, .leaderboard-table th.sortable:focus-visible { text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.leaderboard-table tbody tr.exp-beginner { background: #ddffe0; }
.leaderboard-table tbody tr.exp-advanced { background: #daecff; }
.leaderboard-table tbody tr.exp-expert { background: #fff4d1; }
.admin-config { margin: 10px 0; padding: 10px; background: #f8f9fa; border: 1px solid #eee; border-radius: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt-8 { margin-top: 8px; }
.question-details { margin:10px 0; padding:10px; background:#f8f9fa; border:1px solid #eee; border-radius:6px; display:none; }
/* Generic utilities */
.text-muted { color: #6c757d; }
.fw-600 { font-weight: 600; }
.flex-space-between { display: flex; justify-content: space-between; align-items: center; }
.mt-6 { margin-top: 6px; }
.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 2rem; }
.text-center { text-align: center; }
.resume-message { background: #e3f2fd; padding: 10px; margin-bottom: 15px; border-radius: 5px; color: #1976d2; }

/* Player page styles (migrated from inline) */
.trivia-container { max-width: 800px; margin: 0 auto; padding: 20px; }
.trivia-status { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 20px; margin-bottom: 20px; text-align: center; }
.trivia-status.waiting { border-color: #ffc107; background-color: #fff3cd; }
.trivia-status.active { border-color: #28a745; background-color: #d4edda; }
.trivia-status.finished { border-color: #dc3545; background-color: #f8d7da; }
.question-container { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 30px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.question-number { font-size: 1.2em; font-weight: bold; color: #007bff; }
.timer { font-size: 1.2em; font-weight: bold; color: #dc3545; }
.question-text { font-size: 1.1em; line-height: 1.6; margin-bottom: 20px; color: #333; }
.answer-input { width: 100%; padding: 12px; font-size: 1em; border: 2px solid #dee2e6; border-radius: 4px; margin-bottom: 15px; }
.answer-input:focus { outline: none; border-color: #007bff; }
.submit-btn { background: #007bff; color: #fff; border: none; padding: 12px 30px; font-size: 1em; border-radius: 4px; cursor: pointer; transition: background-color 0.3s; }
.submit-btn:hover { background: #0056b3; }
.score-display { background: #e9ecef; padding: 15px; border-radius: 8px; text-align: center; margin-bottom: 20px; }
.admin-controls { background: #fff3cd; border: 1px solid #ffc107; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.summary-container { background: white; border: 1px solid #dee2e6; border-radius: 8px; padding: 30px; margin-bottom: 20px; }
.summary-item { padding: 10px 0; border-bottom: 1px solid #eee; }
.summary-item:last-child { border-bottom: none; }
.leaderboard { background: white; border: 1px solid #dee2e6; border-radius: 8px; padding: 20px; scroll-margin-top: 80px; }
.leaderboard .table-scroll { width: 100%; overflow-x: auto; }
.leaderboard table { width: 100%; border-collapse: collapse; min-width: 640px; }
.leaderboard th, .leaderboard td { padding: 10px; text-align: left; border-bottom: 1px solid #eee; }
.leaderboard th { background: #f8f9fa; font-weight: bold; }
.review-nav { position: sticky; top: 0; background: #ffffff; border: 1px solid #dee2e6; border-radius: 6px; padding: 8px 12px; margin: 10px 0 16px 0; z-index: 100; display: flex; gap: 12px; align-items: center; justify-content: center; width: 100%; }
.review-nav a { color: #0b5ed7; text-decoration: none; font-weight: 600; }
.review-nav a:hover { text-decoration: underline; }

/* Make the review navigation more compact on narrow screens */
@media (max-width: 768px) {
    .review-nav { padding: 6px 8px; gap: 8px; margin: 8px 0 12px 0; }
    .review-nav, .review-nav a { font-size: 0.85rem; line-height: 1.1; }
    .review-nav a { font-weight: 600; }
}

/* Rules section styles (player waiting view) */
.rules-section { text-align: left; margin-top: 12px; }
.rules-section h3 { margin-bottom: 10px; }
.rules-card { background: #ffffff; border: 1px solid #dee2e6; border-radius: 8px; padding: 16px; box-shadow: 0 2px 4px rgba(0,0,0,0.06); max-width: 800px; margin: 10px auto 0; }
.rules-section .rules-group { margin-bottom: 10px; }
.rules-section h4 { margin: 8px 0; font-size: 1.05rem; }
.rules-section ul { text-align: left; margin: 6px 0 10px 1.25rem; padding-left: 1.25rem; }
.rules-section ul ul { margin-top: 6px; }
.rules-section li { margin: 6px 0; }

/* Profile page styles (migrated from inline) */
.experience-badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; line-height: 1; }
.experience-badge.beginner { background: #d1f5db; color: #1e7e34; border: 1px solid #99d6a8; }
.experience-badge.advanced { background: #d1e2ff; color: #1b6ec2; border: 1px solid #afcbff; }
.experience-badge.expert { background: #fff4e6; color: #a14f08; border: 1px solid #ffd9b0; }
.profile-info { text-align: left; max-width: 400px; margin: 0 auto; }
.profile-info + .dashboard-actions h3 { margin: 0 0 10px 0; }

/* Setup admin styles (migrated from inline) */
.setup-container { max-width: 500px; margin: 50px auto; background: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.setup-form { margin-top: 20px; }
.setup-form .form-group { margin-bottom: 20px; }
.setup-form .form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.setup-form .form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 1em; }
.setup-form .message { padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.setup-form .message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.setup-form .message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.admin-note { background: #fff3cd; border: 1px solid #ffc107; padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.security-warning { background: #f8d7da; border: 1px solid #dc3545; padding: 15px; border-radius: 4px; margin-top: 20px; color: #721c24; }
.trivia-active {
    background: #d4edda;
    border: 1px solid #28a745;
}

.trivia-finished {
    background: #f8d7da;
    border: 1px solid #dc3545;
}

.question-timer {
    font-size: 1.5em;
    font-weight: bold;
    color: #dc3545;
    text-align: center;
    margin: 1rem 0;
}

.question-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-weight: bold;
}

.answer-form {
    text-align: center;
    margin: 2rem 0;
}

.answer-input-field {
    width: 100%;
    max-width: 500px;
    padding: 1rem;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.answer-input-field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.submit-answer-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-answer-btn:hover {
    background: #0056b3;
}

.submit-answer-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.trivia-leaderboard {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.trivia-leaderboard table {
    width: 100%;
    border-collapse: collapse;
}

.trivia-leaderboard th,
.trivia-leaderboard td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.trivia-leaderboard th {
    background: #f8f9fa;
    font-weight: bold;
}

.trivia-leaderboard tr:hover {
    background: #f8f9fa;
}

.current-user-row {
    background: #e3f2fd !important;
    font-weight: bold;
}

.admin-badge {
    background: #ffc107;
    color: #212529;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

.trivia-status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

.status-waiting {
    background: #fff3cd;
    color: #856404;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-finished {
    background: #f8d7da;
    color: #721c24;
}

/* Trivia images: constrain to viewport (no more than half width/height) */
.question-image img,
.qbreak-image img,
#qImageContainer img {
    max-width: 50vw !important;
    max-height: 50vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
    /* Fun border and subtle depth (brighter, on-brand) */
    border: 8px solid transparent;
    border-radius: 14px;
    background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ec7313 0%, #2a7fb9 100%) border-box;
    box-shadow:
    0 10px 24px rgba(236, 115, 19, 0.18),
    0 4px 12px rgba(42, 127, 185, 0.2);
}
