/* Bible Quizzing - Main Stylesheet */

:root {
    --bq-primary: #2271b1;
    --bq-secondary: #6c757d;
    --bq-success: #198754;
    --bq-danger: #dc3545;
    --bq-warning: #ffc107;
    --bq-info: #0dcaf0;
    --bq-light: #f8f9fa;
    --bq-dark: #212529;

    /* Scoresheet colors */
    --score-correct: #28a745;
    --score-error: #dc3545;
    --score-foul: #ffc107;
    --score-bonus: #17a2b8;
    --score-quiz-out: #6f42c1;
    --score-error-out: #e83e8c;
    --score-foul-out: #fd7e14;
}

/* General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Login page */
.login-container {
    min-height: 100vh;
}

/* Scoresheet */
.scoresheet-container {
    max-width: 100%;
    overflow-x: auto;
}

.scoresheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.scoresheet-table th,
.scoresheet-table td {
    border: 1px solid #dee2e6;
    padding: 4px 8px;
    text-align: center;
    vertical-align: middle;
}

.scoresheet-table th {
    background-color: #e9ecef;
    font-weight: 600;
}

/* Team rows */
.team-header {
    background-color: var(--bq-primary);
    color: white;
    font-weight: bold;
}

.team-header.team-1 { background-color: #FF5733; }
.team-header.team-2 { background-color: #33A1FF; }
.team-header.team-3 { background-color: #33FF57; color: #000; }

.quizzer-row {
    height: 40px;
}

.quizzer-name {
    text-align: left;
    font-weight: 500;
    min-width: 150px;
}

/* Score cells */
.score-cell {
    width: 40px;
    min-width: 40px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.score-cell:hover {
    background-color: #f0f0f0;
}

.score-cell.correct {
    background-color: var(--score-correct);
    color: white;
    font-weight: bold;
}

.score-cell.error {
    background-color: var(--score-error);
    color: white;
    font-weight: bold;
}

.score-cell.foul {
    background-color: var(--score-foul);
    color: #000;
    font-weight: bold;
}

.score-cell.bonus {
    background-color: var(--score-bonus);
    color: white;
    font-weight: bold;
}

.score-cell.bonus-error {
    background-color: #6c757d;
    color: white;
}

.score-cell.excluded {
    background-color: #e9ecef;
    color: #6c757d;
}

/* Status badges */
.badge-quiz-out {
    background-color: var(--score-quiz-out);
}

.badge-error-out {
    background-color: var(--score-error-out);
}

.badge-foul-out {
    background-color: var(--score-foul-out);
}

/* Running score */
.running-score {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Question numbers */
.question-header {
    min-width: 35px;
    font-size: 12px;
}

.question-header.error-point {
    background-color: #fff3cd;
}

/* Stats column */
.stats-column {
    min-width: 60px;
    font-weight: bold;
}

/* Input modal */
.score-input-modal .modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.score-input-btn {
    width: 80px;
    height: 60px;
    font-size: 1.2rem;
    font-weight: bold;
}

.score-input-btn.btn-correct { background-color: var(--score-correct); border-color: var(--score-correct); }
.score-input-btn.btn-error { background-color: var(--score-error); border-color: var(--score-error); }
.score-input-btn.btn-foul { background-color: var(--score-foul); border-color: var(--score-foul); color: #000; }
.score-input-btn.btn-bonus { background-color: var(--score-bonus); border-color: var(--score-bonus); }

/* Public scoreboard */
.scoreboard {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.scoreboard-team {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.scoreboard-team-name {
    font-size: 1.5rem;
    font-weight: bold;
}

.scoreboard-team-score {
    font-size: 3rem;
    font-weight: bold;
}

/* RTL support for Arabic */
[dir="rtl"] .quizzer-name {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .scoresheet-table {
        font-size: 12px;
    }

    .score-cell {
        width: 30px;
        min-width: 30px;
    }

    .quizzer-name {
        min-width: 100px;
    }
}

/* Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.score-updated {
    animation: pulse 0.3s ease-in-out;
}

/* Team score display */
.team-score-display {
    font-size: 2rem;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

/* Cards */
.quiz-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.quiz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Status indicators */
.status-pending { color: var(--bq-secondary); }
.status-in-progress { color: var(--bq-warning); }
.status-completed { color: var(--bq-success); }
