/* ══════════════════════════════════════════════════════
   Gamefica, Prof — Design System
   Cores: Roxo • Dourado • Branco
══════════════════════════════════════════════════════ */

:root {
  --purple-900: #1E1B4B;
  --purple-800: #2D2567;
  --purple-700: #4A235A;
  --purple-600: #6B21A8;
  --purple-500: #7C3AED;
  --purple-400: #8B5CF6;
  --purple-300: #A78BFA;
  --purple-100: #EDE9FE;
  --purple-50:  #F5F3FF;

  --gold-600:  #B45309;
  --gold-500:  #D97706;
  --gold-400:  #F59E0B;
  --gold-300:  #FCD34D;
  --gold-100:  #FEF3C7;

  --white:     #FFFFFF;
  --gray-50:   #F9FAFB;
  --gray-100:  #F3F4F6;
  --gray-200:  #E5E7EB;
  --gray-400:  #9CA3AF;
  --gray-600:  #4B5563;
  --gray-800:  #1F2937;

  --success:   #10B981;
  --danger:    #EF4444;
  --info:      #3B82F6;
  --warning:   #F59E0B;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.10);
  --shadow:    0 4px 20px rgba(0,0,0,.15);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.20);
  --shadow-purple: 0 4px 20px rgba(124,58,237,.30);

  --transition: .25s ease;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Reset & Base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--purple-500); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--purple-600); }

img { max-width: 100%; height: auto; display: block; }

/* ── Typography ──────────────────────────────────── */
h1,h2,h3,h4,h5 { line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--gray-600); }

/* ── Utility ─────────────────────────────────────── */
.text-center { text-align: center; }
.text-gold   { color: var(--gold-400); }
.text-purple { color: var(--purple-500); }
.text-white  { color: var(--white); }
.fw-bold     { font-weight: 700; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-sm      { gap: .5rem; }
.gap         { gap: 1rem; }
.gap-lg      { gap: 1.5rem; }
.mt-1        { margin-top: .5rem; }
.mt-2        { margin-top: 1rem; }
.mt-3        { margin-top: 1.5rem; }
.mb-2        { margin-bottom: 1rem; }
.mb-3        { margin-bottom: 1.5rem; }
.w-full      { width: 100%; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
  color: var(--white);
  box-shadow: var(--shadow-purple);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--purple-600), var(--purple-700)); color: var(--white); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--purple-900);
  box-shadow: 0 4px 14px rgba(245,158,11,.40);
}
.btn-gold:hover { background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); color: var(--purple-900); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--purple-400);
  color: var(--purple-500);
}
.btn-outline:hover { background: var(--purple-50); }

.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255,255,255,.5);
  color: var(--white);
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn-lg { padding: .9rem 2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }

/* ── Navigation ──────────────────────────────────── */
.navbar {
  background: linear-gradient(135deg, var(--purple-900), var(--purple-800));
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
}
.navbar-brand span { color: var(--gold-400); }
.navbar-brand:hover { color: var(--white); }
.navbar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.navbar-nav a {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .85rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
  background: rgba(255,255,255,.12);
  color: var(--white);
}
.navbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

/* XP Display in Navbar */
.xp-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(245,158,11,.4);
  border-radius: 30px;
  padding: .35rem .75rem;
  color: var(--gold-300);
  font-size: .85rem;
  font-weight: 700;
}

/* Notification Bell */
.notif-btn {
  position: relative;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  font-size: 1.1rem;
  transition: all var(--transition);
}
.notif-btn:hover { background: rgba(255,255,255,.2); }
.notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: .25rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .3s;
}

/* ── Hero Section ────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--purple-900) 0%, var(--purple-700) 50%, var(--purple-600) 100%);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 800px; margin: 0 auto; }
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 span { color: var(--gold-400); }
.hero p { color: rgba(255,255,255,.8); font-size: 1.15rem; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Floating decorations */
.hero-deco {
  position: absolute;
  font-size: 4rem;
  opacity: .08;
  animation: float 6s ease-in-out infinite;
}
.hero-deco:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.hero-deco:nth-child(2) { top: 60%; left: 10%; animation-delay: 1s; }
.hero-deco:nth-child(3) { top: 20%; right: 8%; animation-delay: 2s; }
.hero-deco:nth-child(4) { bottom: 15%; right: 5%; animation-delay: 3s; }
@keyframes float {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-20px) rotate(5deg); }
}

/* ── Cards ───────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-header h3 { margin: 0; font-size: 1.05rem; color: var(--gray-800); }

/* Module Cards */
.module-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all .3s;
  cursor: pointer;
}
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.module-card-header {
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
}
.module-card-header::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.module-card-body { padding: 1.5rem 1.75rem; background: var(--white); }
.module-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.module-card-header h2 { color: var(--white); font-size: 1.4rem; }
.module-card-header p { color: rgba(255,255,255,.8); font-size: .95rem; margin-top: .25rem; }

.module-1 .module-card-header { background: linear-gradient(135deg, #6B21A8, #7C3AED); }
.module-2 .module-card-header { background: linear-gradient(135deg, #4A235A, #7B2D8B); }
.module-3 .module-card-header { background: linear-gradient(135deg, #B45309, #D97706); }

/* ── Grid ────────────────────────────────────────── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ── Container ───────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }

/* ── Page Header ─────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--purple-900), var(--purple-800));
  padding: 2.5rem 1.5rem;
  color: var(--white);
}
.page-header h1 { color: var(--white); font-size: 1.75rem; }
.page-header p { color: rgba(255,255,255,.7); margin-top: .25rem; }
.page-header-inner { max-width: 1200px; margin: 0 auto; }

/* ── XP Bar ──────────────────────────────────────── */
.xp-bar-container {
  background: var(--gray-200);
  border-radius: 20px;
  height: 12px;
  overflow: hidden;
  position: relative;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-500), var(--gold-400));
  border-radius: 20px;
  transition: width 1s ease;
  position: relative;
}
.xp-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3));
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { opacity: 0; transform: translateX(-10px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateX(10px); }
}

/* ── Level Badge ─────────────────────────────────── */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--purple-900);
  padding: .35rem .85rem;
  border-radius: 30px;
  font-weight: 800;
  font-size: .85rem;
}

/* ── Badges ──────────────────────────────────────── */
.badge-grid { display: flex; flex-wrap: wrap; gap: .75rem; }
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .85rem .75rem;
  min-width: 90px;
  transition: all var(--transition);
  position: relative;
}
.badge-item.earned {
  border-color: var(--gold-400);
  background: var(--gold-100);
}
.badge-item.locked { opacity: .45; filter: grayscale(1); }
.badge-icon { font-size: 2rem; }
.badge-name { font-size: .72rem; font-weight: 600; text-align: center; color: var(--gray-600); }
.badge-item.earned .badge-name { color: var(--gold-600); }

/* ── Stars ───────────────────────────────────────── */
.stars-display { display: flex; gap: .2rem; }
.star { font-size: 1.4rem; color: var(--gray-300); }
.star.earned { color: var(--gold-400); filter: drop-shadow(0 0 4px rgba(245,158,11,.6)); }

/* ── Lesson / Tool Card ──────────────────────────── */
.lesson-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}
.lesson-card:hover { border-color: var(--purple-400); box-shadow: var(--shadow-sm); background: var(--purple-50); }
.lesson-card.done { border-color: var(--success); background: #F0FDF4; }
.lesson-number {
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-100);
  color: var(--purple-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .95rem;
}
.lesson-card.done .lesson-number { background: var(--success); color: var(--white); }
.lesson-info { flex: 1; }
.lesson-info h4 { font-size: 1rem; color: var(--gray-800); margin-bottom: .15rem; }
.lesson-info span { font-size: .82rem; color: var(--gray-400); }
.lesson-xp {
  font-size: .8rem;
  font-weight: 700;
  color: var(--purple-500);
  background: var(--purple-50);
  padding: .2rem .5rem;
  border-radius: 20px;
}

/* ── Forms ───────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--gray-700);
  margin-bottom: .45rem;
}
.form-control {
  width: 100%;
  padding: .7rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .8rem; color: var(--gray-400); margin-top: .35rem; }

/* ── Alerts ──────────────────────────────────────── */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 500;
  font-size: .95rem;
  animation: slideDown .3s ease;
}
@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ── Dashboard Stats ─────────────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-left: 4px solid var(--purple-500);
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }
.stat-card.gold  { border-left-color: var(--gold-400); }
.stat-card.green { border-left-color: var(--success); }
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--purple-100);
  flex-shrink: 0;
}
.stat-card.gold  .stat-icon { background: var(--gold-100); }
.stat-card.green .stat-icon { background: #D1FAE5; }
.stat-info h3 { font-size: 1.6rem; color: var(--gray-800); }
.stat-info p  { font-size: .82rem; color: var(--gray-400); margin: 0; }

/* ── Experience Cards (M3) ───────────────────────── */
.exp-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.exp-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.exp-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--purple-100), var(--purple-200));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
.exp-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.exp-card-body h4 { color: var(--gray-800); margin-bottom: .5rem; font-size: 1rem; }
.exp-card-body p  { font-size: .88rem; color: var(--gray-500); flex: 1; }
.exp-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.exp-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--purple-100);
  color: var(--purple-600);
  padding: .25rem .65rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}
.exp-tag.gold { background: var(--gold-100); color: var(--gold-600); }

/* ── Video Embed ─────────────────────────────────── */
.video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Content Area ────────────────────────────────── */
.content-body { line-height: 1.8; }
.content-body h2 { color: var(--purple-700); margin: 2rem 0 1rem; }
.content-body h3 { color: var(--purple-600); margin: 1.5rem 0 .75rem; }
.content-body p  { color: var(--gray-600); margin-bottom: 1rem; }
.content-body ul, .content-body ol { padding-left: 1.5rem; color: var(--gray-600); margin-bottom: 1rem; }
.content-body li { margin-bottom: .4rem; }
.content-body blockquote {
  border-left: 4px solid var(--gold-400);
  background: var(--gold-100);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  color: var(--gray-700);
  font-style: italic;
}
.content-body strong { color: var(--gray-800); }
.content-body code {
  background: var(--purple-50);
  color: var(--purple-700);
  padding: .15rem .4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: .9em;
}

/* ── Auth Pages ──────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--purple-900), var(--purple-800));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo .logo-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: .75rem;
  box-shadow: 0 4px 20px rgba(245,158,11,.4);
}
.auth-logo h1 { font-size: 1.5rem; color: var(--purple-900); }
.auth-logo h1 span { color: var(--gold-500); }
.auth-logo p { color: var(--gray-400); font-size: .9rem; }
.auth-divider {
  text-align: center;
  position: relative;
  margin: 1.25rem 0;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gray-200);
}
.auth-divider span {
  position: relative;
  background: var(--white);
  padding: 0 .75rem;
  color: var(--gray-400);
  font-size: .85rem;
}

/* ── Tabs ────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .65rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--gray-400);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--purple-600); border-bottom-color: var(--purple-600); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Notification Dropdown ───────────────────────── */
.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: .5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.notif-dropdown.open { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-item {
  display: flex;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.notif-item:hover { background: var(--gray-50); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--purple-50); }
.notif-emoji { font-size: 1.4rem; flex-shrink: 0; }
.notif-text { font-size: .85rem; color: var(--gray-600); }
.notif-time { font-size: .75rem; color: var(--gray-400); margin-top: .2rem; }
.notif-header {
  padding: .75rem 1rem;
  font-weight: 700;
  font-size: .9rem;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--white);
}

/* ── XP Popup ────────────────────────────────────── */
.xp-popup {
  position: fixed;
  top: 90px;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
  color: var(--white);
  padding: .85rem 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-purple);
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  z-index: 9999;
  transform: translateX(150%);
  transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: .95rem;
}
.xp-popup.show { transform: translateX(0); }
.xp-popup-icon { font-size: 1.4rem; }

/* ── Progress Module ─────────────────────────────── */
.module-progress {
  background: var(--purple-50);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--purple-200);
}
.module-progress h4 { color: var(--purple-700); margin-bottom: .75rem; font-size: .95rem; }

/* ── Footer ──────────────────────────────────────── */
.footer {
  background: var(--purple-900);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 2.5rem 1.5rem;
  margin-top: 4rem;
}
.footer p { font-size: .9rem; }
.footer strong { color: var(--gold-400); }

/* ── Admin Badge ─────────────────────────────────── */
.admin-badge {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--purple-900);
  padding: .2rem .55rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── Breadcrumb ──────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  margin-bottom: .5rem;
}
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb-sep { opacity: .5; }

/* ── Chips / Tags ────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--purple-100);
  color: var(--purple-700);
  padding: .3rem .75rem;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
}

/* ── Empty State ─────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-400);
}
.empty-state-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: .5; }
.empty-state h3 { color: var(--gray-500); margin-bottom: .5rem; }

/* ── Filters ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-select {
  padding: .55rem .9rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--purple-400); }
.search-input {
  flex: 1;
  min-width: 200px;
  padding: .55rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--purple-400); }

/* ── Like Button ─────────────────────────────────── */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 2px solid var(--gray-200);
  border-radius: 30px;
  padding: .4rem .9rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--gray-500);
  font-weight: 600;
  transition: all var(--transition);
}
.like-btn:hover { border-color: var(--danger); color: var(--danger); }
.like-btn.liked { border-color: var(--danger); color: var(--danger); background: #FEE2E2; }

/* ── Spinner ─────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(124,58,237,.2);
  border-top-color: var(--purple-500);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── File Upload ─────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--gray-50);
}
.upload-area:hover { border-color: var(--purple-400); background: var(--purple-50); }
.upload-area.dragover { border-color: var(--purple-500); background: var(--purple-50); }
.upload-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.upload-area p { color: var(--gray-400); font-size: .9rem; }

/* ── Responsive ──────────────────────────────────── */
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .navbar-nav   { display: none; }
  .hamburger    { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section      { padding: 2.5rem 0; }
  .hero         { padding: 3.5rem 1rem; }
  .auth-card    { padding: 1.75rem; }
  .navbar-inner { height: 60px; }
  .mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--purple-900);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: .5rem;
    transform: translateX(-100%);
    transition: transform .3s;
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: background var(--transition);
  }
  .mobile-menu a:hover { background: rgba(255,255,255,.1); }
  .mobile-menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
  }
  .mobile-menu-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
  }
  .mobile-menu-brand span { color: var(--gold-400); }
}
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
}

/* ── Landing Sections ────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border-top: 4px solid var(--purple-400);
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { color: var(--purple-800); margin-bottom: .5rem; }
.feature-card p { font-size: .92rem; }

/* How it works steps */
.steps { display: flex; flex-direction: column; gap: 1.5rem; max-width: 700px; margin: 0 auto; }
.step { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-num {
  min-width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-purple);
  flex-shrink: 0;
}
.step-body h4 { color: var(--purple-800); margin-bottom: .25rem; }
.step-body p { font-size: .92rem; }

/* ── Section Title ───────────────────────────────── */
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { color: var(--purple-900); margin-bottom: .5rem; }
.section-title p { color: var(--gray-500); max-width: 560px; margin: 0 auto; }
.title-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--purple-500), var(--gold-400));
  border-radius: 4px;
  margin: .75rem auto 0;
}

/* ── Sidebar Layout ──────────────────────────────── */
.layout-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .layout-sidebar { grid-template-columns: 1fr; } }
.sidebar { position: sticky; top: 90px; }
.sidebar-card { background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }

/* ── Progress Tracker ────────────────────────────── */
.progress-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.progress-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .88rem;
  color: var(--gray-600);
  padding: .4rem 0;
}
.progress-item .check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  flex-shrink: 0;
}
.progress-item.done .check { background: var(--success); border-color: var(--success); color: var(--white); }
.progress-item.active .check { border-color: var(--purple-500); }
.progress-item.done { color: var(--gray-400); }

/* ── Ribbon ──────────────────────────────────────── */
.ribbon {
  position: absolute;
  top: 1rem;
  right: -8px;
  background: var(--gold-400);
  color: var(--purple-900);
  font-size: .72rem;
  font-weight: 800;
  padding: .2rem .65rem;
  border-radius: 4px;
}
.ribbon::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -6px;
  border: 3px solid var(--gold-600);
  border-right-color: transparent;
  border-bottom-color: transparent;
}

/* ── Overlay (modal bg) ──────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 900;
  display: none;
  backdrop-filter: blur(2px);
}
.overlay.open { display: block; }
