/* ==========================================================
   NÖROHAFIZA – TASARIM SİSTEMİ
   Koyu lacivert zemin, turkuaz / mor / mavi geçişler.
   Bilişsel yükü azaltmak için: büyük dokunma alanları, sakin
   animasyonlar, kapatılabilir efektler ve sade görünüm modu.
   ========================================================== */

:root {
    --primary: #0b1733;
    --primary-2: #0d1b3e;
    --primary-light: #162a56;
    --surface: rgba(22, 42, 86, 0.55);
    --surface-solid: #13244a;
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-blue: #60a5fa;
    --accent-teal: #2dd4bf;
    --accent-green: #34d399;
    --accent-orange: #fbbf24;
    --accent-pink: #f472b6;
    --accent-red: #f87171;
    --text-primary: #e8eef8;
    --text-muted: #9fb0c8;
    --card-bg: rgba(22, 42, 86, 0.68);
    --card-border: rgba(34, 211, 238, 0.16);
    --sidebar-width: 268px;
    --topbar-height: 68px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 28px rgba(34, 211, 238, 0.12);
    --radius: 18px;
    --radius-sm: 12px;
    --focus-ring: 0 0 0 3px #0b1733, 0 0 0 6px #fbbf24;
    --font-scale: 1;
    --tile-size: 112px;
}

/* ============ BASE ============ */
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--font-scale)); scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    margin: 0;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 10%, rgba(167,139,250,0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 85%, rgba(34,211,238,0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(96,165,250,0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent-cyan); }
a:hover { color: var(--accent-blue); }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.01em; }

:focus-visible { outline: none; box-shadow: var(--focus-ring) !important; border-radius: 8px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 5000;
    background: var(--accent-orange); color: #000; font-weight: 700;
    padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #000; }

.text-gradient {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-muted-custom { color: var(--text-muted) !important; }
.link-accent { color: var(--accent-cyan); font-weight: 600; text-decoration: none; }
.link-accent:hover { text-decoration: underline; }
.small-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: var(--text-muted); }

/* ============ SIDEBAR ============ */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-width); height: 100vh;
    background: linear-gradient(180deg, #081227 0%, #0b1733 100%);
    border-right: 1px solid var(--card-border);
    display: flex; flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px; border-bottom: 1px solid var(--card-border);
    text-decoration: none;
}
.brand-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 13px; display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: #fff; box-shadow: 0 4px 16px rgba(34,211,238,0.25);
}
.brand-text { font-size: 1.15rem; font-weight: 800; }
.brand-sub { display: block; font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }

.sidebar-nav { list-style: none; padding: 10px 0; margin: 0; flex: 1; overflow-y: auto; }
.nav-divider {
    padding: 14px 22px 4px; font-size: 0.66rem; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700;
}
.nav-link {
    display: flex; align-items: center; gap: 13px;
    padding: 11px 16px; margin: 2px 12px; min-height: 46px;
    color: var(--text-muted) !important; text-decoration: none;
    border-radius: 12px; font-size: 0.93rem; font-weight: 500;
    transition: var(--transition); border: 1px solid transparent;
}
.nav-link i { width: 22px; text-align: center; font-size: 1rem; }
.nav-link:hover { background: rgba(34,211,238,0.08); color: var(--text-primary) !important; }
.nav-link.active {
    background: linear-gradient(90deg, rgba(34,211,238,0.16), rgba(167,139,250,0.10));
    color: var(--accent-cyan) !important; border-color: rgba(34,211,238,0.3); font-weight: 700;
}
.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--card-border); }
.sidebar-backdrop { display: none; }

/* ============ MAIN / TOPBAR ============ */
.main-content {
    margin-left: var(--sidebar-width); min-height: 100vh;
    display: flex; flex-direction: column; position: relative; z-index: 1;
}

.topbar {
    height: var(--topbar-height);
    background: rgba(8, 18, 39, 0.97);
    border-bottom: 1px solid var(--card-border);
    display: flex; align-items: center; gap: 12px;
    padding: 0 24px; position: sticky; top: 0; z-index: 100;
}
.topbar-title { flex: 1; font-size: 1.1rem; font-weight: 700; margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    width: 46px; height: 46px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(34,211,238,0.07); border: 1px solid var(--card-border);
    color: var(--text-primary); position: relative; transition: var(--transition);
    font-size: 1.05rem; cursor: pointer;
}
.icon-btn:hover { background: rgba(34,211,238,0.15); color: var(--accent-cyan); }
.icon-btn .dot {
    position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px;
    background: var(--accent-red); color: #fff; font-size: 0.65rem; font-weight: 800;
    border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.sidebar-toggle { display: none; }

.user-btn {
    display: flex; align-items: center; gap: 10px;
    background: rgba(34,211,238,0.07); border: 1px solid var(--card-border);
    color: var(--text-primary); padding: 6px 12px 6px 6px; border-radius: 14px; min-height: 46px;
}
.user-btn:hover { color: var(--text-primary); background: rgba(34,211,238,0.14); }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; position: relative;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-xl { width: 84px; height: 84px; font-size: 2rem; box-shadow: 0 8px 26px rgba(34,211,238,0.25); border: 3px solid rgba(255,255,255,0.12); }
.avatar-xxl { width: 132px; height: 132px; font-size: 3rem; }

.page-content { flex: 1; padding: 28px; max-width: 1440px; width: 100%; margin: 0 auto; }

.app-footer {
    padding: 18px 28px; font-size: 0.78rem; color: var(--text-muted);
    border-top: 1px solid var(--card-border); text-align: center;
}

/* ============ CARDS ============ */
/* Kartlarda backdrop-filter kullanılmaz: zemin zaten koyu ve düz, bulanıklık kaydırmada takılmaya yol açar. */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border); border-radius: var(--radius);
    padding: 24px; position: relative; overflow: hidden; transition: var(--transition);
}
.glass-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,0.4), transparent);
}
.page-hero {
    border-radius: 22px; padding: 28px 30px; margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(34,211,238,0.10), rgba(167,139,250,0.10));
    border: 1px solid rgba(34,211,238,0.22);
    display: flex; align-items: center; gap: 22px; flex-wrap: wrap; position: relative; overflow: hidden;
}
.page-hero .hero-emoji {
    font-size: 3.2rem; width: 86px; height: 86px; border-radius: 22px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
}
.page-hero h1 { font-size: 1.9rem; margin: 0 0 4px; }
.page-hero p { color: var(--text-muted); margin: 0; font-size: 1.02rem; }
.page-hero .hero-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.stat-card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius);
    padding: 18px 20px; display: flex; align-items: center; gap: 16px; height: 100%;
}
.stat-icon {
    width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }

.gradient-cyan { background: linear-gradient(135deg, #22d3ee22, #0ea5e922); color: var(--accent-cyan); border: 1px solid #22d3ee33; }
.gradient-purple { background: linear-gradient(135deg, #a78bfa22, #8b5cf622); color: var(--accent-purple); border: 1px solid #a78bfa33; }
.gradient-blue { background: linear-gradient(135deg, #60a5fa22, #3b82f622); color: var(--accent-blue); border: 1px solid #60a5fa33; }
.gradient-teal { background: linear-gradient(135deg, #2dd4bf22, #14b8a622); color: var(--accent-teal); border: 1px solid #2dd4bf33; }
.gradient-green { background: linear-gradient(135deg, #34d39922, #10b98122); color: var(--accent-green); border: 1px solid #34d39933; }
.gradient-orange { background: linear-gradient(135deg, #fbbf2422, #f59e0b22); color: var(--accent-orange); border: 1px solid #fbbf2433; }
.gradient-pink { background: linear-gradient(135deg, #f472b622, #ec489922); color: var(--accent-pink); border: 1px solid #f472b633; }

/* ============ BUTTONS ============ */
.btn-primary-custom, .btn-secondary-custom, .btn-ghost, .btn-danger-soft {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    min-height: 48px; padding: 11px 22px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 0.97rem; cursor: pointer; text-decoration: none;
    transition: var(--transition); border: 1px solid transparent; line-height: 1.2;
}
.btn-primary-custom { background: linear-gradient(135deg, #06b6d4, #3b82f6); color: #fff; }
.btn-primary-custom:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(34,211,238,0.3); }
.btn-secondary-custom { background: rgba(167,139,250,0.14); color: #c4b5fd; border-color: rgba(167,139,250,0.35); }
.btn-secondary-custom:hover { background: rgba(167,139,250,0.24); color: #ddd6fe; }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--text-primary); border-color: rgba(255,255,255,0.12); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.btn-danger-soft { background: rgba(248,113,113,0.12); color: var(--accent-red); border-color: rgba(248,113,113,0.35); }
.btn-danger-soft:hover { background: rgba(248,113,113,0.22); color: #fecaca; }
.btn-xl { min-height: 58px; font-size: 1.08rem; padding: 14px 28px; border-radius: 14px; }
.btn-sm-custom { min-height: 38px; padding: 6px 14px; font-size: 0.85rem; }
button:disabled, .btn-primary-custom[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none !important; }

.speak-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
    padding: 6px 14px; border-radius: 999px; cursor: pointer;
    background: rgba(251,191,36,0.12); color: var(--accent-orange);
    border: 1px solid rgba(251,191,36,0.35); font-weight: 700; font-size: 0.85rem;
}
.speak-btn:hover { background: rgba(251,191,36,0.22); }
.speak-btn.speaking { animation: pulse-soft 1.4s ease-in-out infinite; }

/* ============ PROGRESS ============ */
.progress-custom { height: 10px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.progress-bar-custom {
    height: 100%; border-radius: 999px; width: 0;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-bar-custom.green { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-bar-custom.orange { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.goal-ring { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.goal-ring svg { transform: rotate(-90deg); }
.goal-ring circle { transition: stroke-dashoffset 1.2s ease; }
.goal-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.goal-ring-percent { font-size: 1.7rem; font-weight: 800; color: var(--accent-cyan); line-height: 1; }
.goal-ring-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

/* ============ SECTION HEADER ============ */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 11px; margin: 0; }
.section-title .icon-bg { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.section-link { font-size: 0.88rem; color: var(--accent-cyan); text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.section-link:hover { color: var(--accent-blue); }

/* ============ ACTIVITY CARDS ============ */
.activity-card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius);
    padding: 20px; color: var(--text-primary); text-decoration: none; height: 100%;
    display: flex; flex-direction: column; gap: 10px; transition: var(--transition); position: relative;
}
a.activity-card:hover, a.activity-card:focus-visible { border-color: var(--accent-cyan); box-shadow: 0 8px 26px rgba(34,211,238,0.14); color: var(--text-primary); transform: translateY(-3px); }
.activity-emoji {
    width: 64px; height: 64px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
}
.activity-emoji img { width: 40px; height: 40px; }
.activity-title { font-size: 1.05rem; font-weight: 800; margin: 0; }
.activity-desc { font-size: 0.88rem; color: var(--text-muted); margin: 0; flex: 1; }
.activity-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 0.78rem; color: var(--text-muted); }

.difficulty-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.difficulty-1 { background: rgba(52,211,153,0.15); color: var(--accent-green); }
.difficulty-2 { background: rgba(251,191,36,0.15); color: var(--accent-orange); }
.difficulty-3 { background: rgba(248,113,113,0.15); color: var(--accent-red); }

.badge-soft { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; background: rgba(255,255,255,0.07); color: var(--text-muted); }
.badge-cyan { background: rgba(34,211,238,0.15); color: var(--accent-cyan); padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.badge-purple { background: rgba(167,139,250,0.15); color: var(--accent-purple); padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.badge-green { background: rgba(52,211,153,0.15); color: var(--accent-green); padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.badge-orange { background: rgba(251,191,36,0.15); color: var(--accent-orange); padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }
.badge-red { background: rgba(248,113,113,0.15); color: var(--accent-red); padding: 4px 11px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; }

.difficulty-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.difficulty-picker a {
    flex: 1; min-width: 80px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 0.86rem; border: 1px solid var(--card-border);
    color: var(--text-primary); background: rgba(255,255,255,0.04);
}
.difficulty-picker a:hover { border-color: var(--accent-cyan); }
.difficulty-picker a.recommended { border-color: var(--accent-cyan); background: rgba(34,211,238,0.12); color: var(--accent-cyan); }

/* ============ DASHBOARD ============ */
.welcome-card {
    border-radius: 24px; padding: 28px; margin-bottom: 24px; position: relative; overflow: hidden;
    background: linear-gradient(120deg, rgba(34,211,238,0.12), rgba(167,139,250,0.12) 60%, rgba(96,165,250,0.08));
    border: 1px solid rgba(34,211,238,0.25);
}
.welcome-card h1 { font-size: 1.9rem; margin: 0; }
.welcome-card .date-line { color: var(--text-muted); font-size: 1rem; }
.welcome-art { position: absolute; right: -10px; bottom: -30px; font-size: 9rem; opacity: 0.1; pointer-events: none; }
.streak-pill {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 16px;
    background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3);
}
.streak-pill .num { font-size: 1.6rem; font-weight: 800; color: var(--accent-orange); line-height: 1; }

.online-dot {
    position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%;
    background: #22c55e; border: 2px solid #0b1733; box-shadow: 0 0 8px rgba(34,197,94,0.8);
}
.announcement-bar {
    display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px; font-weight: 700;
    background: linear-gradient(90deg, rgba(167,139,250,0.18), rgba(34,211,238,0.12)); border: 1px solid rgba(167,139,250,0.4);
}
.announcement-bar span:first-child { font-size: 1.4rem; }
.reminder-card {
    border-radius: var(--radius); padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start;
    background: linear-gradient(135deg, rgba(251,191,36,0.10), rgba(244,114,182,0.06));
    border: 1px solid rgba(251,191,36,0.3);
}
.reminder-card .r-icon { font-size: 2rem; }

.list-row {
    display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    text-decoration: none; color: var(--text-primary); transition: var(--transition); min-height: 60px;
}
a.list-row:hover { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.3); color: var(--text-primary); }
.list-row .lr-emoji { font-size: 1.6rem; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.05); flex-shrink: 0; }
.list-row .lr-body { flex: 1; min-width: 0; }
.list-row .lr-title { font-weight: 700; font-size: 0.95rem; }
.list-row .lr-sub { font-size: 0.8rem; color: var(--text-muted); }
.list-row.done { opacity: 0.65; }
.list-row.done .lr-title { text-decoration: line-through; }
.stack-gap { display: flex; flex-direction: column; gap: 10px; }

.module-card {
    border-radius: var(--radius); padding: 22px; height: 100%; display: flex; flex-direction: column; gap: 12px;
    background: var(--card-bg); border: 1px solid var(--card-border); text-decoration: none; color: var(--text-primary);
    transition: var(--transition);
}
.module-card:hover { color: var(--text-primary); border-color: var(--accent-cyan); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.module-icon { width: 58px; height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }

.achievement {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 10px;
    border-radius: 16px; background: rgba(251,191,36,0.07); border: 1px solid rgba(251,191,36,0.2); height: 100%;
}
.achievement .a-icon { font-size: 2.1rem; }
.achievement .a-title { font-weight: 800; font-size: 0.86rem; }
.achievement .a-desc { font-size: 0.74rem; color: var(--text-muted); }

.empty-state { text-align: center; padding: 28px 16px; color: var(--text-muted); }
.empty-state .es-emoji { font-size: 2.6rem; display: block; margin-bottom: 8px; }

.chart-container { position: relative; height: 240px; }
.chart-container.tall { height: 300px; }

.disclaimer {
    font-size: 0.8rem; color: var(--text-muted); padding: 12px 16px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.14);
}

/* ============ FORMS ============ */
.form-label { font-size: 0.88rem; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.form-control, .form-select {
    background-color: rgba(255,255,255,0.05); border: 1px solid rgba(159,176,200,0.28);
    border-radius: 12px; color: var(--text-primary); padding: 11px 14px; font-size: 1rem; min-height: 48px;
}
.form-control:focus, .form-select:focus {
    background-color: rgba(34,211,238,0.05); border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(34,211,238,0.18); color: var(--text-primary);
}
.form-control::placeholder { color: #7286a3; }
.form-select option { background: var(--primary-2); color: var(--text-primary); }
.form-check-input { width: 1.25em; height: 1.25em; }
.form-check-input:checked { background-color: #06b6d4; border-color: #06b6d4; }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.field-error, .field-validation-error { color: var(--accent-red); font-size: 0.82rem; font-weight: 600; display: block; margin-top: 4px; }
.validation-box:empty, .validation-summary-valid { display: none; }
.validation-box ul { margin: 0; padding-left: 18px; }
.validation-box, .validation-summary-errors {
    background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.4); color: #fecaca;
    border-radius: 12px; padding: 12px 16px; font-weight: 600;
}
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); width: 40px; height: 40px; }

/* ============ FEEDBACK ============ */
.feedback-correct, .feedback-wrong, .feedback-info {
    border-radius: 14px; padding: 14px 18px; font-weight: 600; display: flex; align-items: flex-start; gap: 10px;
}
.feedback-correct { background: rgba(52,211,153,0.13); border: 1px solid rgba(52,211,153,0.5); color: #a7f3d0; }
.feedback-wrong { background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.45); color: #fde68a; }
.feedback-info { background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.4); color: #bfdbfe; }
.feedback-correct i, .feedback-wrong i, .feedback-info i { margin-top: 3px; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 4000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.nh-toast {
    background: #0f1f42; border: 1px solid var(--card-border); border-left: 4px solid var(--accent-cyan);
    border-radius: 14px; padding: 14px 16px; box-shadow: 0 14px 40px rgba(0,0,0,0.45);
    display: flex; gap: 12px; align-items: flex-start; font-weight: 600; animation: toast-in 0.3s ease;
}
.nh-toast.success { border-left-color: var(--accent-green); }
.nh-toast.warning { border-left-color: var(--accent-orange); }
.nh-toast.error { border-left-color: var(--accent-red); }
.nh-toast .t-icon { font-size: 1.4rem; line-height: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.celebrate-overlay {
    position: fixed; inset: 0; z-index: 4500; display: flex; align-items: center; justify-content: center;
    background: rgba(5,12,28,0.55); backdrop-filter: blur(3px);
}
.celebrate-box { text-align: center; }
.celebrate-box .lottie-host { width: 170px; height: 170px; margin: 0 auto; }
.celebrate-box .c-text { font-size: 1.4rem; font-weight: 800; margin-top: 6px; }

/* ============ NOTIFICATIONS ============ */
.notif-menu { width: min(380px, 92vw); max-height: 70vh; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; }
.notif-item:hover { background: rgba(34,211,238,0.06); }
.notif-item .n-title { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); }
.notif-item .n-msg { font-size: 0.8rem; color: var(--text-muted); }

/* ============ TABLES ============ */
.table-dark-custom { width: 100%; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--card-border); border-collapse: separate; border-spacing: 0; }
.table-dark-custom th {
    background: rgba(34,211,238,0.08); color: var(--accent-cyan); font-size: 0.76rem; text-transform: uppercase;
    letter-spacing: 0.6px; padding: 13px 14px; border-bottom: 1px solid var(--card-border); white-space: nowrap;
}
.table-dark-custom td { padding: 12px 14px; color: var(--text-primary); border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.9rem; vertical-align: middle; }
.table-dark-custom tr:last-child td { border-bottom: none; }
.table-dark-custom tbody tr:hover td { background: rgba(34,211,238,0.04); }

/* ============ DROPDOWN / OFFCANVAS ============ */
.dropdown-menu { background: #0d1b3e; border: 1px solid var(--card-border); border-radius: 14px; padding: 8px; box-shadow: 0 14px 40px rgba(0,0,0,0.5); }
.dropdown-item { color: var(--text-primary); border-radius: 9px; padding: 9px 12px; font-size: 0.92rem; }
.dropdown-item:hover, .dropdown-item:focus { background: rgba(34,211,238,0.1); color: var(--text-primary); }
.dropdown-divider { border-color: var(--card-border); }
.offcanvas { background: #0b1733; color: var(--text-primary); border-color: var(--card-border) !important; }
.offcanvas-header { border-bottom: 1px solid var(--card-border); }
.btn-close { filter: invert(1); }
.modal-content { background: #0d1b3e; border: 1px solid var(--card-border); border-radius: 18px; color: var(--text-primary); }
.modal-header, .modal-footer { border-color: var(--card-border); }

.setting-row {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 4px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.setting-row .s-text strong { display: block; font-size: 0.98rem; }
.setting-row .s-text small { color: var(--text-muted); }

/* ============ AUTH ============ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1; }
.auth-decor { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35; animation: float 12s ease-in-out infinite; will-change: transform; }
.orb-1 { width: 380px; height: 380px; background: #0891b2; top: -100px; left: -80px; }
.orb-2 { width: 320px; height: 320px; background: #7c3aed; bottom: -100px; right: -60px; animation-delay: -4s; }
.orb-3 { width: 220px; height: 220px; background: #2563eb; top: 40%; left: 45%; animation-delay: -8s; opacity: 0.2; }
.auth-split { display: flex; gap: 48px; align-items: center; max-width: 1100px; width: 100%; justify-content: center; position: relative; }
.auth-hero { flex-direction: column; gap: 16px; max-width: 460px; }
.auth-hero .hero-brain { font-size: 4.5rem; }
.auth-hero h2 { font-size: 2.4rem; line-height: 1.15; }
.auth-hero p { color: var(--text-muted); font-size: 1.08rem; }
.hero-features { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.hero-features li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); font-weight: 600; }
.hero-features span { font-size: 1.4rem; }
.auth-card {
    width: 100%; max-width: 480px; background: rgba(13,27,62,0.92); backdrop-filter: blur(24px);
    border: 1px solid var(--card-border); border-radius: 26px; padding: 36px; box-shadow: 0 24px 70px rgba(0,0,0,0.5);
}
.auth-logo { text-align: center; margin-bottom: 26px; }
.auth-logo .logo-icon {
    width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 22px; font-size: 1.9rem; color: #fff;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 30px rgba(34,211,238,0.3);
}
.auth-logo h1 { font-size: 1.7rem; margin: 0 0 2px; }
.auth-logo p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.auth-disclaimer { font-size: 0.74rem; color: var(--text-muted); text-align: center; margin: 22px 0 0; }
.consent-box { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); font-size: 0.86rem; }
.consent-note { margin-top: 8px; color: var(--accent-green); font-size: 0.8rem; font-weight: 600; }

/* ============ LESSON ============ */
.lesson-step { display: flex; gap: 16px; }
.step-number {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.step-content { flex: 1; min-width: 0; }
.step-label { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px; }
.lesson-text { font-size: 1.12rem; line-height: 1.85; }
.summary-chip {
    display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 14px; margin-top: 12px;
    background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.35); color: #a7f3d0; font-weight: 700;
}
.big-visual {
    display: flex; align-items: center; justify-content: center; min-height: 200px; border-radius: 20px;
    background: radial-gradient(circle at 50% 40%, rgba(34,211,238,0.18), rgba(167,139,250,0.08) 60%, transparent 75%);
    border: 1px solid var(--card-border); font-size: 7rem; overflow: hidden;
}
.big-visual img { max-width: 100%; max-height: 320px; object-fit: contain; }
.big-visual .twemoji { width: 150px; height: 150px; }

.code-block {
    background: #060d1d; border: 1px solid rgba(34,211,238,0.18); border-radius: 14px;
    padding: 20px 20px 16px; font-family: 'Cascadia Code', 'Fira Code', Consolas, monospace;
    font-size: 0.98rem; line-height: 1.75; color: #e2e8f0; overflow-x: auto; position: relative; margin: 0;
}
.code-block[data-lang]::before {
    content: attr(data-lang); position: absolute; top: 8px; right: 12px; font-family: 'Inter', sans-serif;
    font-size: 0.66rem; color: var(--accent-cyan); font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
}
.code-block .line { display: block; padding: 0 6px; border-radius: 6px; transition: background 0.3s; }
.code-block .line.hl { background: rgba(34,211,238,0.15); }
.tok-kw { color: #c792ea; } .tok-str { color: #c3e88d; } .tok-num { color: #f78c6c; }
.tok-com { color: #6b7f9a; font-style: italic; } .tok-type { color: #82aaff; }

.quiz-opt {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
    background: rgba(255,255,255,0.04); border: 2px solid rgba(255,255,255,0.1); border-radius: 14px;
    padding: 14px 18px; color: var(--text-primary); font-size: 1.02rem; font-weight: 600; min-height: 58px; transition: var(--transition);
}
.quiz-opt:hover:not(:disabled) { border-color: var(--accent-cyan); background: rgba(34,211,238,0.07); }
.quiz-opt .opt-letter {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08); font-weight: 800;
}
.quiz-opt.correct { border-color: var(--accent-green); background: rgba(52,211,153,0.13); }
.quiz-opt.correct .opt-letter { background: var(--accent-green); color: #062; }
.quiz-opt.wrong { border-color: var(--accent-orange); background: rgba(251,191,36,0.1); }
.quiz-opt:disabled { cursor: default; }

.lesson-nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none;
    color: var(--text-muted); font-size: 0.88rem; border: 1px solid transparent; min-height: 44px;
}
.lesson-nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.lesson-nav-item.current { background: rgba(34,211,238,0.12); border-color: rgba(34,211,238,0.3); color: var(--accent-cyan); font-weight: 700; }
.lesson-nav-item .ln-dot {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 0.74rem; font-weight: 800; background: rgba(255,255,255,0.08);
}
.lesson-nav-item.completed .ln-dot { background: rgba(52,211,153,0.2); color: var(--accent-green); }

.flashcard { perspective: 1200px; cursor: pointer; min-height: 200px; }
.flashcard-inner { position: relative; width: 100%; min-height: 200px; transition: transform 0.6s; transform-style: preserve-3d; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face {
    position: absolute; inset: 0; backface-visibility: hidden; border-radius: 18px; padding: 22px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px;
    border: 1px solid var(--card-border);
}
.flashcard-front { background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(96,165,250,0.08)); font-family: 'Cascadia Code', Consolas, monospace; font-size: 1.15rem; font-weight: 700; }
.flashcard-back { background: linear-gradient(135deg, rgba(167,139,250,0.16), rgba(52,211,153,0.08)); transform: rotateY(180deg); font-size: 1.05rem; font-weight: 600; }

/* ============ LESSON ANIMATION STAGE ============ */
.anim-stage {
    background: rgba(3,9,22,0.55); border: 1px solid var(--card-border); border-radius: 18px;
    padding: 24px; min-height: 260px; position: relative; overflow: hidden;
}
.anim-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.anim-caption { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: rgba(34,211,238,0.07); border-left: 3px solid var(--accent-cyan); font-weight: 600; min-height: 48px; }
.anim-row { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.v-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.v-box .vb-label { font-size: 0.72rem; color: var(--accent-cyan); font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.v-box .vb-body {
    min-width: 110px; height: 84px; padding: 0 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800; font-family: Consolas, monospace;
    background: linear-gradient(135deg, rgba(34,211,238,0.14), rgba(167,139,250,0.14)); border: 2px solid var(--accent-cyan); position: relative;
}
.v-box .vb-name { font-size: 0.9rem; color: var(--accent-purple); font-weight: 700; font-family: Consolas, monospace; }
.v-token {
    display: inline-flex; align-items: center; justify-content: center; padding: 8px 14px; border-radius: 10px;
    background: rgba(251,191,36,0.15); border: 2px solid var(--accent-orange); color: var(--accent-orange); font-weight: 800; font-family: Consolas, monospace;
}
.flow-node {
    padding: 10px 18px; border-radius: 12px; border: 2px solid rgba(159,176,200,0.4); background: rgba(255,255,255,0.04);
    font-weight: 700; text-align: center; transition: all 0.35s; min-width: 120px;
}
.flow-node.terminal { border-radius: 999px; }
.flow-node.decision { border-color: var(--accent-orange); background: rgba(251,191,36,0.08); }
.flow-node.active { border-color: var(--accent-cyan); background: rgba(34,211,238,0.18); box-shadow: 0 0 22px rgba(34,211,238,0.3); }
.flow-node.ok { border-color: var(--accent-green); background: rgba(52,211,153,0.15); }
.flow-node.dim { opacity: 0.35; }
.flow-arrow { color: var(--text-muted); font-size: 1.2rem; text-align: center; }
.sql-table { border-collapse: collapse; margin: 0 auto; font-size: 0.95rem; min-width: 280px; }
.sql-table caption { caption-side: top; color: var(--accent-cyan); font-weight: 800; text-align: left; padding-bottom: 6px; }
.sql-table th { background: rgba(34,211,238,0.14); color: var(--accent-cyan); padding: 8px 12px; border: 1px solid var(--card-border); }
.sql-table td { padding: 8px 12px; border: 1px solid var(--card-border); transition: all 0.4s; }
.sql-table tr.hl td { background: rgba(34,211,238,0.18); }
.sql-table tr.dim td { opacity: 0.3; }
.sql-table tr.new td { background: rgba(52,211,153,0.2); }
.sql-table tr.del td { background: rgba(248,113,113,0.2); text-decoration: line-through; }
.sql-table td.changed { background: rgba(251,191,36,0.25); }
.sql-table .col-hl { background: rgba(167,139,250,0.22) !important; }
.sql-table .pk { color: var(--accent-orange); }
.sort-bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; justify-content: center; }
.sort-bar {
    width: 48px; border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
    display: flex; align-items: flex-start; justify-content: center; color: #fff; font-weight: 800; padding-top: 6px; transition: all 0.4s;
}
.sort-bar.compare { background: linear-gradient(180deg, var(--accent-orange), #f59e0b); }
.sort-bar.done { background: linear-gradient(180deg, var(--accent-green), #059669); }
.console-out {
    background: #000; border-radius: 10px; padding: 10px 14px; font-family: Consolas, monospace; color: #86efac;
    min-height: 70px; font-size: 0.9rem; white-space: pre-wrap;
}
.machine {
    padding: 18px 24px; border-radius: 18px; border: 2px dashed var(--accent-purple); background: rgba(167,139,250,0.1);
    text-align: center; font-weight: 800; min-width: 160px;
}
.machine .gear { font-size: 2rem; display: inline-block; }
.machine.working .gear { animation: spin 1s linear infinite; }

/* ============ EXERCISE PLAYER ============ */
.game-shell { max-width: 1100px; margin: 0 auto; }
.game-header {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: 20px; margin-bottom: 18px;
    background: var(--card-bg); border: 1px solid var(--card-border);
}
.game-header .gh-emoji { font-size: 2.4rem; }
.game-header h1 { font-size: 1.45rem; margin: 0; }
.game-stats { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.game-stat { padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,0.05); text-align: center; min-width: 78px; }
.game-stat .gs-val { font-size: 1.2rem; font-weight: 800; color: var(--accent-cyan); line-height: 1.1; }
.game-stat .gs-lbl { font-size: 0.68rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.instruction-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px; margin-bottom: 16px;
    background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.3); font-size: 1.08rem; font-weight: 600;
}
.instruction-bar .ib-text { flex: 1; min-width: 200px; }
.game-stage {
    min-height: 380px; padding: 26px; border-radius: 22px; background: rgba(3,9,22,0.45);
    border: 1px solid var(--card-border); position: relative;
}
.round-progress { display: flex; gap: 6px; margin-bottom: 18px; }
.round-progress span { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.1); }
.round-progress span.done { background: var(--accent-green); }
.round-progress span.missed { background: var(--accent-orange); }
.round-progress span.current { background: var(--accent-cyan); }

.prompt-big { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 20px; }
.prompt-sub { text-align: center; color: var(--text-muted); margin-top: -12px; margin-bottom: 18px; }
.countdown-ring { font-size: 1rem; font-weight: 800; color: var(--accent-orange); text-align: center; margin-bottom: 12px; }
.countdown-bar { height: 8px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; margin: 0 auto 18px; max-width: 420px; }
.countdown-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent-orange), var(--accent-pink)); width: 100%; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--tile-size), 1fr)); gap: 14px; justify-items: center; }
.tile-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile {
    width: 100%; max-width: 170px; aspect-ratio: 1; border-radius: 18px; cursor: pointer; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.12); color: var(--text-primary);
    transition: var(--transition); font-weight: 700;
}
.tile:hover:not(:disabled) { border-color: var(--accent-cyan); background: rgba(34,211,238,0.07); }
.tile .twemoji, .tile img.tile-img { width: 58%; height: auto; max-height: 70%; object-fit: contain; pointer-events: none; }
.tile .tile-label { font-size: 0.86rem; text-align: center; line-height: 1.2; }
.tile.static { cursor: default; }
.tile.selected { border-color: var(--accent-cyan); background: rgba(34,211,238,0.16); box-shadow: 0 0 0 3px rgba(34,211,238,0.25); }
.tile.correct { border-color: var(--accent-green); background: rgba(52,211,153,0.16); }
.tile.wrong { border-color: var(--accent-orange); background: rgba(251,191,36,0.12); }
.tile.missed { border-color: var(--accent-purple); border-style: dashed; }
.tile.hidden-tile { background: linear-gradient(135deg, #18305f, #0d1b3e); }
.tile .check-mark { position: absolute; top: 6px; right: 8px; font-size: 1rem; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto; }
.choice-btn {
    min-height: 64px; border-radius: 16px; padding: 12px 16px; font-size: 1.15rem; font-weight: 800; cursor: pointer;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.14); color: var(--text-primary); transition: var(--transition);
}
.choice-btn:hover:not(:disabled) { border-color: var(--accent-cyan); background: rgba(34,211,238,0.08); }
.choice-btn.correct { border-color: var(--accent-green); background: rgba(52,211,153,0.18); }
.choice-btn.wrong { border-color: var(--accent-orange); background: rgba(251,191,36,0.12); }
.choice-btn.code { font-family: Consolas, monospace; font-size: 1rem; font-weight: 700; }

.hero-item { display: flex; justify-content: center; margin-bottom: 18px; }
.hero-item .twemoji, .hero-item img { width: 150px; height: 150px; object-fit: contain; }
.hero-item .photo { width: 170px; height: 170px; border-radius: 22px; object-fit: cover; border: 3px solid var(--card-border); }

.word-display { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.letter-slot {
    width: 58px; height: 66px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 800; background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.15);
}
.letter-slot.filled { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.letter-slot.blank { border-style: dashed; border-color: var(--accent-orange); color: var(--accent-orange); }
.letter-bank { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.letter-btn {
    width: 62px; height: 62px; border-radius: 14px; font-size: 1.6rem; font-weight: 800; cursor: pointer;
    background: rgba(167,139,250,0.14); border: 2px solid rgba(167,139,250,0.4); color: #ddd6fe; transition: var(--transition);
}
.letter-btn:hover:not(:disabled) { background: rgba(167,139,250,0.28); }
.letter-btn:disabled { opacity: 0.25; }
.word-chip {
    padding: 12px 18px; border-radius: 14px; font-size: 1.15rem; font-weight: 700; cursor: pointer; min-height: 52px;
    background: rgba(96,165,250,0.12); border: 2px solid rgba(96,165,250,0.4); color: #dbeafe;
}
.word-chip:disabled { opacity: 0.25; }
.sentence-line {
    min-height: 70px; border-radius: 16px; border: 2px dashed rgba(255,255,255,0.2); padding: 12px; margin-bottom: 18px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; font-size: 1.25rem; font-weight: 700;
}

.memory-board { display: grid; gap: 12px; justify-content: center; }
.mem-card { width: var(--tile-size); height: var(--tile-size); perspective: 900px; cursor: pointer; background: none; border: none; padding: 0; }
.mem-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.45s; transform-style: preserve-3d; }
.mem-card.flipped .mem-card-inner, .mem-card.matched .mem-card-inner { transform: rotateY(180deg); }
.mem-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--card-border); }
.mem-front { background: linear-gradient(135deg, #1a3266, #0d1b3e); color: var(--accent-cyan); font-size: 1.8rem; font-weight: 800; }
.mem-back { background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(167,139,250,0.12)); transform: rotateY(180deg); border-color: var(--accent-cyan); }
.mem-back .twemoji { width: 62%; }
.mem-card.matched .mem-back { border-color: var(--accent-green); background: rgba(52,211,153,0.16); }

.calendar { max-width: 380px; margin: 0 auto 18px; border-radius: 16px; overflow: hidden; border: 1px solid var(--card-border); }
.calendar-head { background: linear-gradient(135deg, #0891b2, #6d28d9); padding: 12px; text-align: center; font-weight: 800; font-size: 1.15rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); background: rgba(255,255,255,0.03); }
.calendar-grid div { padding: 8px 0; text-align: center; font-size: 0.92rem; }
.calendar-grid .dow { color: var(--text-muted); font-size: 0.72rem; font-weight: 800; }
.calendar-grid .mark { background: var(--accent-orange); color: #111; font-weight: 800; border-radius: 10px; }

.clock-face { display: block; margin: 0 auto 18px; }

.seq-pad {
    width: 100%; aspect-ratio: 1; border-radius: 20px; cursor: pointer; border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05); transition: background 0.15s, box-shadow 0.15s; max-width: 150px;
}
.seq-pad.lit { box-shadow: 0 0 30px currentColor; }

.ws-grid { display: grid; gap: 6px; justify-content: center; margin: 0 auto 18px; user-select: none; }
.ws-cell {
    width: 50px; height: 50px; border-radius: 10px; font-size: 1.3rem; font-weight: 800; cursor: pointer;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.1); color: var(--text-primary);
}
.ws-cell.start { border-color: var(--accent-orange); background: rgba(251,191,36,0.2); }
.ws-cell.found { background: rgba(52,211,153,0.25); border-color: var(--accent-green); }
.ws-words { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ws-words span { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); font-weight: 700; }
.ws-words span.found { background: rgba(52,211,153,0.2); color: var(--accent-green); text-decoration: line-through; }

.sortable-list { list-style: none; padding: 0; margin: 0 auto; max-width: 720px; display: flex; flex-direction: column; gap: 8px; }
.sortable-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; min-height: 56px;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.1); cursor: grab;
}
.sortable-item.dragging { opacity: 0.5; }
.sortable-item.correct { border-color: var(--accent-green); background: rgba(52,211,153,0.12); }
.sortable-item.wrong { border-color: var(--accent-orange); background: rgba(251,191,36,0.1); }
.sortable-item .si-text { flex: 1; font-weight: 600; }
.sortable-item .si-text.code { font-family: Consolas, monospace; white-space: pre; font-size: 0.98rem; }
.sortable-item .si-emoji { font-size: 1.6rem; }
.sortable-item .si-num { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; flex-shrink: 0; }
.move-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.05); color: var(--text-primary); }
.move-btn:hover { background: rgba(34,211,238,0.12); }

.match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 860px; margin: 0 auto; }
.match-col { display: flex; flex-direction: column; gap: 10px; }
.match-item {
    min-height: 60px; border-radius: 14px; padding: 10px 14px; text-align: left; cursor: pointer; font-weight: 700;
    background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.12); color: var(--text-primary);
}
.match-item.code { font-family: Consolas, monospace; font-size: 0.92rem; }
.match-item.selected { border-color: var(--accent-cyan); background: rgba(34,211,238,0.14); }
.match-item.matched { border-color: var(--accent-green); background: rgba(52,211,153,0.14); opacity: 0.8; }
.match-item.wrong { border-color: var(--accent-orange); }

.shape-svg { display: block; margin: 0 auto 18px; }
.algo-steps { max-width: 620px; margin: 0 auto 18px; display: flex; flex-direction: column; gap: 8px; }
.algo-step { padding: 12px 16px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); font-weight: 600; display: flex; gap: 10px; }
.algo-step.blank { border: 2px dashed var(--accent-orange); color: var(--accent-orange); }
.algo-step.filled { border-color: var(--accent-green); background: rgba(52,211,153,0.12); }

.result-panel { text-align: center; padding: 18px 0; }
.result-panel h2 { font-size: 1.8rem; margin: 6px 0; }
.result-stats { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.result-stats .rs { padding: 14px 20px; border-radius: 16px; background: rgba(255,255,255,0.05); min-width: 120px; }
.result-stats .rs b { display: block; font-size: 1.6rem; color: var(--accent-cyan); }
.result-stats .rs span { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; }

.sound-bubble {
    max-width: 460px; margin: 0 auto 12px; padding: 18px 26px; border-radius: 28px; text-align: center;
    font-size: 2rem; font-weight: 900; letter-spacing: 1px; position: relative;
    background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(244,114,182,0.14)); border: 2px solid rgba(251,191,36,0.45);
}
.sound-bubble::after { content: ''; position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); border: 12px solid transparent; border-top-color: rgba(251,191,36,0.45); }
.sort-subject .twemoji, .sort-subject img { width: 104px !important; height: 104px !important; }
.sort-subject { display: inline-flex; flex-direction: column; align-items: center; padding: 18px 28px; border-radius: 24px; background: rgba(255,255,255,0.05); border: 2px solid rgba(255,255,255,0.12); }
.basket-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.basket {
    width: 190px; min-height: 150px; border-radius: 0 0 40px 40px; cursor: pointer; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    background: linear-gradient(180deg, rgba(251,191,36,0.12), rgba(180,83,9,0.22)); border: 3px solid rgba(251,191,36,0.5); border-top-width: 6px;
    color: var(--text-primary); transition: var(--transition);
}
.basket:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(251,191,36,0.2); }
.basket .basket-emoji .twemoji { width: 52px; height: 52px; }
.basket .basket-name { font-weight: 800; font-size: 1.1rem; }
.basket .basket-count { position: absolute; top: -14px; right: -10px; min-width: 32px; height: 32px; border-radius: 999px; background: var(--accent-cyan); color: #062; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.basket.correct { border-color: var(--accent-green); background: linear-gradient(180deg, rgba(52,211,153,0.18), rgba(5,150,105,0.25)); }
.basket.wrong { animation: soft-shake 0.45s ease; border-color: var(--accent-orange); }

/* Yumuşak geri bildirim animasyonları */
.tile.correct, .choice-btn.correct, .quiz-opt.correct, .match-item.matched { animation: soft-pop 0.45s ease; }
.tile.wrong, .choice-btn.wrong, .quiz-opt.wrong { animation: soft-shake 0.4s ease; }
@keyframes soft-pop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes soft-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Doğa süslemesi: ana sayfa ve giriş ekranında süzülen çiçek, kelebek, arı */
.nature-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.nature-decor span { position: absolute; font-size: 1.8rem; opacity: 0.55; animation: drift 14s ease-in-out infinite; will-change: transform; }
.nature-decor span .twemoji { width: 1em; height: 1em; }
.nature-decor span:nth-child(1) { left: 6%; top: 18%; animation-delay: 0s; }
.nature-decor span:nth-child(2) { left: 30%; top: 72%; animation-delay: -3s; font-size: 1.4rem; }
.nature-decor span:nth-child(3) { left: 55%; top: 12%; animation-delay: -6s; }
.nature-decor span:nth-child(4) { left: 74%; top: 64%; animation-delay: -9s; font-size: 1.5rem; }
.nature-decor span:nth-child(5) { left: 88%; top: 26%; animation-delay: -12s; font-size: 1.3rem; }
.nature-decor span:nth-child(6) { left: 44%; top: 40%; animation-delay: -5s; font-size: 1.2rem; opacity: 0.35; }
@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(18px, -14px) rotate(8deg); }
    50% { transform: translate(-8px, -26px) rotate(-6deg); }
    75% { transform: translate(-20px, -8px) rotate(4deg); }
}
.welcome-card > *:not(.nature-decor):not(.welcome-art) { position: relative; z-index: 1; }
.page-hero .hero-emoji { animation: float 6s ease-in-out infinite; }

/* Kutlama: nazikçe düşen çiçek ve yıldızlar */
.confetti-piece { position: fixed; top: -40px; z-index: 4600; pointer-events: none; font-size: 1.8rem; }
.confetti-piece .twemoji { width: 1em; height: 1em; }

.twemoji { display: inline-block; vertical-align: middle; }
[data-emoji] .twemoji { width: 1em; height: 1em; }
.activity-emoji[data-emoji] .twemoji { width: 40px; height: 40px; }

/* ============ ASSISTANT ============ */
.assistant-fab {
    position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 62px; height: 62px; border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #7c3aed); color: #fff; border: none; font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(124,58,237,0.4);
}
.assistant-fab:hover { transform: scale(1.05); }
.assistant-fab .fab-friend { width: 70%; height: 70%; animation: friend-idle 3.6s ease-in-out infinite; }
.chat-log { display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 88%; padding: 12px 15px; border-radius: 16px; font-size: 0.97rem; white-space: pre-wrap; line-height: 1.55; }
.chat-msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(6,182,212,0.25), rgba(59,130,246,0.25)); border-bottom-right-radius: 4px; }
.chat-msg.bot { align-self: flex-start; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-bottom-left-radius: 4px; }
.chat-msg.bot.safety { border-color: rgba(251,191,36,0.5); background: rgba(251,191,36,0.08); }
.chat-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chat-links a { font-size: 0.8rem; padding: 5px 10px; border-radius: 999px; background: rgba(34,211,238,0.12); text-decoration: none; font-weight: 700; }
.chat-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-quick button { font-size: 0.82rem; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--card-border); background: rgba(255,255,255,0.04); color: var(--text-primary); font-weight: 600; min-height: 38px; }
.chat-quick button:hover { border-color: var(--accent-cyan); }
.typing { display: inline-flex; gap: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; } .typing span:nth-child(3) { animation-delay: 0.4s; }

/* ============ ADMIN ============ */
.admin-sidebar .brand-icon { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.media-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: rgba(255,255,255,0.04); }
.media-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; max-height: 220px; overflow-y: auto; padding: 4px; }
.media-picker button { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; }
.media-picker button:hover, .media-picker button.active { border-color: var(--accent-cyan); }
.media-picker img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.plan-item-row { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.day-toggle { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.day-toggle label { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--card-border); cursor: pointer; font-size: 0.8rem; font-weight: 700; }
.day-toggle input { display: none; }
.day-toggle input:checked + span { color: var(--accent-cyan); }
.day-toggle label:has(input:checked) { background: rgba(34,211,238,0.15); border-color: var(--accent-cyan); }

/* ============ KEYFRAMES ============ */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@keyframes pop-in { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pop-in { animation: pop-in 0.35s ease-out both; }

/* ============ RESPONSIVE ============ */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); z-index: 2000; box-shadow: 10px 0 40px rgba(0,0,0,0.5); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1500; }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .page-content { padding: 18px; }
    .topbar { padding: 0 14px; }
}
@media (max-width: 576px) {
    :root { --tile-size: 84px; }
    .page-hero { padding: 20px; }
    .page-hero h1, .welcome-card h1 { font-size: 1.45rem; }
    .stat-value { font-size: 1.4rem; }
    .game-stage { padding: 16px; }
    .letter-slot { width: 44px; height: 52px; font-size: 1.4rem; }
    .letter-btn { width: 52px; height: 52px; font-size: 1.35rem; }
    .ws-cell { width: 40px; height: 40px; font-size: 1.05rem; }
    .match-cols { grid-template-columns: 1fr; }
    .auth-card { padding: 24px; }
    .assistant-fab { width: 54px; height: 54px; right: 14px; bottom: 14px; }
}

/* ============ SORU SORAN HAYVAN DOSTLAR ============ */
/* Katmanlar: .friend-animal (giriş + nefes alma) > .friend-body (tepkiler) > .friend-img (konuşma) */
.animal-guide { display: flex; align-items: flex-end; gap: 14px; margin: 0 0 22px; position: relative; text-align: left; }
.friend-animal {
    --size: 88px;
    position: relative; flex: 0 0 auto; width: var(--size); height: var(--size); padding: 6px;
    border: 0; border-radius: 50%; cursor: pointer; color: inherit;
    background: radial-gradient(circle at 50% 62%, rgba(34,211,238,0.22), rgba(167,139,250,0.08) 55%, transparent 72%);
    transform-origin: 50% 100%;
    animation: friend-enter 0.75s cubic-bezier(.34,1.56,.64,1) both, friend-idle 3.6s ease-in-out 0.75s infinite;
}
.friend-animal::after {
    content: ''; position: absolute; left: 18%; right: 18%; bottom: -4px; height: 10px; border-radius: 50%;
    background: rgba(0,0,0,0.35); filter: blur(3px); z-index: -1; animation: friend-shadow 3.6s ease-in-out 0.75s infinite;
}
.friend-animal:hover .friend-body { transform: scale(1.06) rotate(-3deg); }
.friend-animal:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.friend-body { display: block; width: 100%; height: 100%; transition: transform .25s ease; transform-origin: 50% 90%; }
.friend-img { width: 100%; height: 100%; display: block; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.35)); transform-origin: 50% 80%; }
.friend-fallback { font-size: calc(var(--size) * 0.7); line-height: 1; display: block; }
.friend-animal.talking .friend-img { animation: friend-talk 0.3s ease-in-out infinite alternate; }
.friend-animal.swap-in .friend-body { animation: friend-swap 0.55s cubic-bezier(.34,1.56,.64,1); }

.friend-body.react-happy { animation: friend-happy 0.95s cubic-bezier(.3,1.5,.5,1); }
.friend-body.react-think { animation: friend-think 1.1s ease-in-out; }
.friend-body.react-hello { animation: friend-hello 1s ease-in-out; }

.friend-particle {
    position: absolute; left: 50%; top: 4%; width: 28px; height: 28px; pointer-events: none; z-index: 3;
    animation: friend-particle 1.25s ease-out both;
}
.friend-particle .twemoji { width: 100%; height: 100%; }

.ag-bubble {
    position: relative; flex: 1; min-width: 0; padding: 14px 52px 14px 18px; border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #ecfeff); color: #0b1733;
    box-shadow: 0 12px 30px rgba(0,0,0,0.28), inset 0 -3px 0 rgba(34,211,238,0.25);
    transform-origin: 0 100%; animation: bubble-pop 0.5s cubic-bezier(.34,1.56,.64,1) 0.25s both;
}
.ag-bubble::before {
    content: ''; position: absolute; left: -11px; bottom: 20px;
    border-style: solid; border-width: 9px 12px 9px 0; border-color: transparent #ffffff transparent transparent;
}
.ag-name { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #7c3aed; }
.ag-text { margin: 2px 0 0; font-size: 1.12rem; font-weight: 700; line-height: 1.45; }
.ag-sub { margin: 6px 0 0; font-size: 0.93rem; color: #475569; line-height: 1.5; }
.ag-speak {
    position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0;
    background: #0b1733; color: var(--accent-cyan); display: grid; place-items: center; transition: var(--transition);
}
.ag-speak:hover, .ag-speak.speaking { background: var(--accent-cyan); color: #0b1733; }

/* Oyun içinde soru balonu */
.animal-guide.ag-stage { max-width: 760px; margin: 0 auto 22px; }
.ag-bubble .prompt-big { text-align: left; margin: 2px 0 0; font-size: 1.4rem; color: #0b1733; }
.ag-bubble .prompt-sub { text-align: left; margin: 6px 0 0; color: #475569; }

/* Boyut ve yerleşim çeşitleri */
.animal-guide.ag-sm .friend-animal { --size: 66px; }
.animal-guide.ag-sm .ag-text { font-size: 1.08rem; }
.animal-guide.ag-lg .friend-animal { --size: 124px; }
.animal-guide.ag-lg .ag-text { font-size: 1.3rem; }
.animal-guide.ag-center { flex-direction: column; align-items: center; text-align: center; max-width: 560px; margin-left: auto; margin-right: auto; }
.animal-guide.ag-center .ag-bubble { padding: 16px 50px; transform-origin: 50% 0; width: 100%; }
.animal-guide.ag-center .ag-bubble::before { left: 50%; top: -11px; bottom: auto; margin-left: -9px; border-width: 0 9px 12px 9px; border-color: transparent transparent #ffffff transparent; }
.quiz-block .animal-guide { margin-bottom: 14px; }

/* Talimat çubuğundaki karakter ve geri bildirimdeki küçük yüz */
.instruction-bar .ib-friend { --size: 54px; padding: 3px; animation: friend-idle 3.6s ease-in-out infinite; }
.fb-friend { width: 30px; height: 30px; flex: 0 0 auto; margin-top: -2px; }

@keyframes friend-enter {
    0% { opacity: 0; transform: translateY(34px) scale(0.4) rotate(-14deg); }
    60% { opacity: 1; transform: translateY(-10px) scale(1.08) rotate(4deg); }
    100% { opacity: 1; transform: none; }
}
@keyframes friend-idle {
    0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
    25% { transform: translateY(-4px) rotate(-2deg) scale(0.99, 1.02); }
    50% { transform: translateY(0) rotate(0) scale(1.02, 0.97); }
    75% { transform: translateY(-4px) rotate(2deg) scale(0.99, 1.02); }
}
@keyframes friend-shadow { 0%, 50%, 100% { transform: scaleX(1); opacity: 1; } 25%, 75% { transform: scaleX(0.85); opacity: 0.7; } }
@keyframes friend-talk { from { transform: scale(1, 1); } to { transform: scale(1.06, 0.93) translateY(3px) rotate(-2deg); } }
@keyframes friend-swap { 0% { transform: scale(0.3) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes friend-happy {
    0% { transform: none; }
    20% { transform: translateY(4px) scale(1.12, 0.86); }
    45% { transform: translateY(-30px) rotate(-10deg) scale(0.95, 1.08); }
    65% { transform: translateY(0) scale(1.12, 0.88); }
    80% { transform: translateY(-10px) rotate(6deg); }
    100% { transform: none; }
}
@keyframes friend-think {
    0%, 100% { transform: none; }
    25% { transform: rotate(-14deg) translateX(-3px); }
    55% { transform: rotate(10deg) translateX(3px); }
    80% { transform: rotate(-4deg); }
}
@keyframes friend-hello {
    0%, 100% { transform: none; }
    15% { transform: rotate(-12deg) scale(1.08); }
    35% { transform: rotate(12deg) scale(1.08); }
    55% { transform: rotate(-9deg) scale(1.04); }
    75% { transform: rotate(6deg); }
}
@keyframes friend-particle {
    0% { opacity: 0; transform: translate(-50%, 10px) scale(0.3); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -78px) scale(1.15) rotate(var(--rot, 0deg)); }
}
@keyframes bubble-pop {
    0% { opacity: 0; transform: scale(0.6) translateY(8px); }
    100% { opacity: 1; transform: none; }
}

@media (max-width: 576px) {
    .friend-animal { --size: 64px; }
    .animal-guide.ag-lg .friend-animal { --size: 96px; }
    .ag-text, .ag-bubble .prompt-big { font-size: 1.05rem; }
}

/* ============ ERİŞİLEBİLİRLİK MODLARI ============ */
body.large-text { --font-scale: 1.2; --tile-size: 132px; }
body.large-text .quiz-opt, body.large-text .choice-btn { font-size: 1.2rem; }

body.high-contrast {
    --primary: #000; --primary-2: #000; --card-bg: #0a0a0a; --surface: #0a0a0a;
    --card-border: #ffffff; --text-primary: #ffffff; --text-muted: #e5e5e5;
    --accent-cyan: #00ffff; --accent-purple: #ff9cff; --accent-blue: #7fbfff; --accent-green: #00ff88;
    --accent-orange: #ffd400; --accent-red: #ff6b6b;
}
body.high-contrast::before, body.high-contrast .glass-card::before { display: none; }
body.high-contrast .glass-card, body.high-contrast .stat-card, body.high-contrast .activity-card,
body.high-contrast .page-hero, body.high-contrast .welcome-card, body.high-contrast .game-stage,
body.high-contrast .tile, body.high-contrast .quiz-opt, body.high-contrast .choice-btn { background: #000 !important; border-width: 2px; border-color: #fff; }
body.high-contrast .btn-primary-custom { background: #ffd400; color: #000; }
body.high-contrast .sidebar, body.high-contrast .topbar { background: #000; }
body.high-contrast a { text-decoration: underline; }
body.high-contrast .ag-bubble { background: #000; color: #fff; border: 2px solid #fff; box-shadow: none; }
body.high-contrast .ag-bubble::before { display: none; }
body.high-contrast .ag-bubble .prompt-big, body.high-contrast .ag-sub, body.high-contrast .ag-bubble .prompt-sub { color: #fff; }
body.high-contrast .ag-name { color: #ffd400; }
body.high-contrast .nav-link, body.high-contrast .btn-primary-custom, body.high-contrast .section-link { text-decoration: none; }

/* Sade görünüm: süsleri kaldırır, odak alanını sadeleştirir */
body.simple-view::before, body.simple-view .glass-card::before, body.simple-view .welcome-art, body.simple-view .auth-decor { display: none; }
body.simple-view .glass-card, body.simple-view .page-hero, body.simple-view .welcome-card, body.simple-view .stat-card,
body.simple-view .activity-card, body.simple-view .module-card { background: #0f1e40 !important; box-shadow: none !important; }
body.simple-view .decorative { display: none !important; }
body.simple-view .page-content { max-width: 1100px; }

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

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(34,211,238,0.3); border-radius: 999px; }

@media print {
    .sidebar, .topbar, .assistant-fab, .toast-stack { display: none !important; }
    .main-content { margin: 0; }
    body { background: #fff; color: #000; }
}
