/* إقرأ — Animations & Interactions */

body.loading { overflow: hidden; }

/* Session skip — no flash on repeat visits */
html.loader-skip #page-loader { display: none !important; }
html.loader-skip body { overflow: auto !important; }

/* ========== PAGE LOADER ========== */
.page-loader {
    position: fixed; inset: 0; z-index: 99999;
    background: linear-gradient(145deg, var(--primary-dark, #0D8A78) 0%, var(--primary, #16B19B) 40%, var(--primary-light, #4ECDB8) 100%);
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    overflow: hidden;
}
.page-loader::before {
    content: '';
    position: absolute; inset: 0;
    background-image: url('../brand/patterns/wrapping-paper.jpg');
    background-size: 280px;
    opacity: 0.06;
    pointer-events: none;
}
.page-loader.hidden {
    opacity: 0; visibility: hidden; pointer-events: none;
}
.page-loader.loader-exit {
    transition: opacity 0.55s ease, visibility 0.55s ease;
}
.page-loader.loader-exit .loader-scene {
    animation: loaderSceneExit 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}
.page-loader.loader-exit .falling-letter,
.page-loader.loader-exit .falling-shape {
    animation: letterScatter 0.65s cubic-bezier(0.34, 1.1, 0.64, 1) forwards !important;
}
.page-loader.loader-exit .loader-orbs,
.page-loader.loader-exit::before {
    opacity: 0;
    transition: opacity 0.4s ease;
}
@keyframes loaderSceneExit {
    0% { transform: scale(1); opacity: 1; }
    40% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1.15); opacity: 0; filter: blur(4px); }
}
@keyframes letterScatter {
    0% { opacity: 0.3; }
    100% {
        transform: translate(var(--sx, 60px), var(--sy, -100px)) rotate(540deg) scale(0);
        opacity: 0;
    }
}
.loader-scene { text-align: center; position: relative; z-index: 2; width: 100%; max-width: 400px; padding: 2rem; }

/* Falling Arabic letters — full-screen rain */
.loader-falling-letters {
    position: absolute; inset: 0; z-index: 1;
    pointer-events: none; overflow: hidden;
}
.falling-letter {
    position: absolute;
    top: -8%;
    left: var(--left);
    font-family: var(--font-heading, 'GE SS Two', Tahoma, sans-serif);
    font-size: calc(1.25rem * var(--size, 1));
    font-weight: 700;
    color: rgba(255, 255, 255, 0.22);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: letterFall var(--dur, 6s) linear var(--delay, 0s) infinite;
    will-change: transform, opacity;
}
.falling-letter:nth-child(3n) { color: rgba(255, 204, 0, 0.18); }
.falling-letter:nth-child(5n) { color: rgba(255, 255, 255, 0.28); font-size: calc(1.5rem * var(--size, 1)); }
.falling-letter:nth-child(7n) { color: rgba(233, 51, 95, 0.15); }

/* Falling brand shapes */
.falling-shape {
    position: absolute;
    top: -10%;
    left: var(--left);
    width: calc(36px * var(--size, 1));
    height: calc(36px * var(--size, 1));
    opacity: 0.35;
    animation: shapeFall var(--dur, 7s) linear var(--delay, 0s) infinite;
    will-change: transform, opacity;
}
.falling-shape img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.1));
}
@keyframes shapeFall {
    0% {
        transform: translateY(-12vh) rotate(0deg) scale(0.6);
        opacity: 0;
    }
    10% { opacity: 0.4; }
    90% { opacity: 0.25; }
    100% {
        transform: translateY(112vh) rotate(-360deg) scale(1);
        opacity: 0;
    }
}

/* Mobile — fewer particles for performance (letters 1–22, then shapes 23+) */
@media (max-width: 768px) {
    .falling-letter:nth-child(n+13) { display: none; }
    .loader-falling-letters > span:nth-child(n+25) { display: none; }
    .loader-letter { font-size: 2.25rem; }
    .brand-logo-loader { height: 72px !important; }
}
@media (max-width: 480px) {
    .falling-letter:nth-child(n+9) { display: none; }
    .loader-falling-letters > span:nth-child(n+24) { display: none; }
    .falling-shape { width: calc(28px * var(--size, 1)); height: calc(28px * var(--size, 1)); }
}

@keyframes letterFall {
    0% {
        transform: translateY(-12vh) rotate(-15deg) scale(0.8);
        opacity: 0;
    }
    8% { opacity: 0.35; }
    85% { opacity: 0.2; }
    100% {
        transform: translateY(112vh) rotate(420deg) scale(1.05);
        opacity: 0;
    }
}

.loader-orbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb {
    position: absolute; border-radius: 50%; opacity: 0.15;
    animation: orbFloat 4s ease-in-out infinite;
}
.orb-1 { width: 120px; height: 120px; background: var(--secondary); top: 10%; right: 10%; animation-delay: 0s; }
.orb-2 { width: 80px; height: 80px; background: white; bottom: 20%; left: 5%; animation-delay: 1s; }
.orb-3 { width: 60px; height: 60px; background: var(--accent); top: 40%; left: 20%; animation-delay: 2s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -20px) scale(1.1); }
}

.loader-logo-combo {
    display: flex; align-items: center; justify-content: center; gap: 1rem;
    margin-bottom: 1.5rem; position: relative;
}
.loader-book-wrap { position: relative; }
.loader-book {
    display: flex; align-items: center; justify-content: center;
    animation: bookOpen 1.2s ease-in-out infinite alternate;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.3));
}
.loader-book-icon { width: 64px; height: 64px; color: white; stroke: white; }
.loader-book-glow {
    position: absolute; inset: -20px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--secondary-rgb),0.4) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
}
@keyframes bookOpen {
    0% { transform: rotateY(0deg) scale(1); }
    100% { transform: rotateY(15deg) scale(1.08); }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.loader-letters {
    display: flex; gap: 0.35rem; justify-content: center;
    margin-bottom: 0.5rem; direction: rtl;
}
.loader-letter {
    font-family: var(--font-heading); font-size: 2.75rem; font-weight: 700; color: white;
    opacity: 0; transform: translateY(30px) scale(0.5);
    animation: letterCombine 0.6s ease forwards;
    animation-delay: calc(var(--i) * 0.15s + 0.3s);
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
@keyframes letterCombine {
    0% { opacity: 0; transform: translateY(40px) scale(0.3) rotate(-10deg); }
    60% { opacity: 1; transform: translateY(-8px) scale(1.1) rotate(3deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.loader-brand {
    font-family: var(--font-heading); font-size: 1.75rem; color: white;
    opacity: 0; animation: fadeUp 0.5s ease 1s forwards;
}
.loader-tagline {
    color: rgba(255,255,255,0.9); font-size: 0.95rem; margin-top: 0.5rem;
    opacity: 0; animation: fadeUp 0.5s ease 1.1s forwards;
}
.loader-bar {
    width: 220px; height: 5px; background: rgba(255,255,255,0.2);
    border-radius: 999px; margin: 1.25rem auto 0; overflow: hidden;
    opacity: 0; animation: fadeUp 0.5s ease 1.3s forwards;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
.loader-progress {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--secondary), #fff, var(--accent));
    background-size: 200% 100%;
    border-radius: 999px;
    animation: loadProgress 1.8s ease 0.5s forwards, progressShine 1.2s ease-in-out 0.8s infinite;
}
@keyframes progressShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes loadProgress { to { width: 100%; } }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader-float-letters {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.loader-float-letters span {
    position: absolute; font-family: var(--font-heading); font-size: 1.5rem;
    color: rgba(255,255,255,0.12); animation: floatLetter 6s ease-in-out infinite;
}
.loader-float-letters span:nth-child(1) { top: 15%; right: 8%; animation-delay: 0s; }
.loader-float-letters span:nth-child(2) { top: 70%; right: 15%; animation-delay: 1s; }
.loader-float-letters span:nth-child(3) { top: 25%; left: 10%; animation-delay: 2s; }
.loader-float-letters span:nth-child(4) { bottom: 15%; left: 20%; animation-delay: 0.5s; }
.loader-float-letters span:nth-child(5) { top: 50%; right: 5%; animation-delay: 1.5s; }
.loader-float-letters span:nth-child(6) { bottom: 30%; right: 25%; animation-delay: 2.5s; }
@keyframes floatLetter {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.12; }
    50% { transform: translateY(-20px) rotate(10deg); opacity: 0.25; }
}

/* ========== AUTH CHARACTERS ========== */
.auth-page-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
    align-items: center; min-height: calc(100vh - 200px); max-width: 1100px; margin: 0 auto;
}
.auth-characters {
    position: relative; min-height: 480px; padding: 2rem;
    background: linear-gradient(160deg, rgba(var(--primary-rgb),0.08) 0%, rgba(var(--secondary-rgb),0.15) 100%);
    border-radius: 24px; overflow: hidden;
}
.auth-scene-bg { position: absolute; inset: 0; pointer-events: none; }
.floating-char {
    position: absolute; opacity: 0.35;
    left: var(--x); animation: floatChar 4s ease-in-out infinite;
    animation-delay: var(--d);
}
.float-icon { width: 28px; height: 28px; color: var(--primary); }
@keyframes floatChar {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(8deg); }
}

.character {
    position: absolute; text-align: center;
    animation: characterEnter 0.8s ease var(--delay) both;
}
@keyframes characterEnter {
    from { opacity: 0; transform: translateY(30px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.character-teacher { top: 8%; right: 10%; }
.character-child { top: 35%; right: 45%; }
.character-boy { bottom: 25%; right: 8%; }
.character-book { bottom: 15%; left: 10%; }

.character-avatar { position: relative; display: inline-block; }
.avatar-circle {
    width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb),0.18);
    border: 3px solid white;
    animation: characterBounce 2s ease-in-out infinite;
}
.avatar-icon { width: 36px; height: 36px; }
.avatar-teacher { background: linear-gradient(145deg, var(--primary-light), var(--primary-dark)); color: white; }
.avatar-teacher .avatar-icon { stroke: white; }
.avatar-child { background: linear-gradient(145deg, #E9C46A, #f4a261); color: #5c4a1a; }
.avatar-boy { background: linear-gradient(145deg, #90be6d, #43aa8b); color: white; }
.avatar-boy .avatar-icon { stroke: white; }
.avatar-book { background: linear-gradient(145deg, #fff, #f0f7f4); color: var(--primary); }
.character-teacher .avatar-circle { animation-delay: 0s; }
.character-child .avatar-circle { animation-delay: 0.3s; }
.character-boy .avatar-circle { animation-delay: 0.6s; }
.book-avatar .avatar-circle { animation: bookWiggle 2s ease-in-out infinite; width: 64px; height: 64px; }

.char-wave-hand {
    position: absolute; top: -2px; left: -18px;
    transform-origin: bottom right;
    animation: waveHand 1.2s ease-in-out infinite;
}
.wave-icon { width: 22px; height: 22px; color: var(--accent); }
@keyframes characterBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes bookWiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.character-teacher .char-wave-hand { animation-delay: 0s; }
.character-child .char-wave-hand { animation-delay: 0.2s; }
.character-boy .char-wave-hand { animation-delay: 0.4s; }
@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

.character-speech {
    background: white; padding: 0.4rem 0.85rem; border-radius: 16px;
    font-size: 0.8rem; font-weight: 600; color: var(--primary);
    margin-top: 0.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    animation: speechPop 0.5s ease var(--delay) both;
    position: relative;
}
.character-speech::after {
    content: ''; position: absolute; bottom: -6px; right: 50%; transform: translateX(50%);
    border: 6px solid transparent; border-top-color: white;
}
@keyframes speechPop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
.character-name { font-size: 0.75rem; color: #888; margin-top: 0.25rem; }

.auth-welcome-text {
    position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    text-align: center; width: 90%;
}
.auth-welcome-text h2 { font-size: 1.35rem; color: var(--primary); margin-bottom: 0.25rem; }
.auth-welcome-text p { font-size: 0.9rem; color: #666; }

.auth-box-enhanced {
    background: white; padding: 2.5rem; border-radius: 24px;
    box-shadow: 0 20px 60px rgba(var(--primary-rgb),0.12);
    animation: authBoxEnter 0.7s ease 0.2s both;
}
@keyframes authBoxEnter {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1; transform: translateY(0);
}
.reveal-left { transform: translateX(40px); }
.reveal-left.visible { transform: translateX(0); }
.reveal-right { transform: translateX(-40px); }
.reveal-right.visible { transform: translateX(0); }
.reveal-scale { transform: scale(0.92); }
.reveal-scale.visible { transform: scale(1); }

/* Stagger children */
.stagger-children > * {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > * { opacity: 1; transform: translateY(0); }

/* ========== INTERACTIVE ELEMENTS ========== */
.site-header {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(var(--primary-rgb),0.12);
}
.site-header.header-hidden {
    transform: translateY(-100%);
}

.logo-icon { display: inline-block; transition: transform 0.4s ease; }
.logo:hover .logo-icon { transform: rotate(-8deg) scale(1.1); }

.btn {
    position: relative; overflow: hidden;
}
.btn .ripple {
    position: absolute; border-radius: 50%; background: rgba(255,255,255,0.4);
    transform: scale(0); animation: rippleAnim 0.6s ease-out; pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

.product-card, .game-card, .feature-card {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.product-card:hover, .game-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.hero-text h1 .highlight-word {
    display: inline-block; color: var(--primary);
    animation: highlightPop 0.8s ease 1.5s both;
}
@keyframes highlightPop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Floating letters in hero */
.hero-floating-letters {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.hero-floating-letters span {
    position: absolute; font-family: var(--font-heading); font-size: 2rem;
    color: rgba(var(--primary-rgb),0.08); font-weight: 700;
    animation: heroLetterFloat 8s ease-in-out infinite;
}
.hero-floating-letters span:nth-child(1) { top: 10%; right: 5%; animation-delay: 0s; }
.hero-floating-letters span:nth-child(2) { top: 60%; right: 15%; animation-delay: 2s; font-size: 2.5rem; }
.hero-floating-letters span:nth-child(3) { top: 30%; left: 8%; animation-delay: 1s; }
.hero-floating-letters span:nth-child(4) { bottom: 20%; left: 15%; animation-delay: 3s; }
.hero-floating-letters span:nth-child(5) { top: 45%; right: 40%; animation-delay: 1.5s; font-size: 1.5rem; }
@keyframes heroLetterFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.08; }
    33% { transform: translate(10px, -15px) rotate(5deg); opacity: 0.15; }
    66% { transform: translate(-8px, 10px) rotate(-3deg); opacity: 0.1; }
}

/* Input focus glow */
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.15);
    transform: translateY(-1px);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

/* Cart bounce */
.cart-count.bounce { animation: cartBounce 0.5s ease; }
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* ========== CHATBOT ========== */
.chatbot-widget {
    position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 9998;
    font-family: var(--font-body);
}
.chatbot-toggle {
    width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white;
    font-size: 1.5rem; box-shadow: 0 6px 25px rgba(var(--primary-rgb),0.4);
    position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}
.chatbot-toggle:hover { transform: scale(1.08); box-shadow: 0 8px 30px rgba(var(--primary-rgb),0.5); }
.chatbot-toggle .icon { stroke: white; }
.chatbot-toggle .chat-close { display: none; }
.chatbot-widget.open .chatbot-toggle .chat-open { display: none; }
.chatbot-widget.open .chatbot-toggle .chat-close { display: flex; }
.chatbot-pulse {
    position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid var(--primary); animation: chatPulse 2s ease-out infinite;
    pointer-events: none;
}
.chatbot-widget.open .chatbot-pulse { display: none; }
@keyframes chatPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.chatbot-panel {
    position: absolute; bottom: 75px; left: 0; width: 360px; max-width: calc(100vw - 2rem);
    background: white; border-radius: 20px; box-shadow: 0 15px 50px rgba(0,0,0,0.18);
    display: flex; flex-direction: column; max-height: 520px;
    opacity: 0; visibility: hidden; transform: translateY(20px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chatbot-widget.open .chatbot-panel {
    opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}

.chatbot-header {
    display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white;
    border-radius: 20px 20px 0 0;
}
.chatbot-avatar {
    width: 42px; height: 42px; background: rgba(255,255,255,0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.chatbot-avatar .icon { stroke: white; }
.chatbot-header strong { display: block; font-size: 0.95rem; }
.chatbot-status { font-size: 0.75rem; opacity: 0.9; display: flex; align-items: center; gap: 0.35rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #90be6d; display: inline-block; box-shadow: 0 0 6px #90be6d; }
.chatbot-close-btn {
    margin-right: auto; background: rgba(255,255,255,0.2); border: none; color: white;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.chatbot-close-btn .icon { stroke: white; }

.chatbot-messages {
    flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem;
    min-height: 200px; max-height: 280px;
}
.chat-msg { display: flex; gap: 0.5rem; animation: msgSlide 0.35s ease; }
@keyframes msgSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.bot-msg { align-self: flex-start; }
.user-msg { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar {
    width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%;
    background: rgba(var(--primary-rgb),0.1); display: flex; align-items: center; justify-content: center;
    color: var(--primary);
}
.msg-bubble {
    padding: 0.65rem 1rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.6;
    max-width: 85%; white-space: pre-wrap;
}
.bot-msg .msg-bubble { background: #f0f4f2; color: var(--text); border-bottom-right-radius: 4px; }
.user-msg .msg-bubble { background: var(--primary); color: white; border-bottom-left-radius: 4px; }

.chatbot-quick {
    padding: 0.5rem 1rem; display: flex; flex-wrap: wrap; gap: 0.35rem;
    border-top: 1px solid #eee;
}
.quick-q-btn {
    padding: 0.35rem 0.65rem; border: 1px solid rgba(var(--primary-rgb),0.3); background: white;
    border-radius: 20px; font-size: 0.75rem; cursor: pointer; font-family: inherit;
    color: var(--primary); transition: all 0.2s;
}
.quick-q-btn:hover { background: rgba(var(--primary-rgb),0.1); }

.chatbot-input {
    display: flex; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid #eee;
}
.chatbot-input input {
    flex: 1; padding: 0.65rem 1rem; border: 1px solid #ddd; border-radius: 24px;
    font-family: inherit; font-size: 0.9rem; outline: none;
}
.chatbot-input input:focus { border-color: var(--primary); }
.chatbot-input button {
    width: 42px; height: 42px; border-radius: 50%; border: none;
    background: var(--primary); color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.chatbot-input button .icon { stroke: white; }
.chatbot-input button:hover { transform: scale(1.05); }

.typing-indicator {
    display: flex; gap: 4px; padding: 0.75rem 1rem;
}
.typing-indicator span {
    width: 8px; height: 8px; background: #aaa; border-radius: 50%;
    animation: typingDot 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-6px); opacity: 1; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .auth-page-layout { grid-template-columns: 1fr; }
    .auth-characters { min-height: 280px; order: -1; }
    .character-teacher { top: 5%; right: 5%; }
    .character-child { top: 30%; right: 35%; }
    .character-boy { bottom: 20%; right: 5%; }
    .character-book { display: none; }
    .char-face { font-size: 2.5rem; }
    .auth-welcome-text { position: relative; bottom: auto; margin-top: 1rem; transform: none; left: auto; }
    .chatbot-panel { width: calc(100vw - 2rem); left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .page-loader { display: none !important; }
    .loader-falling-letters { display: none; }
}
