/* ============================================================
   ConceptTyping — Main Design System
   Dark charcoal theme, electric green accents, premium UI
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* ─── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
  /* Base Colors */
  --bg-primary:    #0f0f11;
  --bg-secondary:  #161618;
  --bg-tertiary:   #1e1e22;
  --bg-card:       #18181c;
  --bg-elevated:   #212128;
  --bg-hover:      #26262e;

  /* Text */
  --text-primary:  #e8e8f0;
  --text-secondary:#9999b3;
  --text-muted:    #5a5a72;
  --text-disabled: #3a3a4a;

  /* Accents */
  --green:         #39d353;
  --green-glow:    rgba(57,211,83,0.15);
  --green-dim:     rgba(57,211,83,0.6);
  --red:           #e85555;
  --red-glow:      rgba(232,85,85,0.15);
  --orange:        #ff9f43;
  --orange-glow:   rgba(255,159,67,0.15);
  --blue:          #6c63ff;
  --blue-glow:     rgba(108,99,255,0.15);
  --blue-light:    #a29bfe;
  --yellow:        #ffd32a;
  --cyan:          #00d2d3;
  --purple:        #a55eea;

  /* Borders */
  --border:        rgba(255,255,255,0.06);
  --border-hover:  rgba(255,255,255,0.12);
  --border-accent: rgba(108,99,255,0.3);

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow:   0 0 24px var(--blue-glow);

  /* Typography */
  --font-ui:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full:9999px;

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}

/* Light theme */
[data-theme="light"] {
  --bg-primary:    #f5f5f7;
  --bg-secondary:  #ffffff;
  --bg-tertiary:   #f0f0f4;
  --bg-card:       #ffffff;
  --bg-elevated:   #f8f8fc;
  --bg-hover:      #f0f0f4;
  --text-primary:  #1a1a2e;
  --text-secondary:#5a5a7a;
  --text-muted:    #8a8aaa;
  --text-disabled: #c0c0d0;
  --border:        rgba(0,0,0,0.08);
  --border-hover:  rgba(0,0,0,0.15);
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.1);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.16);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ui);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Selection */
::selection { background: var(--blue-glow); color: var(--text-primary); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

p { color: var(--text-secondary); line-height: 1.7; }
a { color: var(--blue-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue); }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-elevated); padding: 2px 6px; border-radius: var(--radius-sm); }

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(15,15,17,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  transition: background var(--transition-slow);
}
[data-theme="light"] .navbar { background: rgba(245,245,247,0.85); }

.navbar-brand {
  font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}
.navbar-brand:hover { opacity: 0.85; }

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500; font-size: 0.9rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--radius-md);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary) !important;
  background: var(--bg-elevated);
}
.nav-link.active::after {
  content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--blue); border-radius: 1px;
}

.navbar-toggler { border: 1px solid var(--border); padding: 6px 10px; }
.navbar-toggler-icon { filter: invert(0.8); }

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem; line-height: 1;
}
.theme-toggle:hover { background: var(--bg-hover); border-color: var(--border-hover); }

/* User Dropdown */
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: #fff;
  cursor: pointer;
}
.dropdown-menu {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 0.5rem !important;
  box-shadow: var(--shadow-lg) !important;
}
.dropdown-item {
  color: var(--text-secondary) !important;
  border-radius: var(--radius-md) !important;
  padding: 0.6rem 1rem !important;
  font-size: 0.9rem;
  transition: all var(--transition);
}
.dropdown-item:hover { color: var(--text-primary) !important; background: var(--bg-hover) !important; }
.dropdown-divider { border-color: var(--border) !important; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
  position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0); transition: background var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,99,255,0.35);
}
.btn-primary:hover { background: #5a52e0; box-shadow: 0 6px 20px rgba(108,99,255,0.5); color: #fff; }

.btn-success {
  background: var(--green);
  color: #000;
  box-shadow: 0 4px 15px rgba(57,211,83,0.3);
}
.btn-success:hover { background: #2fc44a; color: #000; }

.btn-danger  { background: var(--red);    color: #fff; }
.btn-warning { background: var(--orange); color: #000; }

.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--blue);
}
.btn-outline-primary:hover { background: var(--blue-glow); color: var(--blue); }

.btn-ghost {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--border-hover); color: var(--text-primary); }

.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; border-radius: var(--radius-sm); }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.ct-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.ct-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.ct-card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.ct-card-accent { border-top: 3px solid var(--blue); }
.ct-card-green  { border-top: 3px solid var(--green); }
.ct-card-red    { border-top: 3px solid var(--red); }
.ct-card-orange { border-top: 3px solid var(--orange); }

/* ─── Stat Cards ─────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.stat-card .stat-label {
  font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
}
.stat-card .stat-value {
  font-size: 1.8rem; font-weight: 800;
  color: var(--text-primary); line-height: 1; font-family: var(--font-mono);
}
.stat-card .stat-unit { font-size: 0.9rem; color: var(--text-secondary); font-weight: 400; }
.stat-card .stat-icon {
  font-size: 1.5rem; margin-bottom: 0.5rem; opacity: 0.7;
}

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.badge-ct {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-easy   { background: rgba(57,211,83,0.15);  color: var(--green); }
.badge-medium { background: rgba(255,159,67,0.15); color: var(--orange); }
.badge-hard   { background: rgba(232,85,85,0.15);  color: var(--red); }
.badge-blue   { background: var(--blue-glow);       color: var(--blue-light); }
.badge-purple { background: rgba(165,94,234,0.15); color: var(--purple); }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--bg-elevated) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  padding: 0.65rem 1rem !important;
  transition: border-color var(--transition), box-shadow var(--transition) !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px var(--blue-glow) !important;
  background: var(--bg-elevated) !important;
  outline: none !important;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label { color: var(--text-secondary); font-weight: 500; font-size: 0.87rem; margin-bottom: 0.4rem; }
.form-check-input:checked { background-color: var(--blue); border-color: var(--blue); }
.form-text { color: var(--text-muted); font-size: 0.8rem; }
.invalid-feedback { color: var(--red); font-size: 0.82rem; }

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.alert-ct {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  font-size: 0.9rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
}
.alert-success { background: var(--green-glow);  border-color: var(--green);  color: var(--green); }
.alert-error   { background: var(--red-glow);    border-color: var(--red);    color: var(--red); }
.alert-warning { background: var(--orange-glow); border-color: var(--orange); color: var(--orange); }
.alert-info    { background: var(--blue-glow);   border-color: var(--blue);   color: var(--blue-light); }

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.ct-table { width: 100%; border-collapse: collapse; }
.ct-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.9rem 1.2rem;
  text-align: left; border-bottom: 1px solid var(--border);
}
.ct-table td {
  padding: 0.9rem 1.2rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.ct-table tr:hover td { background: var(--bg-elevated); color: var(--text-primary); }
.ct-table tr:last-child td { border-bottom: none; }

/* ─── Modals ─────────────────────────────────────────────────────────────── */
.modal-ct .modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.modal-ct .modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}
.modal-ct .modal-title { font-weight: 700; color: var(--text-primary); }
.modal-ct .modal-body { padding: 1.5rem; }
.modal-ct .modal-footer { border-top: 1px solid var(--border); padding: 1rem 1.5rem; }
.modal-backdrop { background: rgba(0,0,0,0.7) !important; backdrop-filter: blur(4px); }
.btn-close { filter: invert(1); opacity: 0.6; }
.btn-close:hover { opacity: 1; }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination-ct { display: flex; gap: 0.25rem; align-items: center; }
.page-btn {
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary); padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md); font-size: 0.85rem; cursor: pointer;
  transition: all var(--transition);
}
.page-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* ─── Toast Notifications ────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.ct-toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  min-width: 280px; max-width: 400px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.75rem;
  animation: slideInRight 0.3s ease;
  font-size: 0.9rem;
}
.ct-toast.success { border-left: 3px solid var(--green); }
.ct-toast.error   { border-left: 3px solid var(--red); }
.ct-toast.info    { border-left: 3px solid var(--blue); }
.ct-toast.warning { border-left: 3px solid var(--orange); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ─── Loading States ─────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--bg-elevated) 0%, var(--bg-hover) 50%, var(--bg-elevated) 100%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Section Headings ────────────────────────────────────────────────────── */
.section-heading {
  text-align: center; margin-bottom: 3rem;
}
.section-heading .eyebrow {
  display: inline-block;
  color: var(--blue);
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}
.section-heading h2 { color: var(--text-primary); }
.section-heading p  { color: var(--text-secondary); max-width: 600px; margin: 0.75rem auto 0; font-size: 1rem; }

/* ─── Hero Section ───────────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute;
  top: -50%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(ellipse, rgba(108,99,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.04em; }
.hero-title .accent { color: var(--blue); }
.hero-title .green  { color: var(--green); }
.hero-description { font-size: 1.15rem; color: var(--text-secondary); max-width: 540px; line-height: 1.7; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

/* Preview card in hero */
.hero-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-preview .preview-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1rem;
}
.hero-preview .preview-stat {
  text-align: center;
  background: var(--bg-elevated); border-radius: var(--radius-md); padding: 0.75rem 0.5rem;
}
.hero-preview .preview-stat .val {
  display: block; font-size: 1.5rem; font-weight: 800; font-family: var(--font-mono);
  color: var(--green);
}
.hero-preview .preview-stat .lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.preview-text-area {
  font-family: var(--font-mono); font-size: 1rem; line-height: 1.9;
  background: var(--bg-elevated); border-radius: var(--radius-md); padding: 1rem 1.25rem;
  user-select: none;
}
.preview-text-area .correct-char { color: var(--green); }
.preview-text-area .error-char   { color: var(--red); background: rgba(232,85,85,0.1); text-decoration: underline; }
.preview-text-area .cursor-char  { color: var(--orange); background: rgba(255,159,67,0.15); border-bottom: 2px solid var(--orange); }
.preview-text-area .upcoming     { color: var(--text-muted); }

/* ─── Game Mode Cards ────────────────────────────────────────────────────── */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-slow);
  cursor: pointer;
  position: relative; overflow: hidden;
}
.game-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--card-glow);
  opacity: 0; transition: opacity var(--transition-slow);
}
.game-card:hover { border-color: var(--card-color, var(--blue)); transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
.game-card:hover::before { opacity: 1; }

.game-card.practice  { --card-color: var(--blue);   --card-glow: radial-gradient(ellipse at top, rgba(108,99,255,0.07) 0%, transparent 70%); }
.game-card.falling   { --card-color: var(--green);  --card-glow: radial-gradient(ellipse at top, rgba(57,211,83,0.07) 0%, transparent 70%); }
.game-card.race      { --card-color: var(--orange); --card-glow: radial-gradient(ellipse at top, rgba(255,159,67,0.07) 0%, transparent 70%); }

.game-card .card-icon { font-size: 3.5rem; margin-bottom: 1rem; display: block; filter: drop-shadow(0 0 16px var(--card-color, var(--blue))); }
.game-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.game-card p  { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ─── Benefits ───────────────────────────────────────────────────────────── */
.benefit-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.benefit-item:hover { background: var(--bg-elevated); }
.benefit-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--blue-glow); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--blue);
}

/* ─── Stats Counter ──────────────────────────────────────────────────────── */
.platform-stat { text-align: center; padding: 2rem 1rem; }
.platform-stat .num {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900; font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1;
}
.platform-stat .label { color: var(--text-secondary); font-size: 1rem; margin-top: 0.5rem; }

/* ─── How It Works Steps ─────────────────────────────────────────────────── */
.step-item { display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 2.5rem; }
.step-num {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--blue); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #fff;
  box-shadow: 0 4px 16px rgba(108,99,255,0.4);
}

/* ─── FAQ ────────────────────────────────────────────────────────────────── */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question {
  padding: 1.1rem 1.25rem;
  font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background var(--transition);
  user-select: none;
}
.faq-question:hover { background: var(--bg-elevated); }
.faq-answer { padding: 0 1.25rem; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.2s ease; }
.faq-item.open .faq-answer { padding: 0 1.25rem 1.1rem; max-height: 300px; }
.faq-icon { transition: transform 0.3s ease; }
.faq-item.open .faq-icon { transform: rotate(180deg); }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer-brand { font-size: 1.4rem; font-weight: 800; background: linear-gradient(135deg, var(--blue), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; display: block; padding: 0.25rem 0; transition: color var(--transition); }
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 2rem; margin-top: 3rem; }

/* ─── Leaderboard ────────────────────────────────────────────────────────── */
.rank-badge { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; }
.rank-1 { background: linear-gradient(135deg, #ffd700, #ffb700); color: #000; }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #b36a1e); color: #fff; }
.rank-other { background: var(--bg-elevated); color: var(--text-muted); }

.leaderboard-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.filter-btn { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted); padding: 0.4rem 1rem; border-radius: var(--radius-full); font-size: 0.82rem; cursor: pointer; transition: all var(--transition); font-weight: 500; }
.filter-btn:hover, .filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ─── Dashboard ──────────────────────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.progress-bar-ct {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 0.5rem;
}
.progress-bar-ct .fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  transition: width 0.8s ease;
}

/* ─── Utility Classes ────────────────────────────────────────────────────── */
.text-green  { color: var(--green)  !important; }
.text-red    { color: var(--red)    !important; }
.text-orange { color: var(--orange) !important; }
.text-blue   { color: var(--blue)   !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-mono   { font-family: var(--font-mono) !important; }

.bg-elevated { background: var(--bg-elevated) !important; }
.bg-card     { background: var(--bg-card) !important; }

.border-ct   { border: 1px solid var(--border) !important; }
.rounded-ct  { border-radius: var(--radius-lg) !important; }

.glow-blue   { box-shadow: 0 0 20px var(--blue-glow); }
.glow-green  { box-shadow: 0 0 20px var(--green-glow); }

.section-gap { padding: 5rem 0; }
.section-gap-sm { padding: 3rem 0; }

/* Divider */
.divider { border-color: var(--border) !important; }

/* Animations */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes pulse    { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes glow     { 0%,100% { box-shadow: 0 0 10px var(--blue-glow); } 50% { box-shadow: 0 0 25px rgba(108,99,255,0.4); } }

.animate-fade-in-up { animation: fadeInUp 0.5s ease forwards; }
.animate-fade-in    { animation: fadeIn 0.4s ease forwards; }
.animate-pulse      { animation: pulse 2s ease infinite; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .hero { padding: 4rem 0 3rem; }
  .section-gap { padding: 3.5rem 0; }
  .navbar-collapse { background: var(--bg-elevated); border-radius: var(--radius-lg); padding: 1rem; margin-top: 0.5rem; border: 1px solid var(--border); }
}
@media (max-width: 576px) {
  .hero-title { font-size: 2.2rem; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
  .ct-table { font-size: 0.82rem; }
  .ct-table th, .ct-table td { padding: 0.7rem 0.8rem; }
}
