/* TypingMoja — কাস্টম স্টাইল ও অ্যানিমেশন (Tailwind ইউটিলিটির সাথে ব্যবহার হয়) */
[x-cloak] { display: none !important; }

html, body { -webkit-tap-highlight-color: transparent; }
body { font-family: 'Hind Siliguri', 'Poppins', ui-sans-serif, system-ui, sans-serif; color: #0f172a; }

.bg-app {
    background:
        radial-gradient(900px 500px at 0% 0%, rgba(147, 197, 253, .35), transparent 60%),
        radial-gradient(800px 500px at 100% 100%, rgba(165, 180, 252, .30), transparent 60%),
        #f4f8ff;
}

/* ---------- অ্যানিমেশন ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes blink { 50% { opacity: .35; } }

.anim-fade-up { animation: fadeUp .55s cubic-bezier(.2, .7, .2, 1) both; }
.anim-fade-in { animation: fadeIn .4s ease both; }
.anim-pop { animation: popIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.anim-slide-in { animation: slideIn .4s cubic-bezier(.2, .8, .2, 1) both; }
.live-dot { animation: pulseRing 1.6s infinite; }
.timer-warn { color: #dc2626; animation: blink 1s infinite; }

/* ---------- কার্ড ও বাটন ---------- */
.lab-card {
    background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
    border: 1px solid #dbe7fb;
    border-radius: 1.1rem;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    position: relative;
    overflow: hidden;
}
.lab-card::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .7) 50%, transparent 60%);
    background-size: 200% 100%; background-position: -200% 0;
}
.lab-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .35); border-color: #93c5fd; }
.lab-card:hover::after { animation: shine 1.1s ease; }

/* ---------- টাইপিং শুরু কার্ড ---------- */
.practice-card { will-change: transform; }
.practice-card:hover .w-10.h-10 { transform: scale(1.12) rotate(-4deg); }
.practice-card .w-10.h-10 { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }

.btn-lang {
    display: inline-flex; align-items: center; justify-content: center; width: 100%;
    padding: .55rem 1rem; border-radius: 999px; color: #fff; font-weight: 600; font-family: 'Poppins', 'Hind Siliguri', sans-serif;
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35);
    transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.btn-lang:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn-lang:active { transform: translateY(0) scale(.98); }
.btn-bn { background: linear-gradient(90deg, #22c55e, #84cc16); }
.btn-en { background: linear-gradient(90deg, #0284c7, #7dd3fc); }
.btn-lang.disabled { filter: grayscale(1); opacity: .5; pointer-events: none; }

.btn-primary {
    background: linear-gradient(90deg, #2563eb, #3b82f6); color: #fff; font-weight: 700;
    border-radius: 1rem; padding: .85rem 1rem; width: 100%;
    box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .8);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-primary:active { transform: scale(.985); }

.field {
    width: 100%; border: 1px solid #dbe3f0; background: #fff; border-radius: .9rem;
    padding: .7rem .95rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field:focus { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }

/* ---------- সাইডবার ---------- */
.side-link {
    display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: .9rem;
    color: #e2e8f0; background: rgba(255, 255, 255, .07); font-weight: 600;
    transition: background .2s ease, transform .2s ease;
}
.side-link:hover { background: rgba(255, 255, 255, .16); transform: translateX(3px); }
.side-link.active { background: #fff; color: #1f3f7f; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .5); }
.side-ico { width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center; background: #fff; font-size: 1rem; flex: none; }

/* ---------- টাইপিং পেজ ---------- */
.pw { border-radius: .3rem; padding: 0 .08rem; transition: background .12s ease; }
.pw.cur { background: #fde68a; box-shadow: 0 0 0 2px #fde68a; }
#passage { scroll-behavior: smooth; }
#passage::-webkit-scrollbar, #typing-area::-webkit-scrollbar { width: 8px; }
#passage::-webkit-scrollbar-thumb, #typing-area::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
dialog#confirm-dialog { border: 0; border-radius: 1.2rem; padding: 0; max-width: 92vw; width: 26rem; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .55); }
dialog#confirm-dialog::backdrop { background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
dialog#confirm-dialog[open] { animation: popIn .25s ease both; }

/* ---------- ডিফ হাইলাইট ---------- */
.d-wrong { background: #fee2e2; color: #b91c1c; border-radius: .3rem; padding: 0 .2rem; text-decoration: underline wavy #ef4444; text-underline-offset: 3px; }
.d-extra { background: #fee2e2; color: #b91c1c; border-radius: .3rem; padding: 0 .2rem; text-decoration: line-through; }
.d-expect { background: #dcfce7; color: #166534; border-radius: .3rem; padding: 0 .2rem; }
.d-missed { background: #ffedd5; color: #c2410c; border-radius: .3rem; padding: 0 .2rem; }
.d-rest { color: #94a3b8; }

/* ---------- কালারফুল স্ক্রলিং মার্কি ---------- */
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-bar {
    overflow: hidden; white-space: nowrap; position: relative;
    background: linear-gradient(90deg, #1e293b, #1f3f7f 35%, #4338ca 65%, #1e293b);
    background-size: 200% 100%;
    animation: marquee-bg-shift 8s linear infinite;
}
@keyframes marquee-bg-shift { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }
.marquee-track { display: inline-flex; align-items: center; animation: marquee-scroll 26s linear infinite; }
.marquee-bar:hover .marquee-track { animation-play-state: paused; }
.marquee-text {
    padding: 0 2.5rem; font-weight: 700; font-size: .92rem; letter-spacing: .01em;
    background: linear-gradient(90deg, #fde68a, #f472b6, #93c5fd, #86efac, #fde68a);
    background-size: 300% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: shine 6s linear infinite;
}

/* ---------- হিরো / গ্র্যাডিয়েন্ট ব্লব ব্যাকগ্রাউন্ড ---------- */
@keyframes blobFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(20px, -15px) scale(1.08); } 66% { transform: translate(-15px, 15px) scale(0.95); } }
.hero-blob { position: absolute; border-radius: 999px; filter: blur(40px); opacity: .55; animation: blobFloat 10s ease-in-out infinite; pointer-events: none; }

/* ---------- কাউন্ট-আপ সংখ্যা ---------- */
.count-up { font-variant-numeric: tabular-nums; }

/* ---------- কনফেটি (পাস উদযাপন) ---------- */
@keyframes confetti-fall { 0% { transform: translateY(-10px) rotate(0deg); opacity: 1; } 100% { transform: translateY(110vh) rotate(540deg); opacity: 0; } }
.confetti-piece { position: fixed; top: -12px; width: 9px; height: 14px; z-index: 80; pointer-events: none; animation: confetti-fall linear forwards; border-radius: 2px; }

/* ---------- চকচকে (glow) হোভার বর্ডার ---------- */
@keyframes borderGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, .35); } 50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); } }
.glow-ring { animation: borderGlow 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
