/* ===== DASHBOARD V5 — VIBRANT & ALIVE ===== */

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #f0f0ff; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #a78bfa, #7c3aed); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #7c3aed; }
* { scrollbar-width: thin; scrollbar-color: #a78bfa #f0f0ff; }

/* ===== TOKENS ===== */
:root {
  --p: #7c3aed;           /* rich violet */
  --p2: #a78bfa;
  --pink: #f43f5e;
  --pink2: #fb7185;
  --teal: #0d9488;
  --teal2: #2dd4bf;
  --amber: #d97706;
  --amber2: #fbbf24;
  --sky: #0284c7;
  --sky2: #38bdf8;
  --orange: #ea580c;
  --orange2: #fb923c;
  --ink: #1a1035;
  --ink2: #3b3458;
  --muted: #6b7280;
  --pale: #9ca3af;
  --page: #f5f3ff;
  --card: #ffffff;
  --border: #ede8ff;
  --rad: 18px;
  --rad-sm: 12px;
  --spring: cubic-bezier(0.34,1.56,0.64,1);
  --ease: cubic-bezier(0.4,0,0.2,1);
  --font: 'Nunito', 'Inter', -apple-system, sans-serif;
}

/* ===== PAGE ===== */
body {
  background: var(--page);
  background-image:
    radial-gradient(ellipse 80% 40% at 15% 10%, rgba(124,58,237,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(244,63,94,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 90% 90%, rgba(13,148,136,0.04) 0%, transparent 55%);
  background-attachment: fixed;
  font-family: var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 2px 16px rgba(124,58,237,0.06);
}
.navbar::after { display:none; }

.nav-xp {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  font-weight: 800; font-size: 0.78rem;
  padding: 0.28rem 0.85rem; border-radius: 50px;
  box-shadow: 0 2px 6px rgba(245,158,11,0.25);
  font-family: var(--font);
}
.nav-streak { font-weight: 800; font-size: 0.88rem; color: #ea580c; }
.nav-profile-btn {
  background: #f3f0ff; border: 1.5px solid #ddd6fe;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1rem; cursor: pointer;
  transition: all 0.2s var(--spring); position: relative;
}
.nav-profile-btn:hover {
  border-color: var(--p); background: #ede9ff;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
  transform: scale(1.08);
}
.profile-menu {
  display: none; position: absolute;
  top: 52px; right: 0;
  background: var(--card); border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px var(--border);
  min-width: 200px; z-index: 200;
}
.profile-menu.open { display: block; animation: popIn 0.25s var(--spring); }
@keyframes popIn {
  from { transform: scale(0.88) translateY(-8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.pm-name { font-weight: 800; font-size: 0.95rem; color: var(--ink); margin-bottom: 0.15rem; }
.pm-plan {
  font-size: 0.7rem; font-weight: 700; color: var(--p);
  background: #f3f0ff; padding: 0.18rem 0.6rem;
  border-radius: 50px; display: inline-block; margin-bottom: 0.75rem;
}
.pm-link {
  display: block; padding: 0.5rem 0.65rem; border-radius: 10px;
  font-weight: 700; font-size: 0.85rem; color: var(--ink);
  text-decoration: none; transition: all 0.15s;
  background: none; border: none; cursor: pointer;
  width: 100%; text-align: left; font-family: var(--font);
}
.pm-link:hover { background: #f3f0ff; transform: translateX(2px); }
.pm-logout { color: #dc2626; }
.pm-logout:hover { background: #fef2f2; }

/* ===== DAILY REWARD ===== */
.daily-reward-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,10,40,0.6);
  backdrop-filter: blur(10px);
  z-index: 500; align-items: center; justify-content: center;
}
.daily-reward-overlay.show { display: flex; }
.daily-reward-box {
  background: var(--card); border-radius: 28px;
  padding: 2.5rem 2rem; text-align: center;
  max-width: 400px; width: 92%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
  animation: rewardBounce 0.45s var(--spring);
  position: relative; overflow: hidden;
}
.daily-reward-box::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--p), var(--pink), var(--amber2), var(--teal2));
}
@keyframes rewardBounce {
  0% { transform: scale(0.25) rotate(-10deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.dr-sparkles { font-size: 3rem; animation: sparkle 1.2s ease-in-out infinite; }
@keyframes sparkle {
  0%,100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(8deg); }
}
.dr-title {
  font-size: 1.8rem; font-weight: 900; margin: 0.5rem 0 0.3rem;
  background: linear-gradient(135deg, var(--p), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dr-subtitle { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.4rem; line-height: 1.5; }
.dr-prize {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 1rem; background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 14px; margin-bottom: 1.4rem;
  border: 1.5px solid rgba(245,158,11,0.2);
}
.dr-prize-icon { font-size: 1.8rem; }
.dr-prize-text { font-size: 1.4rem; font-weight: 900; color: #92400e; }
.dr-streak-row { display: flex; gap: 0.4rem; justify-content: center; margin-bottom: 1.4rem; }
.dr-day {
  width: 36px; height: 36px; border-radius: 10px;
  background: #f3f0ff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.75rem; color: #a78bfa;
  border: 2px solid #ddd6fe; transition: all 0.3s var(--spring);
}
.dr-day.claimed {
  background: var(--p); color: white; border-color: var(--p);
  box-shadow: 0 3px 10px rgba(124,58,237,0.3);
  animation: dayClaimed 0.3s var(--spring);
}
@keyframes dayClaimed { 0% { transform: scale(0.8); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
.dr-day.today {
  border-color: #fbbf24; background: #fffbeb; color: #92400e;
  animation: todayPulse 2s ease infinite;
}
@keyframes todayPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}
.dr-day.special { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.dr-day.mega { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; border-color: transparent; }
.dr-claim-btn {
  background: linear-gradient(135deg, var(--p), #6d28d9);
  color: white; border: none; padding: 0.9rem 2.5rem;
  border-radius: 50px; font-size: 1rem; font-weight: 800;
  cursor: pointer; font-family: var(--font);
  transition: all 0.2s var(--spring);
  box-shadow: 0 4px 0 #5b21b6, 0 6px 20px rgba(124,58,237,0.35);
}
.dr-claim-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #5b21b6, 0 12px 28px rgba(124,58,237,0.4);
}
.dr-claim-btn:active { transform: translateY(0); box-shadow: 0 2px 0 #5b21b6; }

/* ===== LEVEL UP ===== */
.levelup-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(15,10,40,0.6); backdrop-filter: blur(10px);
  z-index: 600; align-items: center; justify-content: center;
}
.levelup-overlay.show { display: flex; }
.levelup-box {
  background: var(--card); border-radius: 28px;
  padding: 2.5rem; text-align: center;
  max-width: 380px; width: 90%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
  animation: levelUpPop 0.5s var(--spring);
  position: relative; overflow: hidden;
}
.levelup-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--p), var(--pink), var(--amber2), var(--teal2), var(--sky2));
}
@keyframes levelUpPop { 0% { transform: scale(0.2) rotate(-15deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.levelup-sparkles { font-size: 3rem; }
.levelup-title {
  font-size: 2rem; font-weight: 900;
  background: linear-gradient(135deg, var(--p), var(--pink));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin: 0.5rem 0; letter-spacing: 1px;
}
.levelup-emoji { font-size: 3.5rem; animation: emojiPop 0.5s var(--spring) 0.2s both; }
@keyframes emojiPop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.levelup-name { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin: 0.5rem 0 0.2rem; }
.levelup-sub { font-size: 0.88rem; font-weight: 600; color: var(--muted); margin-bottom: 1.5rem; }
.levelup-btn {
  background: linear-gradient(135deg, var(--p), #6d28d9);
  color: white; border: none; padding: 0.85rem 2.5rem; border-radius: 50px;
  font-size: 1rem; font-weight: 800; cursor: pointer; font-family: var(--font);
  transition: all 0.2s var(--spring);
  box-shadow: 0 4px 0 #5b21b6, 0 6px 20px rgba(124,58,237,0.3);
}
.levelup-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #5b21b6, 0 10px 28px rgba(124,58,237,0.35); }

/* ===== XP FLOAT ===== */
.xp-float-container { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999; }
.xp-float {
  position: fixed; font-weight: 900; font-size: 1.3rem;
  color: #fbbf24; text-shadow: 0 2px 8px rgba(245,158,11,0.5);
  animation: xpFloat 1.5s ease-out forwards; pointer-events: none;
}
@keyframes xpFloat {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.5); }
}

/* ===== HERO — DEEP, RICH, ALIVE ===== */
.dash-hero-v2 {
  padding: 2.5rem 4rem 2rem;
  background:
    linear-gradient(135deg, #2e1065 0%, #4c1d95 25%, #5b21b6 50%, #7c2d9e 75%, #9d174d 100%);
  position: relative; overflow: hidden;
}
/* animated shimmer orbs */
.dash-hero-v2::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 10% 50%, rgba(167,139,250,0.25) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at 80% 20%, rgba(244,63,94,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 55% 100%, rgba(45,212,191,0.1) 0%, transparent 45%);
  pointer-events: none;
  animation: heroOrbs 8s ease-in-out infinite alternate;
}
@keyframes heroOrbs {
  0% { opacity: 0.8; }
  100% { opacity: 1.2; }
}
/* dot grid texture */
.dash-hero-v2::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.dash-hero-inner-v2 {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 1;
}
.hero-left { display: flex; align-items: center; gap: 1.5rem; }
.avatar-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.avatar-circle {
  width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  position: absolute; top: 9px; left: 9px;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25), 0 8px 28px rgba(124,58,237,0.5);
  transition: box-shadow 0.3s;
}
.avatar-circle:hover { box-shadow: 0 0 0 5px rgba(255,255,255,0.3), 0 12px 36px rgba(124,58,237,0.6); }
.avatar-emoji { font-size: 2.2rem; }
.avatar-xp-ring { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.avatar-level-badge {
  position: absolute; bottom: 2px; right: 2px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f; font-weight: 900; font-size: 0.7rem;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid #2e1065; z-index: 2;
  box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}
.hero-greeting h1 {
  font-size: 1.85rem; font-weight: 900; color: white;
  margin-bottom: 0.3rem; letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.hero-tagline { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-bottom: 0.75rem; line-height: 1.5; }
.hero-badges-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mini-badge {
  padding: 0.3rem 0.8rem; border-radius: 50px;
  font-size: 0.72rem; font-weight: 800;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.12);
  transition: all 0.2s; backdrop-filter: blur(8px);
}
.mini-badge:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }
.streak-badge { background: rgba(251,191,36,0.2); color: #fde68a; border-color: rgba(251,191,36,0.25); }
.xp-badge { background: rgba(167,139,250,0.25); color: #ddd6fe; border-color: rgba(167,139,250,0.3); }
.rank-badge { background: rgba(244,63,94,0.2); color: #fda4af; border-color: rgba(244,63,94,0.25); }

.countdown-card {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 16px; padding: 1rem 1.4rem;
  transition: all 0.2s; backdrop-filter: blur(12px);
}
.countdown-card:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }
.cc-icon { font-size: 1.8rem; }
.cc-label { color: rgba(255,255,255,0.5); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.cc-days { color: white; font-size: 1.6rem; font-weight: 900; }

/* ===== WEEKLY BANNER ===== */
.weekly-banner {
  display: flex; align-items: center; gap: 0.8rem;
  max-width: 1200px; margin: 0 auto;
  padding: 0.8rem 2rem; flex-wrap: wrap;
  animation: fadeDown 0.4s ease;
}
@keyframes fadeDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.weekly-banner.learning { background: linear-gradient(135deg,#f0eaff,#fce8ff); border-bottom: 2px solid #ddd6fe; }
.weekly-banner.test-day { background: linear-gradient(135deg,#fffbeb,#fef3c7); border-bottom: 2px solid #fde68a; }
.weekly-banner.fun-day { background: linear-gradient(135deg,#ecfdf5,#d1fae5); border-bottom: 2px solid #a7f3d0; }
.wb-icon { font-size: 1.8rem; }
.wb-info { flex: 1; min-width: 180px; }
.wb-title { font-weight: 800; font-size: 0.95rem; color: var(--ink); }
.wb-desc { font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-top: 0.1rem; }
.wb-action { font-size: 0.82rem !important; padding: 0.45rem 1.1rem !important; white-space: nowrap; }

/* ===== MISSIONS ===== */
.missions-section { padding: 1.75rem 4rem; max-width: 1100px; margin: 0 auto; }
.missions-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.missions-header h2 { font-size: 1.2rem; font-weight: 900; color: var(--ink); }
.missions-timer {
  font-size: 0.73rem; font-weight: 700; color: var(--muted);
  background: var(--card); padding: 0.3rem 0.85rem; border-radius: 8px;
  border: 1.5px solid var(--border);
}
.missions-grid { display: flex; flex-direction: column; gap: 0.55rem; }
.mission-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border-radius: var(--rad-sm);
  padding: 0.9rem 1.2rem;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(124,58,237,0.04);
  transition: all 0.22s var(--ease); cursor: pointer;
  position: relative; overflow: hidden;
}
.mission-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: var(--p); opacity: 0; transition: opacity 0.2s;
  border-radius: 2px;
}
.mission-card:hover::before { opacity: 1; }
.mission-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(124,58,237,0.1);
  border-color: #c4b5fd;
}
.mission-card.completed { border-color: #bbf7d0; background: linear-gradient(135deg,#f0fdf4,#ecfdf5); }
.mission-card.completed::before { background: #10b981; opacity: 1; }
.mission-card.completed .mc-title { text-decoration: line-through; color: #059669; }
.bonus-mission { border-color: #fde68a; background: linear-gradient(135deg,#fffde7,#fffbeb); }
.bonus-mission::before { background: #f59e0b; }
.mc-left { display: flex; align-items: center; gap: 0.75rem; }
.mc-icon-wrap {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  transition: transform 0.25s var(--spring);
}
.mission-card:hover .mc-icon-wrap { transform: scale(1.1) rotate(3deg); }
.mc-icon-wrap.learn { background: linear-gradient(135deg,#f0eaff,#e9d5ff); }
.mc-icon-wrap.quiz { background: linear-gradient(135deg,#fff0f3,#fce7eb); }
.mc-icon-wrap.practice { background: linear-gradient(135deg,#ecfdf5,#d1fae5); }
.mc-icon-wrap.bonus { background: linear-gradient(135deg,#fffbeb,#fef3c7); }
.mc-title { font-weight: 800; font-size: 0.9rem; color: var(--ink); }
.mc-desc { font-size: 0.77rem; color: var(--muted); margin-top: 0.1rem; }
.mc-right { display: flex; align-items: center; gap: 0.65rem; }
.mc-reward {
  font-weight: 800; font-size: 0.77rem; color: var(--p);
  background: #f0eaff; padding: 0.22rem 0.6rem; border-radius: 8px;
}
.bonus-reward { color: #92400e; background: #fef3c7; }
.mc-progress-ring { width: 34px; height: 34px; }
.mc-progress-ring svg { transform: rotate(-90deg); }

/* ===== QUICK ACTIONS — REAL 3D BUTTONS ===== */
.quick-actions-v2 {
  display: grid; grid-template-columns: repeat(6,1fr);
  gap: 0.75rem; padding: 0 4rem;
  max-width: 1100px; margin: 0 auto 1.75rem;
}
.qa-card {
  position: relative; overflow: hidden; border-radius: var(--rad);
  padding: 1.35rem 0.9rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
  text-decoration: none; color: white;
  transition: transform 0.15s var(--spring), box-shadow 0.15s var(--ease);
  cursor: pointer; border: none; user-select: none;
}
.qa-card:hover { transform: translateY(-5px); }
.qa-card:active { transform: translateY(1px) !important; }
.qa-glow { display: none; }
.qa-card::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease; pointer-events: none;
}
.qa-card:hover::after { left: 120%; }

.qa-primary {
  background: linear-gradient(145deg, #8b5cf6, #7c3aed);
  box-shadow: 0 5px 0 #5b21b6, 0 8px 20px rgba(124,58,237,0.35);
}
.qa-primary:hover { box-shadow: 0 8px 0 #5b21b6, 0 14px 28px rgba(124,58,237,0.4); }
.qa-primary:active { box-shadow: 0 2px 0 #5b21b6; }

.qa-ppt {
  background: linear-gradient(145deg, #c084fc, #a855f7);
  box-shadow: 0 5px 0 #7e22ce, 0 8px 20px rgba(168,85,247,0.35);
}
.qa-ppt:hover { box-shadow: 0 8px 0 #7e22ce, 0 14px 28px rgba(168,85,247,0.4); }
.qa-ppt:active { box-shadow: 0 2px 0 #7e22ce; }

.qa-battle {
  background: linear-gradient(145deg, #fb7185, #f43f5e);
  box-shadow: 0 5px 0 #be123c, 0 8px 20px rgba(244,63,94,0.35);
}
.qa-battle:hover { box-shadow: 0 8px 0 #be123c, 0 14px 28px rgba(244,63,94,0.4); }
.qa-battle:active { box-shadow: 0 2px 0 #be123c; }

.qa-hw {
  background: linear-gradient(145deg, #34d399, #10b981);
  box-shadow: 0 5px 0 #047857, 0 8px 20px rgba(16,185,129,0.35);
}
.qa-hw:hover { box-shadow: 0 8px 0 #047857, 0 14px 28px rgba(16,185,129,0.4); }
.qa-hw:active { box-shadow: 0 2px 0 #047857; }

.qa-voice {
  background: linear-gradient(145deg, #38bdf8, #0ea5e9);
  box-shadow: 0 5px 0 #0369a1, 0 8px 20px rgba(14,165,233,0.35);
}
.qa-voice:hover { box-shadow: 0 8px 0 #0369a1, 0 14px 28px rgba(14,165,233,0.4); }
.qa-voice:active { box-shadow: 0 2px 0 #0369a1; }

.qa-mock {
  background: linear-gradient(145deg, #fb923c, #f97316);
  box-shadow: 0 5px 0 #c2410c, 0 8px 20px rgba(249,115,22,0.35);
}
.qa-mock:hover { box-shadow: 0 8px 0 #c2410c, 0 14px 28px rgba(249,115,22,0.4); }
.qa-mock:active { box-shadow: 0 2px 0 #c2410c; }

.qa-icon { font-size: 1.8rem; position: relative; z-index: 1; transition: transform 0.2s var(--spring); }
.qa-card:hover .qa-icon { transform: scale(1.14); }
.qa-label { font-size: 0.73rem; font-weight: 800; position: relative; z-index: 1; text-align: center; letter-spacing: 0.01em; }
.qa-arrow { display: none; }
.qa-card::before { display: none; }

/* ===== GAME STATS — COLORFUL CARDS ===== */
.game-stats {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr));
  gap: 0.75rem; padding: 0 4rem 1.75rem;
  max-width: 1100px; margin: 0 auto;
}
.gs-card {
  border-radius: var(--rad); padding: 1.2rem;
  border: none; transition: all 0.22s var(--spring);
  position: relative; overflow: hidden;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
.gs-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }

/* Each stat card gets its own gradient */
.xp-card-v2      { background: linear-gradient(145deg,#f0eaff,#e9d5ff); }
.streak-card-v2  { background: linear-gradient(145deg,#fff7ed,#fed7aa); }
.gs-card:nth-child(3) { background: linear-gradient(145deg,#f0fdf4,#bbf7d0); }
.gs-card:nth-child(4) { background: linear-gradient(145deg,#f0f9ff,#bae6fd); }
.gs-card:nth-child(5) { background: linear-gradient(145deg,#fdf2f8,#fbcfe8); }
.plan-card-v2    { background: linear-gradient(145deg,#fefce8,#fde68a); }

.gs-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.gs-emoji { font-size: 1.3rem; transition: transform 0.3s var(--spring); }
.gs-card:hover .gs-emoji { animation: emojiWiggle 0.45s var(--spring); }
@keyframes emojiWiggle {
  0% { transform: scale(1) rotate(0); }
  30% { transform: scale(1.2) rotate(-8deg); }
  60% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}
.gs-title { font-size: 0.67rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink2); opacity: 0.65; }
.gs-value { font-size: 2rem; font-weight: 900; color: var(--ink); line-height: 1.1; margin-bottom: 0.1rem; }
.gs-sub { font-size: 0.7rem; color: var(--ink2); font-weight: 600; opacity: 0.65; }
.fire-anim { animation: fireShake 0.6s ease-in-out infinite alternate; }
@keyframes fireShake { 0% { transform: rotate(-4deg) scale(1); } 100% { transform: rotate(4deg) scale(1.1); } }
.gs-level-bar { height: 6px; background: rgba(0,0,0,0.08); border-radius: 50px; margin: 0.5rem 0 0.3rem; overflow: hidden; }
.gs-level-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg,var(--p),#a855f7); transition: width 1s ease; }
.gs-level-info { display: flex; justify-content: space-between; }
.gs-level-info span { font-size: 0.66rem; font-weight: 700; color: var(--ink2); opacity: 0.7; }
.gs-level-info span:first-child { color: var(--p); opacity: 1; }
.streak-flames { display: flex; gap: 2px; margin-top: 0.3rem; }
.streak-flame { font-size: 0.55rem; animation: flameFlicker 0.8s ease-in-out infinite alternate; }
@keyframes flameFlicker { 0% { transform: scaleY(0.8); opacity:0.7; } 100% { transform: scaleY(1.1); opacity:1; } }
.gs-upgrade-btn {
  display: block; text-align: center; margin-top: 0.6rem;
  background: var(--amber); color: white;
  font-weight: 800; font-size: 0.7rem; padding: 0.38rem 0.8rem;
  border-radius: 8px; text-decoration: none;
  transition: all 0.2s var(--spring);
  box-shadow: 0 2px 0 #b45309;
}
.gs-upgrade-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #b45309; }

/* ===== MAIN BODY ===== */
.dash-body {
  display: grid; grid-template-columns: 5fr 3fr;
  gap: 1.25rem; padding: 0 4rem 2.5rem;
  max-width: 1100px; margin: 0 auto;
  align-items: start;
}

/* ===== GAME SECTION CARDS ===== */
.game-section {
  background: var(--card); border-radius: var(--rad);
  padding: 1.4rem; margin-bottom: 1.1rem;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 12px rgba(124,58,237,0.04);
  transition: all 0.22s var(--ease);
  position: relative; overflow: hidden;
}
.game-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--p), var(--pink));
  opacity: 0; transition: opacity 0.25s;
}
.game-section:hover::before { opacity: 1; }
.game-section:hover { box-shadow: 0 8px 32px rgba(124,58,237,0.1); }

.ds-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.9rem; }
.ds-header-row h3 { font-size: 1.05rem; font-weight: 900; color: var(--ink); }
.ds-badge {
  font-size: 0.67rem; font-weight: 700; padding: 0.22rem 0.6rem;
  border-radius: 6px; background: #f0eaff; color: var(--p);
}
.ds-badge.danger { background: #fef2f2; color: #ef4444; }
.ds-badge.quest { background: #fffbeb; color: #92400e; }
.ds-sub { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.9rem; line-height: 1.5; }
.ds-link-v2 {
  display: block; text-align: center; margin-top: 0.9rem;
  color: var(--p); font-weight: 800; font-size: 0.82rem;
  text-decoration: none; padding: 0.5rem; border-radius: 10px;
  transition: all 0.2s; background: #f3f0ff;
}
.ds-link-v2::after { content: ' →'; display: inline-block; transition: transform 0.2s var(--spring); }
.ds-link-v2:hover { background: #ede9ff; }
.ds-link-v2:hover::after { transform: translateX(3px); }

/* Skill list */
.skill-list-v2 { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.9rem; }
.skill-item-v2 {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.85rem; border-radius: 10px; background: #f9f7ff;
  transition: all 0.2s; border: 1px solid #f0eaff;
}
.skill-item-v2:hover { background: #f0eaff; transform: translateX(3px); border-color: #ddd6fe; }
.skill-name { flex: 1; font-weight: 700; font-size: 0.85rem; text-transform: capitalize; color: var(--ink); }
.skill-bar { flex: 2; height: 6px; background: #e9d5ff; border-radius: 50px; overflow: hidden; }
.skill-bar-fill { height: 100%; border-radius: 50px; transition: width 0.8s ease; }
.skill-pct { font-weight: 800; font-size: 0.77rem; min-width: 36px; text-align: right; color: var(--p); }

/* Boss battles */
.boss-cards { display: flex; flex-direction: column; gap: 0.55rem; }
.boss-card {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.8rem 0.95rem; border-radius: 12px;
  background: linear-gradient(135deg,#fff1f2,#fff7f0);
  border: 1.5px solid #fecdd3;
  transition: all 0.22s var(--spring); cursor: pointer;
  position: relative; overflow: hidden;
}
.boss-card::before {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg,#f43f5e,#f97316); border-radius: 2px;
}
.boss-card:hover { transform: translateX(4px); box-shadow: 0 6px 20px rgba(244,63,94,0.12); }
.boss-icon { font-size: 1.3rem; animation: bossIdle 2.5s ease-in-out infinite; }
@keyframes bossIdle { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.boss-name { flex: 1; font-weight: 700; font-size: 0.88rem; text-transform: capitalize; color: var(--ink); }
.boss-hp { font-weight: 800; color: #f43f5e; font-size: 0.78rem; background: #fff1f2; padding: 0.2rem 0.55rem; border-radius: 8px; border: 1px solid #fecdd3; }
.boss-attack-btn {
  background: linear-gradient(135deg,#f43f5e,#e11d48);
  color: white; border: none; padding: 0.32rem 0.7rem; border-radius: 8px;
  font-weight: 800; font-size: 0.72rem; cursor: pointer; font-family: var(--font);
  transition: all 0.2s var(--spring);
  box-shadow: 0 3px 0 #be123c; text-decoration: none;
}
.boss-attack-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #be123c; }
.boss-attack-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #be123c; }

/* Leaderboard */
.lb-list { display: flex; flex-direction: column; gap: 0.4rem; }
.lb-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.7rem; border-radius: 10px; background: #f9f7ff;
  font-size: 0.82rem; transition: all 0.2s;
  border: 1px solid transparent;
}
.lb-item:hover { background: #f0eaff; transform: translateX(2px); border-color: #ddd6fe; }
.lb-item.gold { background: #fffbeb; border-color: #fde68a; }
.lb-rank {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--p); color: white;
  font-weight: 800; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lb-item.gold .lb-rank { background: linear-gradient(135deg,#fbbf24,#f59e0b); color: #78350f; }
.lb-name { flex: 1; font-weight: 700; color: var(--ink); }
.lb-xp { font-weight: 800; color: var(--p); font-size: 0.77rem; }
.lb-your-rank {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 0.7rem; padding: 0.55rem 0.75rem; border-radius: 10px;
  background: linear-gradient(135deg,#f0eaff,#fce8ff);
  border: 1.5px solid #ddd6fe;
}
.lb-your-rank span:first-child { font-weight: 700; font-size: 0.82rem; color: var(--ink); }
.lb-your-pos { font-weight: 900; color: var(--p); font-size: 1rem; }

/* Trophies */
.trophy-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.5rem; }
.trophy-item {
  text-align: center; padding: 0.75rem 0.3rem; border-radius: 12px;
  border: 1.5px solid var(--border); transition: all 0.25s var(--spring);
  cursor: pointer; background: #f9f7ff;
}
.trophy-item:hover { transform: scale(1.06) translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,0.1); }
.trophy-item.unlocked { background: linear-gradient(135deg,#f0eaff,#fce8ff); border-color: #ddd6fe; }
.trophy-item.locked { opacity: 0.3; filter: grayscale(0.8); }
.trophy-item.locked:hover { opacity: 0.5; filter: grayscale(0.5); }
.trophy-item span { display: block; font-size: 0.64rem; font-weight: 800; margin-top: 0.25rem; color: var(--muted); }
.trophy-item.unlocked span { color: var(--p); }

/* Sessions */
.session-list-v2 { display: flex; flex-direction: column; gap: 0.4rem; }
.session-item-v2 {
  padding: 0.6rem 0.75rem; border-radius: 10px; background: #f9f7ff;
  font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center;
  transition: all 0.2s; border: 1px solid transparent;
}
.session-item-v2:hover { background: #f0eaff; transform: translateX(3px); border-color: #ddd6fe; }
.si-date { font-weight: 700; color: var(--ink); }
.si-xp {
  font-weight: 800; color: white; font-size: 0.7rem;
  background: linear-gradient(135deg,var(--p),#a855f7);
  padding: 0.18rem 0.55rem; border-radius: 6px;
}

/* Empty states */
.no-data-v2 {
  text-align: center; padding: 2rem 1.2rem; color: var(--pale);
  font-size: 0.85rem; font-weight: 600; border-radius: 12px;
  background: #f9f7ff; border: 1.5px dashed #ddd6fe;
}
.empty-state-card {
  text-align: center; padding: 2rem 1.5rem; border-radius: 16px;
  background: linear-gradient(135deg,#f9f7ff,#fce8ff); border: 1.5px dashed #ddd6fe;
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 0.6rem; display: block; }
.empty-state-title { font-size: 0.95rem; font-weight: 800; color: var(--ink); margin-bottom: 0.3rem; }
.empty-state-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.8rem; }
.empty-state-link {
  display: inline-block; padding: 0.48rem 1.2rem; border-radius: 8px;
  background: linear-gradient(135deg,var(--p),#7c3aed); color: white;
  font-weight: 800; font-size: 0.8rem; text-decoration: none;
  transition: all 0.2s var(--spring);
  box-shadow: 0 3px 0 #5b21b6;
}
.empty-state-link:hover { transform: translateY(-2px); box-shadow: 0 5px 0 #5b21b6; }

/* HW */
.hw-list { display: flex; flex-direction: column; gap: 0.5rem; }
.hw-item {
  padding: 0.65rem 0.8rem; border-radius: 10px; background: #f9f7ff;
  font-size: 0.82rem; display: flex; justify-content: space-between; align-items: center;
  transition: all 0.2s; border: 1px solid transparent;
}
.hw-item:hover { background: #f0eaff; transform: translateX(2px); border-color: #ddd6fe; }
.hw-status { font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: 6px; }
.hw-status.graded { background: #dcfce7; color: #16a34a; }
.hw-status.pending { background: #fef3c7; color: #d97706; }

/* Revision */
.revision-btn {
  width: 100%; padding: 0.75rem; border-radius: 12px;
  background: #f9f7ff; border: 2px dashed #ddd6fe;
  color: var(--p); font-weight: 800; font-size: 0.82rem;
  cursor: pointer; font-family: var(--font); transition: all 0.2s;
}
.revision-btn:hover { background: #f0eaff; border-color: var(--p); transform: translateY(-1px); }
.revision-content { font-size: 0.85rem; line-height: 1.75; white-space: pre-wrap; }

/* Challenge cards */
.ch-card {
  background: #f9f7ff; border: 1.5px solid #e9d5ff; border-radius: 14px;
  padding: 1rem; margin-bottom: 0.55rem; transition: all 0.2s;
}
.ch-card:hover { background: #f0eaff; border-color: #c4b5fd; }
.ch-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.ch-icon { font-size: 1.2rem; }
.ch-name { flex: 1; font-weight: 700; font-size: 0.88rem; color: var(--ink); }
.ch-xp { font-weight: 800; font-size: 0.72rem; color: var(--p); background: #f0eaff; padding: 0.18rem 0.5rem; border-radius: 6px; }
.ch-desc { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.6rem; }
.ch-progress-bar { height: 5px; background: #e9d5ff; border-radius: 50px; overflow: hidden; margin-bottom: 0.3rem; }
.ch-progress-fill { height: 100%; border-radius: 50px; background: linear-gradient(90deg,var(--p),#a855f7); transition: width 0.8s ease; }
.ch-progress-text { font-size: 0.67rem; font-weight: 700; color: var(--pale); text-align: right; }

/* Motivation bar */
.motivation-bar {
  text-align: center; padding: 1.2rem 2rem;
  background: linear-gradient(135deg,#f0eaff,#fce8ff,#fff0f5);
  border-top: 1.5px solid var(--border);
}
.motivation-bar::before, .motivation-bar::after { display: none; }
.motivation-text { color: var(--p); font-size: 0.88rem; font-weight: 700; font-style: italic; }

/* ===== RESPONSIVE ===== */
@media (max-width:1024px) {
  .dash-hero-v2,.missions-section,.game-stats,.dash-body,.quick-actions-v2 { padding-left:2rem; padding-right:2rem; }
  .quick-actions-v2 { grid-template-columns: repeat(3,1fr); }
}
@media (max-width:900px) {
  .dash-hero-v2,.missions-section,.game-stats,.dash-body,.quick-actions-v2 { padding-left:1.5rem; padding-right:1.5rem; }
  .dash-body { grid-template-columns:1fr; }
  .quick-actions-v2 { grid-template-columns:repeat(3,1fr); }
  .game-stats { grid-template-columns:repeat(3,1fr); }
  .dash-hero-inner-v2 { flex-direction:column; text-align:center; gap:1.2rem; }
  .hero-left { flex-direction:column; }
  .hero-badges-row { justify-content:center; }
  .hero-greeting h1 { font-size:1.4rem; }
}
@media (max-width:600px) {
  .quick-actions-v2 { grid-template-columns:repeat(2,1fr); }
  .game-stats { grid-template-columns:repeat(2,1fr); }
  .trophy-grid { grid-template-columns:repeat(3,1fr); }
  .dash-hero-v2 { padding:1.8rem 1.2rem 1.4rem; }
  .hero-greeting h1 { font-size:1.2rem; }
  .daily-reward-box { padding:1.8rem 1.2rem; }
  .dr-title { font-size:1.4rem; }
  .game-section { padding:1.1rem; }
  .mission-card { padding:0.75rem 0.9rem; }
  .gs-card { padding:1rem; }
  .gs-value { font-size:1.6rem; }
}
@media (max-width:400px) {
  .quick-actions-v2 { grid-template-columns:1fr 1fr; gap:0.6rem; }
  .game-stats { grid-template-columns:1fr 1fr; gap:0.6rem; }
  .dr-streak-row { gap:0.25rem; }
  .dr-day { width:30px; height:30px; font-size:0.68rem; border-radius:8px; }
}

/* ===== FOCUS STATES ===== */
.qa-card:focus-visible,.mission-card:focus-visible,.boss-card:focus-visible,
.trophy-item:focus-visible,.dr-claim-btn:focus-visible,.boss-attack-btn:focus-visible,
.revision-btn:focus-visible,.pm-link:focus-visible,.ds-link-v2:focus-visible {
  outline: 2.5px solid var(--p); outline-offset: 2px;
}

/* ===== CHAPTER PROGRESS ===== */
.dash-chapter-progress { max-width:1100px; margin:0 auto 1.75rem; padding:0 4rem; }
.cp-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1.1rem; flex-wrap:wrap; gap:0.6rem; }
.cp-header h3 { font-size:1.2rem; font-weight:900; color:var(--ink); margin:0; }
.cp-summary { font-size:0.82rem; font-weight:700; color:var(--muted); display:flex; align-items:center; gap:0.6rem; }
.cp-done { font-weight:900; color:#059669; font-size:0.95rem; }
.cp-bar { width:100px; height:6px; background:#d1fae5; border-radius:50px; overflow:hidden; }
.cp-bar-fill { height:100%; background:linear-gradient(90deg,#10b981,#34d399); border-radius:50px; transition:width 0.8s ease; }
.cp-sections { display:flex; flex-direction:column; gap:0.8rem; }
.cp-section-card {
  background:var(--card); border-radius:var(--rad); border:1.5px solid var(--border);
  padding:1.2rem; box-shadow:0 2px 10px rgba(124,58,237,0.04); transition:all 0.22s;
}
.cp-section-card:hover { box-shadow:0 6px 24px rgba(124,58,237,0.08); }
.cp-section-title { font-size:0.9rem; font-weight:800; color:var(--ink); margin-bottom:0.7rem; display:flex; align-items:center; gap:0.4rem; }
.cp-section-pct { font-size:0.68rem; font-weight:700; padding:0.14rem 0.48rem; border-radius:6px; margin-left:auto; }
.cp-topics { display:flex; flex-wrap:wrap; gap:0.4rem; }
.cp-topic {
  display:flex; align-items:center; gap:0.45rem; padding:0.42rem 0.72rem;
  border-radius:8px; background:#f9f7ff; cursor:pointer;
  transition:all 0.15s; border:1.5px solid var(--border); font-size:0.77rem;
}
.cp-topic:hover { background:#f0eaff; border-color:#c4b5fd; }
.cp-topic.completed { background:#ecfdf5; border-color:#a7f3d0; }
.cp-check {
  width:18px; height:18px; border-radius:50%; border:2px solid #d1d5db;
  display:flex; align-items:center; justify-content:center; font-size:0.65rem;
  flex-shrink:0; transition:all 0.15s;
}
.cp-topic.completed .cp-check { background:#10b981; border-color:#10b981; color:white; }
.cp-topic-name { font-size:0.77rem; font-weight:700; color:#374151; }
.cp-topic.completed .cp-topic-name { color:#059669; text-decoration:line-through; text-decoration-color:rgba(5,150,105,0.3); }
.cp-topic-marks { font-size:0.65rem; font-weight:700; color:var(--pale); white-space:nowrap; }
.cp-topic-exam { font-size:0.58rem; font-weight:700; color:white; background:var(--p); padding:0.08rem 0.32rem; border-radius:4px; white-space:nowrap; }
.cp-learn-btn { margin-left:auto; font-size:0.67rem; font-weight:700; color:#8b5cf6; background:#f3e8ff; padding:0.1rem 0.48rem; border-radius:6px; text-decoration:none; white-space:nowrap; transition:all 0.15s; }
.cp-learn-btn:hover { background:#ede9fe; color:#6d28d9; }
.cp-ppt-btn { font-size:0.67rem; font-weight:700; color:#f43f5e; background:#fff1f2; padding:0.1rem 0.48rem; border-radius:6px; text-decoration:none; white-space:nowrap; transition:all 0.15s; }
.cp-ppt-btn:hover { background:#ffe4e6; color:#e11d48; }
@media (max-width:1024px) { .dash-chapter-progress { padding:0 2rem; } }

/* ===== LEGACY COMPAT — weakness-dashboard.html & other pages ===== */

/* Old hero (weakness page uses .dash-hero / .dash-hero-inner) */
.dash-hero {
  padding: 2.5rem 4rem 2rem;
  background: linear-gradient(135deg, #2e1065 0%, #4c1d95 30%, #5b21b6 60%, #9d174d 100%);
  position: relative; overflow: hidden;
}
.dash-hero::before {
  content: '';
  position: absolute; width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  top: -80px; right: 10%; border-radius: 50%; pointer-events: none;
}
.dash-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.dash-welcome h1 { font-size: 1.8rem; font-weight: 900; color: white; margin: 0 0 0.4rem; }
.dash-welcome p { color: rgba(255,255,255,0.75); font-size: 0.95rem; font-weight: 600; margin: 0; }
.dash-quick-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.dqa-btn {
  padding: 0.6rem 1.2rem; border-radius: 12px;
  background: rgba(255,255,255,0.12); color: white;
  font-weight: 800; font-size: 0.82rem; border: 1.5px solid rgba(255,255,255,0.2);
  cursor: pointer; font-family: var(--font); text-decoration: none;
  transition: all 0.2s; display: inline-block;
}
.dqa-btn:hover { background: rgba(255,255,255,0.22); transform: translateY(-2px); }
.dqa-btn.primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  border-color: transparent;
  box-shadow: 0 4px 0 #5b21b6;
}
.dqa-btn.primary:hover { box-shadow: 0 6px 0 #5b21b6; transform: translateY(-3px); }

/* Old stat cards (weakness page uses .dash-stats / .stat-card) */
.dash-stats {
  display: flex; gap: 1rem; flex-wrap: wrap;
  max-width: 1100px; margin: 1.5rem auto;
  padding: 0 4rem;
}
.stat-card {
  flex: 1; min-width: 140px;
  background: white; border-radius: 16px;
  padding: 1.2rem 1rem; text-align: center;
  border: 2px solid #ede8ff;
  box-shadow: 0 2px 12px rgba(124,58,237,0.07);
  transition: all 0.25s var(--spring);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(124,58,237,0.12); }
.sc-icon { font-size: 1.6rem; margin-bottom: 0.35rem; display: block; }
.sc-value {
  font-size: 2rem; font-weight: 900; color: var(--ink); line-height: 1;
  margin-bottom: 0.25rem; display: block;
}
.sc-label { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Old dash-body (weakness page uses .dash-body with grid-template-columns:1fr override) */
.dash-body {
  max-width: 1100px; margin: 0 auto 2rem;
  padding: 0 4rem;
  display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .dash-stats, .dash-body { padding: 0 2rem; }
}
@media (max-width: 700px) {
  .dash-hero { padding: 1.8rem 1.2rem; }
  .dash-stats { padding: 0 1.2rem; }
  .dash-body { padding: 0 1.2rem; grid-template-columns: 1fr; }
  .dash-welcome h1 { font-size: 1.3rem; }
}
@media (max-width:768px) {
  .dash-chapter-progress { padding:0 1.5rem; }
  .cp-header { flex-direction:column; align-items:flex-start; }
  .cp-topic-exam { display:none; }
}

/* ===== AUDIO PPT ===== */
.ppt-topics-section { max-width:960px; margin:0 auto 1.75rem; padding:0 1.5rem; }
.ppt-topics-header { margin-bottom:1rem; }
.ppt-topics-header h3 { font-size:1.2rem; font-weight:900; color:var(--ink); margin-bottom:0.2rem; }
.ppt-topics-sub { font-size:0.85rem; color:var(--muted); font-weight:600; }
.ppt-lang-picker { display:flex; gap:0.4rem; margin-bottom:0.75rem; flex-wrap:wrap; }
.ppt-lang-tab {
  padding:0.32rem 0.85rem; border-radius:8px; border:1.5px solid var(--border);
  background:var(--card); font-family:var(--font); font-weight:700; font-size:0.8rem;
  color:var(--muted); cursor:pointer; transition:all 0.2s var(--spring);
}
.ppt-lang-tab:hover { border-color:var(--p); color:var(--p); }
.ppt-lang-tab.active {
  background:linear-gradient(135deg,var(--p),#7c3aed); color:white;
  border-color:transparent; box-shadow:0 3px 0 #5b21b6;
}
.ppt-topics-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:0.75rem; }
.ppt-topic-card {
  background:var(--card); border:1.5px solid var(--border); border-radius:var(--rad);
  padding:0.9rem 1.1rem; text-decoration:none; color:inherit;
  display:flex; align-items:center; gap:0.75rem;
  box-shadow:0 2px 8px rgba(124,58,237,0.04);
  transition:all 0.22s var(--spring); cursor:pointer;
}
.ppt-topic-card:hover { transform:translateY(-3px); box-shadow:0 8px 28px rgba(168,85,247,0.12); border-color:#ddd6fe; }
.ppt-topic-icon {
  width:42px; height:42px; border-radius:12px;
  background:linear-gradient(135deg,#c084fc,#a855f7);
  display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex-shrink:0;
}
.ppt-topic-info { flex:1; min-width:0; }
.ppt-topic-name { font-size:0.9rem; font-weight:800; color:var(--ink); margin-bottom:0.1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ppt-topic-meta { font-size:0.72rem; font-weight:600; color:var(--muted); }
.ppt-topic-arrow { font-size:1rem; color:#ddd6fe; transition:all 0.2s; flex-shrink:0; }
.ppt-topic-card:hover .ppt-topic-arrow { color:#a855f7; transform:translateX(3px); }
.ppt-no-topics { grid-column:1/-1; text-align:center; padding:1.5rem; color:var(--muted); font-weight:700; font-size:0.9rem; }
@media (max-width:640px) { .ppt-topics-grid { grid-template-columns:1fr; } .ppt-topics-section { padding:0 1rem; } }

/* ===== MY TEXTBOOK ===== */
.textbook-section {
  max-width: 960px;
  margin: 0 auto 1.25rem;
  padding: 0 1.5rem;
}
.textbook-card {
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(124,58,237,0.04);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.15rem;
}
.textbook-card.missing {
  background: linear-gradient(135deg, #fff7ed, #fff);
  border-color: #fed7aa;
}
.textbook-main {
  align-items: center;
  display: flex;
  gap: 0.85rem;
  min-width: 0;
}
.textbook-icon {
  align-items: center;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  border-radius: 14px;
  display: flex;
  flex: 0 0 auto;
  font-size: 1.35rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}
.textbook-eyebrow {
  color: var(--p);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.textbook-card h3,
.textbook-modal h2 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  margin: 0.08rem 0;
}
.textbook-card p,
.textbook-modal p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}
.textbook-action,
.textbook-secondary {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0.62rem 1rem;
  white-space: nowrap;
}
.textbook-action {
  background: linear-gradient(135deg, var(--p), #7c3aed);
  box-shadow: 0 3px 0 #5b21b6;
  color: #fff;
}
.textbook-secondary {
  background: #f3f0ff;
  color: var(--p);
}
.textbook-action.wide,
.textbook-secondary.wide { width: 100%; }
.textbook-modal {
  align-items: center;
  background: rgba(15,10,40,0.58);
  backdrop-filter: blur(8px);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 10000;
}
.textbook-modal.open { display: flex; }
.textbook-modal-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.24);
  max-height: 90vh;
  max-width: 640px;
  overflow: auto;
  padding: 1.25rem;
  position: relative;
  width: min(640px, 94vw);
}
.textbook-modal-close {
  background: #f3f4f6;
  border: none;
  border-radius: 999px;
  color: #4b5563;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
  height: 34px;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 34px;
}
.textbook-modal-head { padding-right: 2.5rem; }
.textbook-tabs {
  background: #f8fafc;
  border-radius: 12px;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: 1fr 1fr;
  margin: 1rem 0;
  padding: 0.3rem;
}
.textbook-tab {
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  font-weight: 900;
  padding: 0.6rem;
}
.textbook-tab.active {
  background: #fff;
  box-shadow: 0 2px 10px rgba(124,58,237,0.08);
  color: var(--p);
}
.textbook-list {
  display: grid;
  gap: 0.65rem;
}
.textbook-option {
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.85rem;
}
.textbook-option strong {
  color: var(--ink);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.textbook-option span {
  color: var(--muted);
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
}
.textbook-loading,
.textbook-msg {
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.8rem;
  text-align: center;
}
.textbook-msg { margin-bottom: 0.75rem; }
.textbook-msg.success { background: #ecfdf5; color: #047857; }
.textbook-msg.error { background: #fef2f2; color: #dc2626; }
.textbook-upload-box {
  display: grid;
  gap: 0.65rem;
}
.textbook-upload-box label {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}
.textbook-upload-box input,
.textbook-upload-box textarea {
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem;
  width: 100%;
}
.textbook-remove-row {
  margin-top: 0.75rem;
  text-align: center;
}
.textbook-remove-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: underline;
}
.textbook-not-listed {
  border-top: 1px solid #eef2ff;
  margin-top: 1rem;
  padding-top: 0.85rem;
}
.textbook-not-listed .textbook-upload-box {
  margin-top: 0.75rem;
}
@media (max-width:640px) {
  .textbook-section { padding: 0 1rem; }
  .textbook-card,
  .textbook-option {
    align-items: stretch;
    flex-direction: column;
  }
  .textbook-action,
  .textbook-secondary { width: 100%; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; }
}

/* ===== PAGE ENTRANCE ANIMATIONS ===== */
@keyframes fadeUp { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:translateY(0); } }
.dash-hero-v2 { animation:fadeUp 0.45s ease both; }
.missions-section { animation:fadeUp 0.45s ease 0.06s both; }
.quick-actions-v2 { animation:fadeUp 0.45s ease 0.1s both; }
.game-stats { animation:fadeUp 0.45s ease 0.14s both; }
.dash-chapter-progress { animation:fadeUp 0.45s ease 0.18s both; }
.dash-body { animation:fadeUp 0.45s ease 0.22s both; }
