/* ============================================
   QUIZ HEADER - Kotoba Style
   ============================================ */
.quiz-modal-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    z-index: 10;
    flex-shrink: 0;
}

/* Header left - title area */
.quiz-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Avatar hidden — Kotoba uses no mascot */
.quiz-avatar {
    display: none;
}

.quiz-avatar-img {
    display: none;
}

.quiz-title-area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quiz-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2C2C2C;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.4em;
}

/* Quiz status line */
.quiz-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #57534e;
    font-weight: 600;
}

.quiz-status-dot {
    width: 6px;
    height: 6px;
    background: #3D5A80;
    border-radius: 50%;
}

.quiz-title-icon {
    width: 1.4em;
    height: 1.4em;
    object-fit: contain;
}

/* Quiz button icon in header */
.quiz-icon-img {
    width: 1.2em;
    height: 1.2em;
    object-fit: contain;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

#quizProgressText {
    font-size: 0.8em;
    font-weight: 500;
    color: var(--quiz-text-muted);
    min-width: 40px;
    text-align: center;
}

/* Progress stat colors (used in .quiz-progress-stats) */
.progress-correct {
    color: var(--quiz-accent-correct, #4E6F3E);
}

.progress-incorrect {
    color: #A3604E;
}

.quiz-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    color: #57534e;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #2C2C2C;
}

/* ============================================
   PROGRESS SECTION
   ============================================ */
.quiz-progress-section {
    padding: 12px 24px;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

/* Inline layout: bar + counter on one line */
.quiz-progress-inline {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quiz-progress-inline .quiz-progress-track {
    flex: 1;
}

.quiz-progress-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75em;
    font-weight: 500;
    color: var(--quiz-text-muted);
    white-space: nowrap;
}

/* Gradient Progress Bar */
.quiz-progress-track {
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 1px;
    overflow: visible;
    position: relative;
}

.quiz-progress-fill {
    height: 100%;
    border-radius: 1px;
    background: rgba(61, 90, 128, 0.35);
    width: 0%;
    transition: width 0.4s ease;
    position: relative;
    min-width: 0;
}

.quiz-progress-glow {
    display: none;
}

/* ============================================
   STREAK BADGE - Kintsugi Gold (earned)
   ============================================ */
/* Streak badge hidden — gamification pattern */
.quiz-streak-badge {
    display: none !important;
}

@keyframes streak-badge-pop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Streak milestone celebration - kintsugi gold pulse */
.quiz-streak-badge.milestone-celebration {
    animation: streakMilestonePulse 0.6s ease-out 2;
    background: #C9A96E;
    border-color: rgba(201, 169, 110, 0.5);
    color: white;
    box-shadow:
        0 0 0 4px rgba(201, 169, 110, 0.18),
        0 4px 20px rgba(201, 169, 110, 0.24);
}

/* ============================================
   FINISH BUTTON - Green Completion
   ============================================ */
.quiz-finish-btn {
    padding: 11px 18px;
    border-radius: 12px;
    border: none;
    background: var(--quiz-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    box-shadow:
        0 2px 4px rgba(var(--quiz-primary-rgb), 0.09),
        0 4px 12px rgba(var(--quiz-primary-rgb), 0.15);
}

.quiz-finish-btn:hover {
    transform: translateY(-2px);
    background: var(--quiz-primary-hover);
    box-shadow:
        0 4px 8px rgba(var(--quiz-primary-rgb), 0.12),
        0 8px 20px rgba(var(--quiz-primary-rgb), 0.18);
}

/* ============================================
   CHARACTER REACTION - Text bubble only (no avatar)
   ============================================ */
.quiz-character-reaction {
    position: absolute;
    bottom: 90px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: bounce-in-reaction 0.4s ease;
    z-index: 10;
}

@keyframes bounce-in-reaction {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Avatar hidden — Kotoba uses no mascot */
.quiz-character-reaction .reaction-avatar {
    display: none;
}

.quiz-character-reaction .reaction-avatar-img {
    display: none;
}

.quiz-character-reaction .reaction-bubble {
    background: rgba(163, 177, 138, 0.12);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #3f5229;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(163, 177, 138, 0.25);
}

/* Incorrect reaction - muted terracotta */
.quiz-character-reaction.incorrect .reaction-bubble {
    background: rgba(194, 130, 114, 0.10);
    border: 1px solid rgba(180, 110, 94, 0.25);
    color: #7c2d12;
}

