/* KlasChat Visual Theme — Background lesson image, lesson label, flower progress, rewards */

/* === LESSON BACKGROUND on chat-main === */
.chat-main.has-lesson-bg {
    background: var(--lesson-bg) center / cover no-repeat !important;
}

/* === LESSON LABEL (top-left, small) === */
.lesson-label {
    position: absolute;
    top: 8px;
    left: 52px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.85rem;
    pointer-events: none;
}

.lesson-label.hidden { display: none; }

.lesson-number {
    font-weight: 800;
}

.lesson-title {
    font-weight: 600;
    opacity: 0.9;
}

/* === FLOWER PROGRESS (inline in label) === */
.flower-progress {
    display: flex;
    gap: 2px;
    margin-left: 6px;
}

.flower-stage {
    font-size: 0.9rem;
    opacity: 0.35;
    transition: opacity 0.4s, transform 0.4s;
}

.flower-stage.active {
    opacity: 1;
    transform: scale(1.2);
}

.flower-stage.done {
    opacity: 0.65;
}

/* === REWARD OVERLAYS === */
.reward-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reward-burst {
    font-size: 3rem;
    color: #27ae60;
    animation: reward-burst-anim 2s ease forwards;
}

@keyframes reward-burst-anim {
    0% { opacity: 1; transform: scale(0.3); }
    30% { transform: scale(1.5); }
    100% { opacity: 0; transform: scale(1.2) translateY(-40px); }
}

.reward-confetti {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f39c12;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.9);
    padding: 0.5rem 1.5rem;
    border-radius: 16px;
    animation: reward-confetti-anim 2.5s ease forwards;
}

@keyframes reward-confetti-anim {
    0% { opacity: 1; transform: scale(0.5); }
    20% { transform: scale(1.15); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: scale(1) translateY(-20px); }
}

/* Wrong answer shake */
.exercise-component.shake-wrong {
    animation: shake-gentle 0.4s ease;
}

@keyframes shake-gentle {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
