/* ── Animations ─────────────────────────────────────────── */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 0.3s ease-out; }

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(81,207,102,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(81,207,102,0); }
}
.animate-correct { animation: pulse-green 0.5s ease-out; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%,75% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
}
.animate-wrong { animation: shake 0.4s ease-out; }

/* Highlighted phrase in context */
mark {
    background-color: #fce7f3;
    color: #9d174d;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ── Hero background with gradient orbs ────────────────── */
.hero-bg {
    background: linear-gradient(135deg, #1a1625 0%, #0f0d15 50%, #1e1233 100%);
    position: relative;
    min-height: 420px;
}
.hero-bg::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236,72,153,0.25), transparent 70%);
    top: -150px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}
.hero-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.2), transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
    pointer-events: none;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* ── Confetti burst (lesson complete) ──────────────────── */
@keyframes confetti-fall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(60vh) rotate(720deg); opacity: 0; }
}
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}
.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confetti-fall 2.5s ease-out forwards;
}

/* ── Scroll snap for mobile carousel ───────────────────── */
.snap-x { scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.snap-center { scroll-snap-align: center; }

