/* ============================================================
   Math Review — Custom Styles
   ============================================================ */

/* ── Body & base ────────────────────────────────────────────── */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── App logo ───────────────────────────────────────────────── */
.app-logo {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* ── Loading overlay ────────────────────────────────────────── */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Collections ────────────────────────────────────────────── */
.collection-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.collection-item:hover {
    background-color: #e8f0fe;
}

.collection-item .form-check-input:checked ~ .form-check-label {
    color: #0d6efd;
    font-weight: 600;
}

/* ── Quiz container ─────────────────────────────────────────── */
.quiz-container {
    max-width: 800px;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* ── Question image ─────────────────────────────────────────── */
.question-image-wrap {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0.75rem;
    text-align: center;
}

.question-image {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

/* ── Answer inputs ──────────────────────────────────────────── */
.answer-input {
    font-size: 1.2rem;
    padding: 0.75rem 1rem;
}

/* ── Multiple choice buttons ────────────────────────────────── */
.choice-group {
    max-width: 100%;
}

.choice-btn {
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 1.05rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.choice-btn.active {
    font-weight: 600;
}

/* ── Submit button ──────────────────────────────────────────── */
#submit-btn {
    font-size: 1.1rem;
    padding: 0.85rem;
    border-radius: 8px;
}

/* ── Feedback ───────────────────────────────────────────────── */
.feedback-card {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    border: 2px solid transparent;
}

.feedback-card.correct {
    background-color: #d1e7dd;
    border-color: #a3cfbb;
}

.feedback-card.incorrect {
    background-color: #f8d7da;
    border-color: #f1aeb5;
}

.feedback-result {
    font-size: 1.25rem;
}

.feedback-icon {
    font-size: 1.4rem;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.explanation-box {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 0 8px 8px 0;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a4a2a;
}

/* ── Next / Finish buttons ──────────────────────────────────── */
#next-btn,
#finish-btn {
    font-size: 1.1rem;
    padding: 0.85rem;
    border-radius: 8px;
}

/* ── Quiz header ────────────────────────────────────────────── */
.quiz-header {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.quiz-score {
    font-size: 1rem;
    font-weight: 600;
}

/* ── Finish screen ──────────────────────────────────────────── */
.score-circle {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.stat-box {
    border-radius: 10px;
    padding: 1rem 0.5rem;
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* ── Wrong review cards ─────────────────────────────────────── */
.wrong-review-card {
    border-left: 4px solid #dc3545;
}

/* ── Mobile tweaks ──────────────────────────────────────────── */
@media (max-width: 576px) {
    .quiz-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .choice-btn {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }
}
