/* ============================================
   ReviseEasy - Modern GCSE Maths Revision
   Gamified Learning Experience
   Version: 20260121n
   ============================================ */

:root {
  --primary: #6366F1;
  --primary-light: #818CF8;
  --primary-dark: #4F46E5;
  --secondary: #A5B4FC;
  --accent: #10B981;
  --accent-light: #34D399;
  --warning: #F59E0B;
  --error: #EF4444;
  --success: #22C55E;
  
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --surface-elevated: #FFFFFF;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  
  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  --gradient-accent: linear-gradient(135deg, #10B981 0%, #34D399 100%);
  --gradient-warning: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
  --gradient-blue: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
  
  --sidebar-width: 260px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.15);
  
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

.dark {
  --background: #0F172A;
  --surface: #1E293B;
  --surface-elevated: #334155;
  --text: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --border: #334155;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-xl {
  padding: 18px 40px;
  font-size: 18px;
  border-radius: var(--radius-lg);
}

.btn-google {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.full-width {
  width: 100%;
}

/* ============================================
   App Layout
   ============================================ */
#app {
  display: none;
}

body.logged-in #app {
  display: flex;
  min-height: 100vh;
}

body.logged-in #landing {
  display: none;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition-normal);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Sidebar close button (mobile only) */
.sidebar-close-btn {
  display: none;
  position: absolute;
  top: 20px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  color: var(--text-primary);
  background: var(--background);
}

.sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 32px;
}

.logo h1 {
  font-size: 20px;
  color: var(--primary);
}

.logo p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Level Display */
.level-display {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.level-badge {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.level-num {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.level-info {
  flex: 1;
}

.level-title {
  font-weight: 600;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.level-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.level-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width var(--transition-slow);
}

.level-xp {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--background);
  color: var(--text);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: var(--primary);
  font-weight: 600;
}

.nav-icon {
  font-size: 20px;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

.search-box {
  position: relative;
  width: 320px;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  background: var(--background);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text);
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-top: 8px;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.search-results.active {
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  color: #B45309;
}

.streak-flame {
  font-size: 16px;
}

.streak-label {
  font-size: 12px;
  font-weight: 500;
}

.xp-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary-dark);
}

.xp-icon {
  font-size: 16px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

/* ============================================
   Views Container
   ============================================ */
.views-container {
  flex: 1;
  padding: 32px;
  background: var(--background);
}

.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  margin-bottom: 32px;
}

.view-header h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.view-header.center {
  text-align: center;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 16px;
}

/* ============================================
   Dashboard/Home
   ============================================ */
.welcome-banner {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  color: white;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.welcome-content h1 {
  color: white;
  font-size: 28px;
  margin-bottom: 8px;
}

.welcome-content p {
  opacity: 0.9;
  margin-bottom: 20px;
}

.daily-goal {
  max-width: 300px;
}

.goal-progress {
  height: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 8px;
}

.goal-fill {
  height: 100%;
  background: white;
  border-radius: 5px;
  transition: width var(--transition-slow);
}

.goal-text {
  font-size: 14px;
  opacity: 0.9;
}

.welcome-mascot {
  font-size: 80px;
  opacity: 0.9;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.home-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
}

.home-card h3 {
  font-size: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-header h3 {
  margin-bottom: 0;
}

/* Continue Learning Card */
.continue-card {
  grid-column: span 2;
}

.continue-topic {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--background);
  border-radius: var(--radius-md);
}

.topic-icon {
  font-size: 40px;
}

.topic-info {
  flex: 1;
}

.topic-info h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.topic-info p {
  font-size: 14px;
  color: var(--text-secondary);
}

.topic-progress-ring {
  position: relative;
  width: 56px;
  height: 56px;
}

.topic-progress-ring svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 3;
}

.ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray var(--transition-slow);
}

.topic-progress-ring span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 600;
}

/* Stats Card */
.mini-stats {
  display: flex;
  gap: 24px;
}

.mini-stat {
  text-align: center;
  flex: 1;
}

.mini-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
}

.mini-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Streak Card */
.streak-card {
  text-align: center;
}

.streak-display {
  margin-bottom: 12px;
}

.big-streak {
  font-size: 64px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  background: var(--gradient-warning);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.streak-unit {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
}

.streak-message {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Achievements Card */
.achievement-preview {
  display: flex;
  gap: 12px;
}

.achievement-badge {
  width: 48px;
  height: 48px;
  background: var(--background);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.achievement-badge.locked {
  opacity: 0.3;
  filter: grayscale(1);
}

.empty-achievements {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

/* AI Recommendations */
.recommendations {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommendation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--background);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.rec-icon {
  font-size: 24px;
}

/* ============================================
   Learn View - Topic Path
   ============================================ */
.topic-path {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.topic-node {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topic-connector {
  width: 4px;
  height: 40px;
  background: var(--border);
  margin-left: 38px;
}

.topic-connector.completed {
  background: var(--accent);
}

.topic-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.topic-circle:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.topic-circle.completed {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
}

.topic-circle.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.topic-circle.locked:hover {
  transform: none;
  border-color: var(--border);
}

.topic-circle.current {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.1); }
}

.topic-details {
  flex: 1;
}

.topic-details h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.topic-details p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.topic-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.topic-action {
  display: flex;
  align-items: center;
}

.lock-icon {
  font-size: 24px;
  color: var(--text-muted);
}

/* ============================================
   Lesson View
   ============================================ */
.lesson-container {
  max-width: 800px;
  margin: 0 auto;
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.lesson-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.lesson-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width var(--transition-slow);
}

.lesson-step {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.lesson-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px;
  border: 1px solid var(--border);
  min-height: 400px;
  margin-bottom: 24px;
}

.lesson-content h2 {
  font-size: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.lesson-content p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text);
}

.lesson-content .highlight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  padding: 24px;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
  margin: 24px 0;
}

.lesson-content .example {
  background: var(--background);
  padding: 24px;
  border-radius: var(--radius-lg);
  font-family: 'Fira Code', monospace;
  margin: 20px 0;
}

.lesson-content .tip {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
  border-radius: var(--radius-md);
  margin: 20px 0;
}

.lesson-content .tip-icon {
  font-size: 24px;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
}

/* ============================================
   Practice View
   ============================================ */
.practice-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.practice-tab {
  padding: 12px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.practice-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.practice-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.practice-panel {
  display: none;
}

.practice-panel.active {
  display: block;
}

.quiz-grid, .flashcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.quiz-card, .flashcard-set-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quiz-card:hover, .flashcard-set-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.quiz-card-icon, .fc-set-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.quiz-card h4, .flashcard-set-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.quiz-card p, .flashcard-set-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.quiz-meta, .fc-set-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.quiz-card.locked, .flashcard-set-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.quiz-card.locked:hover, .flashcard-set-card.locked:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

/* Challenge Card */
.challenge-card {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px;
  border: 2px solid var(--border);
}

.challenge-header {
  margin-bottom: 16px;
}

.challenge-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.challenge-card h3 {
  font-size: 24px;
}

.challenge-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.challenge-reward {
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-radius: var(--radius-md);
  display: inline-block;
  margin-bottom: 24px;
  color: var(--primary);
}

/* ============================================
   Quiz View
   ============================================ */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.quiz-progress {
  flex: 1;
  max-width: 400px;
  margin: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-progress .progress-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.quiz-progress .progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width var(--transition-slow);
}

.quiz-score-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--gradient-warning);
  border-radius: 50px;
  color: white;
  font-weight: 700;
}

.score-icon {
  font-size: 18px;
}

.quiz-body {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.question-area {
  text-align: center;
  margin-bottom: 32px;
}

.question-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.question-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
}

.board-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.question-text {
  font-size: 22px;
  line-height: 1.5;
  color: var(--text);
}

.options-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 24px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 24px;
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 16px;
  text-align: left;
  color: var(--text);
}

.option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  transform: translateX(4px);
}

.option-btn:disabled {
  cursor: default;
}

.option-btn.correct {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.option-btn.incorrect {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.option-letter {
  width: 36px;
  height: 36px;
  background: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.option-btn:hover:not(:disabled) .option-letter {
  background: var(--primary);
  color: white;
}

.option-btn.correct .option-letter {
  background: var(--success);
  color: white;
}

.option-btn.incorrect .option-letter {
  background: var(--error);
  color: white;
}

.feedback-area {
  padding: 20px;
  border-radius: var(--radius-lg);
  display: none;
  text-align: center;
  margin-bottom: 16px;
}

.feedback-area.show {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-area.correct {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid var(--success);
}

.feedback-area.incorrect {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid var(--error);
}

.feedback-area h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feedback-area.correct h4 { color: var(--success); }
.feedback-area.incorrect h4 { color: var(--error); }

.feedback-area p {
  color: var(--text);
}

.quiz-hint-area {
  text-align: center;
}

.hint-toggle {
  background: transparent;
  border: 2px dashed var(--warning);
  color: var(--warning);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.hint-toggle:hover {
  background: rgba(245, 158, 11, 0.1);
}

.hint-box {
  margin-top: 16px;
  padding: 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 2px solid var(--warning);
  border-radius: var(--radius-lg);
  text-align: left;
  display: none;
  color: var(--text);
}

.hint-box.show {
  display: block;
  animation: slideUp 0.3s ease;
}

.quiz-footer {
  text-align: center;
}

/* ============================================
   Results View
   ============================================ */
.results-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.results-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px 64px;
  text-align: center;
  border: 1px solid var(--border);
  max-width: 450px;
}

.results-animation {
  font-size: 72px;
  margin-bottom: 16px;
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.results-card h2 {
  margin-bottom: 24px;
}

.results-score-display {
  font-family: 'Poppins', sans-serif;
  margin-bottom: 8px;
}

.big-score {
  font-size: 80px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.score-divider, .total-score {
  font-size: 40px;
  color: var(--text-muted);
}

.results-percentage {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.results-xp {
  margin-bottom: 16px;
}

.xp-earned {
  display: inline-block;
  padding: 8px 24px;
  background: var(--gradient-warning);
  border-radius: 50px;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.results-message {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ============================================
   Flashcard View
   ============================================ */
.flashcard-container {
  max-width: 600px;
  margin: 0 auto;
}

.flashcard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.flashcard-counter {
  font-weight: 600;
  color: var(--text-secondary);
}

.flashcard-body {
  perspective: 1000px;
  margin-bottom: 24px;
}

.flashcard {
  width: 100%;
  height: 300px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-radius: var(--radius-xl);
  text-align: center;
  font-size: 20px;
}

.flashcard-front {
  background: var(--gradient-primary);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

.flashcard-back {
  background: var(--surface);
  border: 2px solid var(--primary);
  transform: rotateY(180deg);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.flashcard-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.flashcard-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ============================================
   Achievements View
   ============================================ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.achievement-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.achievement-card.locked {
  opacity: 0.5;
}

.achievement-card.locked .achievement-icon {
  filter: grayscale(1);
}

.achievement-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.achievement-card h4 {
  font-size: 14px;
  margin-bottom: 8px;
}

.achievement-card p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Leaderboard View
   ============================================ */

/* Weekly Prize Banner */
.weekly-prize-banner {
  max-width: 600px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

[data-theme="dark"] .weekly-prize-banner {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  border-color: #f59e0b;
}

.prize-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.prize-icon {
  font-size: 28px;
}

.prize-text {
  font-size: 18px;
  font-weight: 700;
  color: #92400e;
}

[data-theme="dark"] .prize-text {
  color: #fef3c7;
}

.last-winner, .current-leader {
  font-size: 14px;
  color: #78350f;
  margin-top: 8px;
}

[data-theme="dark"] .last-winner,
[data-theme="dark"] .current-leader {
  color: #fde68a;
}

.winner-label, .leader-label {
  opacity: 0.8;
}

.winner-name, .leader-name {
  font-weight: 600;
  margin-left: 4px;
}

.winner-xp, .leader-xp {
  opacity: 0.7;
  margin-left: 4px;
}

.leaderboard-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}

.leaderboard-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.lb-tab {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lb-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.leaderboard-list {
  padding: 16px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}

.leaderboard-item:nth-child(1) {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
}

.leaderboard-item:nth-child(2) {
  background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
}

.leaderboard-item:nth-child(3) {
  background: linear-gradient(135deg, #FED7AA 0%, #FDBA74 100%);
}

.lb-rank {
  font-size: 20px;
  font-weight: 700;
  width: 32px;
}

.lb-avatar {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.lb-name {
  flex: 1;
  font-weight: 600;
}

.lb-xp {
  font-weight: 700;
  color: var(--primary);
}

/* ============================================
   Pricing View
   ============================================ */
.pricing-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  border: 2px solid var(--border);
  width: 320px;
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
  transform: scale(1.05);
}

.price-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--background);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

.pricing-card.featured .price-badge {
  background: var(--gradient-primary);
  color: white;
}

.price-amount {
  font-size: 48px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 24px;
}

.price-amount span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.price-features {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.price-features li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* ============================================
   Landing Page - Stunning Modern Design V2
   ============================================ */
#landing {
  min-height: 100vh;
  background: var(--background);
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   HERO V2 - Redesigned
   ============================================ */
.hero-v2 {
  position: relative;
  padding: 140px 40px 60px;
  max-width: 1280px;
  margin: 0 auto;
  z-index: 1;
}

.hero-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 60px;
  align-items: center;
  min-height: 70vh;
}

.hero-left {
  animation: fadeInUp 0.8s ease;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #6366F1;
  margin-bottom: 24px;
}

.pill-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero-h1 span {
  display: block;
}

.hero-h1 .gradient-text {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-p {
  font-size: 18px;
  color: #64748B;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn-outline {
  background: transparent !important;
  border: 2px solid #E2E8F0 !important;
  color: #1E293B !important;
}

.btn-outline:hover {
  border-color: #6366F1 !important;
  color: #6366F1 !important;
}

.dark .btn-outline {
  border-color: #334155 !important;
  color: #F1F5F9 !important;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-stack {
  display: flex;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg, linear-gradient(135deg, #6366F1, #8B5CF6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  border: 3px solid #FFFFFF;
  margin-left: -10px;
}

.dark .avatar {
  border-color: #0F172A;
}

.avatar:first-child {
  margin-left: 0;
}

.proof-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stars {
  font-size: 14px;
}

.proof-text span {
  font-size: 13px;
  color: #94A3B8;
}

/* Hero Right - Dashboard Preview */
.hero-right {
  position: relative;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.dashboard-preview {
  position: relative;
  border-radius: 20px;
  overflow: visible;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 25px 80px rgba(99, 102, 241, 0.2), 0 10px 40px rgba(0,0,0,0.1);
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.dark .dashboard-preview {
  background: #1E293B;
  border-color: #334155;
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  border-radius: 20px 20px 0 0;
}

.dark .preview-chrome {
  background: #1E293B;
  border-color: #334155;
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.chrome-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.chrome-dots span:nth-child(1) { background: #EF4444; }
.chrome-dots span:nth-child(2) { background: #F59E0B; }
.chrome-dots span:nth-child(3) { background: #10B981; }

.chrome-title {
  font-size: 13px;
  color: #94A3B8;
  font-weight: 500;
}

.preview-body {
  background: #FFFFFF;
  padding: 24px;
  border-radius: 0 0 20px 20px;
}

.dark .preview-body {
  background: #1E293B;
}

.preview-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.wave-emoji {
  font-size: 28px;
}

.preview-welcome > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.preview-welcome strong {
  font-size: 16px;
}

.preview-welcome span {
  font-size: 13px;
  color: #94A3B8;
}

.streak-pill {
  padding: 6px 12px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #92400E;
}

.preview-progress {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.progress-ring {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring svg {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring circle {
  transform-origin: center;
}

.progress-ring span {
  font-size: 14px;
  font-weight: 700;
  z-index: 1;
}

.preview-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.preview-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #F8FAFC;
}

.dark .preview-mini-card {
  background: #0F172A;
}

.preview-mini-card span {
  font-size: 24px;
}

.preview-mini-card div {
  display: flex;
  flex-direction: column;
}

.preview-mini-card strong {
  font-size: 14px;
}

.preview-mini-card small {
  font-size: 12px;
  color: #94A3B8;
}

.xp-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15)) !important;
}

.quiz-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.15)) !important;
}

/* Floating notifications */
.float-notif {
  position: absolute;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: floatNotif 3s ease-in-out infinite;
  z-index: 10;
}

.fn-1 {
  top: 10%;
  right: -30px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A) !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
  animation-delay: 0s;
}

.fn-2 {
  bottom: 30%;
  left: -40px;
  background: linear-gradient(135deg, #E0E7FF, #C7D2FE) !important;
  border-color: #6366F1 !important;
  color: #4338CA !important;
  animation-delay: 1s;
}

.fn-3 {
  top: 50%;
  right: -20px;
  background: linear-gradient(135deg, #DCFCE7, #BBF7D0) !important;
  border-color: #22C55E !important;
  color: #166534 !important;
  animation-delay: 2s;
}

@keyframes floatNotif {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Hero Stats Strip */
.hero-stats-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 40px 20px;
  margin-top: 40px;
}

.stat-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-val {
  font-size: 32px;
  font-weight: 800;
  color: #6366F1;
}

.stat-lbl {
  font-size: 14px;
  color: #94A3B8;
}

.stat-sep {
  width: 1px;
  height: 40px;
  background: #E2E8F0;
}

.dark .stat-sep {
  background: #334155;
}

/* Boards Strip */
.boards-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
}

.dark .boards-strip {
  background: #1E293B;
  border-color: #334155;
}

.boards-label {
  font-size: 13px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.boards-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.board-tag {
  padding: 10px 20px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.dark .board-tag {
  background: #0F172A;
  border-color: #334155;
}

.board-tag:hover {
  border-color: #6366F1;
  color: #6366F1;
}

/* ============================================
   FEATURES V2 - Bento Grid
   ============================================ */
.features-v2 {
  padding: 100px 40px;
  background: #F8FAFC;
}

.dark .features-v2 {
  background: #0F172A;
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: #6366F1;
  margin-bottom: 16px;
}

.section-h2 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 18px;
  color: #64748B;
  margin-bottom: 48px;
}

.bento-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-template-rows: auto auto auto;
  gap: 20px;
}

.bento-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
}

.dark .bento-item {
  background: #1E293B;
  border-color: #334155;
}

.bento-item:hover {
  border-color: #6366F1;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.bento-lg {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.bento-md {
  grid-column: span 2;
}

.bento-sm {
  grid-column: span 1;
}

.bento-visual {
  flex: 1;
  background: #F8FAFC;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.dark .bento-visual {
  background: #0F172A;
}

.lesson-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lstep {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  color: #94A3B8;
  transition: all 0.3s;
}

.dark .lstep {
  background: #1E293B;
  border-color: #334155;
}

.lstep.active {
  background: #6366F1 !important;
  border-color: #6366F1 !important;
  color: white !important;
}

.lstep-num {
  width: 28px;
  height: 28px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.lstep.active .lstep-num {
  background: rgba(255,255,255,0.2);
}

.bento-text .bento-label {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.bento-item h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.bento-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bento-icon-box {
  width: 56px;
  height: 56px;
  background: var(--grad);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

.streak-week {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.day {
  width: 36px;
  height: 36px;
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
}

.dark .day {
  background: #0F172A;
  border-color: #334155;
}

.day.active {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A) !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
}

.xp-bar-demo {
  height: 10px;
  background: #E2E8F0;
  border-radius: 5px;
  margin-top: 16px;
  overflow: hidden;
}

.dark .xp-bar-demo {
  background: #334155;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 5px;
  transition: width 1s ease;
}

.xp-text {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #94A3B8;
}

.bento-sm {
  text-align: center;
  padding: 28px 20px;
}

.bento-emoji {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
}

.bento-sm h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.bento-sm p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   TOPICS V2
   ============================================ */
.topics-v2 {
  padding: 100px 40px;
  background: #FFFFFF;
}

.dark .topics-v2 {
  background: #1E293B;
}

.topics-container {
  max-width: 1000px;
  margin: 0 auto;
}

.topic-tiles {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px;
}

.topic-tile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dark .topic-tile {
  background: #0F172A;
  border-color: #334155;
}

.topic-tile:hover {
  border-color: #10B981;
  transform: translateX(8px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.tile-emoji {
  font-size: 32px;
}

.tile-content {
  flex: 1;
}

.tile-content h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.tile-content span {
  font-size: 13px;
  color: #94A3B8;
}

.tile-arrow {
  font-size: 20px;
  color: #94A3B8;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
}

.topic-tile:hover .tile-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #10B981;
}

/* ============================================
   STEPS V2
   ============================================ */
.steps-v2 {
  padding: 100px 40px;
  background: #F8FAFC;
}

.dark .steps-v2 {
  background: #0F172A;
}

.steps-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.steps-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 48px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  text-align: left;
  max-width: 400px;
}

.step-num-v2 {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.step-body h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.step-body p {
  font-size: 15px;
  color: #64748B;
}

.step-line {
  width: 2px;
  height: 40px;
  background: #E2E8F0;
  margin: 12px 0 12px 23px;
}

.dark .step-line {
  background: #334155;
}

/* ============================================
   PRICING V2
   ============================================ */
.pricing-v2 {
  padding: 100px 40px;
  background: #FFFFFF;
}

.dark .pricing-v2 {
  background: #1E293B;
}

.pricing-container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.price-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}

.price-card-v2 {
  background: #F8FAFC;
  border: 2px solid #E2E8F0;
  border-radius: 24px;
  padding: 40px;
  width: 320px;
  text-align: center;
  position: relative;
  transition: all 0.3s;
}

.dark .price-card-v2 {
  background: #0F172A;
  border-color: #334155;
}

.price-card-v2:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.price-card-v2.featured {
  border-color: #6366F1 !important;
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.2);
  transform: scale(1.05);
}

.price-card-v2.featured:hover {
  transform: scale(1.05) translateY(-8px);
}

.pc-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
}

.pc-header {
  margin-bottom: 24px;
}

.pc-header h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.pc-price {
  font-size: 48px;
  font-weight: 800;
  color: #6366F1;
}

.pc-period {
  font-size: 14px;
  color: #94A3B8;
}

.pc-list {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.pc-list li {
  padding: 12px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #E2E8F0;
}

.dark .pc-list li {
  border-color: #334155;
}

.pc-list li:last-child {
  border-bottom: none;
}

.pc-list .check {
  color: #22C55E;
  font-weight: 700;
}

.pc-list .x {
  color: #94A3B8;
}

.pc-list li.disabled {
  color: #94A3B8;
}

.btn-block {
  width: 100%;
}

/* ============================================
   BUILT BY SECTION
   ============================================ */
.built-by-section {
  padding: 80px 40px;
  background: var(--bg);
}

.built-by-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.built-by-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.built-by-section h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
}

.built-by-story {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.built-by-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.feature-point {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.point-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.feature-point strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
}

.feature-point p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.roadmap-preview {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(99, 102, 241, 0.05));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.roadmap-preview h4 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text);
}

.roadmap-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.roadmap-item {
  background: var(--surface);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .built-by-features {
    grid-template-columns: 1fr;
  }
  
  .built-by-section h2 {
    font-size: 24px;
  }
}

/* ============================================
   HOW IT WORKS STRIP
   ============================================ */
.how-it-works-strip {
  padding: 40px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hiw-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.hiw-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hiw-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.hiw-text strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.hiw-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

.hiw-arrow {
  font-size: 20px;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .hiw-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .hiw-arrow {
    transform: rotate(90deg);
  }
}

/* ============================================
   CTA V2
   ============================================ */
.cta-v2 {
  position: relative;
  padding: 100px 40px;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  text-align: center;
  overflow: hidden;
}

.cta-glow-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15), transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(255,255,255,0.1), transparent 50%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
}

.cta-v2 h2 {
  font-size: 40px;
  color: white;
  margin-bottom: 16px;
}

.cta-v2 p {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
}

.btn-white {
  background: white !important;
  color: #6366F1 !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.cta-checks {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  flex-wrap: wrap;
}

/* ============================================
   FOOTER V2
   ============================================ */
.footer-v2 {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  padding: 60px 40px 30px;
}

.dark .footer-v2 {
  background: #0F172A;
  border-color: #334155;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  margin-bottom: 40px;
}

.footer-brand-v2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-brand-v2 img {
  width: 36px;
  height: 36px;
}

.footer-tagline {
  color: #94A3B8;
  font-size: 14px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: #64748B;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #6366F1;
}

.footer-bottom-v2 {
  padding-top: 24px;
  border-top: 1px solid #E2E8F0;
  text-align: center;
}

.dark .footer-bottom-v2 {
  border-color: #334155;
}

.footer-bottom-v2 p {
  font-size: 13px;
  color: #94A3B8;
}

/* ============================================
   Responsive Landing V2
   ============================================ */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 40px;
    text-align: center;
  }
  
  .hero-left {
    order: 1;
  }
  
  .hero-right {
    order: 2;
  }
  
  .hero-h1 {
    font-size: 42px;
  }
  
  .hero-p {
    margin: 0 auto 32px;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .hero-social-proof {
    justify-content: center;
  }
  
  .dashboard-preview {
    max-width: 400px;
    margin: 0 auto;
  }
  
  .float-notif {
    display: none !important;
  }
  
  .bento-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  
  .bento-lg {
    grid-column: span 2 !important;
    grid-row: span 1;
  }
}

@media (max-width: 768px) {
  .hero-v2 {
    padding: 120px 20px 40px;
  }
  
  .hero-grid {
    min-height: auto !important;
  }
  
  .hero-h1 {
    font-size: 32px;
    letter-spacing: -1px;
  }
  
  .hero-p {
    font-size: 16px;
  }
  
  .hero-btns {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-btns .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .hero-stats-strip {
    flex-wrap: wrap;
    gap: 24px;
  }
  
  .stat-sep {
    display: none;
  }
  
  .bento-grid {
    grid-template-columns: 1fr !important;
  }
  
  .bento-lg, .bento-md {
    grid-column: span 1 !important;
  }
  
  .topic-tiles {
    grid-template-columns: 1fr !important;
  }
  
  .price-cards {
    flex-direction: column;
    align-items: center;
  }
  
  .price-card-v2 {
    width: 100%;
    max-width: 340px;
  }
  
  .price-card-v2.featured {
    transform: none;
  }
  
  .price-card-v2.featured:hover {
    transform: translateY(-8px);
  }
  
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  
  .cta-v2 h2 {
    font-size: 28px;
  }
  
  .cta-checks {
    flex-direction: column;
    gap: 8px;
  }
  
  .landing-header {
    padding: 12px 16px !important;
  }
  
  .landing-nav {
    display: none;
  }
}

/* Particles */
.bg-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.3;
  animation: particleFloat 20s infinite;
}

.particle.p1 { top: 20%; left: 10%; animation-delay: 0s; }
.particle.p2 { top: 60%; left: 80%; animation-delay: -4s; }
.particle.p3 { top: 30%; left: 70%; animation-delay: -8s; }
.particle.p4 { top: 80%; left: 20%; animation-delay: -12s; }
.particle.p5 { top: 50%; left: 50%; animation-delay: -16s; }

@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  25% { transform: translate(50px, -30px) scale(1.5); opacity: 0.5; }
  50% { transform: translate(-30px, 50px) scale(1); opacity: 0.3; }
  75% { transform: translate(30px, 30px) scale(0.8); opacity: 0.4; }
}

/* Section animations - simplified to always visible */
.features-v2,
.topics-v2,
.steps-v2,
.pricing-v2 {
  opacity: 1;
}

/* Smooth scroll offset for fixed header */
html {
  scroll-padding-top: 80px;
}

/* Animated Background */
.landing-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.1), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(59, 130, 246, 0.1), transparent);
}

.dark .bg-gradient {
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(139, 92, 246, 0.15), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, rgba(59, 130, 246, 0.15), transparent);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
}

.dark .bg-grid {
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.2);
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.bg-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(139, 92, 246, 0.15);
  bottom: 20%;
  left: 5%;
  animation-delay: -5s;
}

.bg-orb-3 {
  width: 250px;
  height: 250px;
  background: rgba(59, 130, 246, 0.1);
  top: 50%;
  left: 50%;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.1); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(20px, 20px) scale(1.05); }
}

/* Hero Section */
.hero {
  position: relative;
  padding: 140px 40px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  gap: 80px;
  min-height: 100vh;
  z-index: 1;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 40px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  animation: headerSlide 0.6s ease;
}

@keyframes headerSlide {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.dark .landing-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.landing-logo .logo-img {
  width: 56px !important;
  height: 56px !important;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.landing-logo:hover .logo-img {
  transform: rotate(10deg) scale(1.1);
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.4));
}

/* Footer logo */
.footer-brand img {
  width: 36px !important;
  height: 36px !important;
}

.landing-logo .logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-nav {
  display: flex;
  gap: 32px;
}

.landing-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  padding: 8px 0;
}

.landing-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.landing-nav a:hover {
  color: var(--primary);
}

.landing-nav a:hover::after {
  width: 100%;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-content {
  flex: 1;
  position: relative;
  z-index: 1;
  animation: heroFadeIn 0.8s ease;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}

.hero h1 {
  font-size: 64px;
  line-height: 1.05;
  margin-bottom: 24px;
  font-weight: 800;
  letter-spacing: -2px;
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.gradient-text::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  height: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  z-index: -1;
  border-radius: 4px;
}

.hero p {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 520px;
  line-height: 1.7;
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.animate-in {
  animation: fadeUp 0.8s ease backwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Title */
.hero-title {
  font-size: 58px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero-title-highlight {
  display: block;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 500px;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.btn-glow {
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}

.btn-glow:hover::before {
  transform: translateX(100%);
}

.btn-glow:hover {
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.hero-cta .btn-xl {
  font-size: 17px;
  padding: 16px 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.btn-icon { font-size: 20px; }
.btn-arrow { margin-left: auto; }

.hero-cta-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* Hero Stats Row */
.hero-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.stat-icon {
  font-size: 24px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.stat-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Hero Visual / Mockup */
.hero-visual {
  flex: 1;
  position: relative;
  z-index: 1;
  min-height: 450px;
}

.hero-mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: mockupFloat 6s ease-in-out infinite;
}

@keyframes mockupFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-dots span:nth-child(1) { background: #ef4444; }
.mockup-dots span:nth-child(2) { background: #f59e0b; }
.mockup-dots span:nth-child(3) { background: #10b981; }

.mockup-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.mockup-content {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mockup-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--background);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.mockup-card .mc-icon {
  font-size: 24px;
}

.mockup-card .mc-text {
  display: flex;
  flex-direction: column;
}

.mockup-card .mc-text strong {
  font-size: 13px;
  color: var(--text);
}

.mockup-card .mc-text span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Floating Badges */
.float-badge {
  position: absolute;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  animation: floatBadge 3s ease-in-out infinite;
}

.fb-1 {
  top: 10%;
  right: -20px;
  animation-delay: 0s;
  background: linear-gradient(135deg, #fef3c7, #fcd34d);
  border-color: #f59e0b;
  color: #92400e;
}

.fb-2 {
  bottom: 30%;
  left: -30px;
  animation-delay: 1s;
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  border-color: #3b82f6;
  color: #1e40af;
}

.fb-3 {
  top: 40%;
  right: -40px;
  animation-delay: 2s;
  background: linear-gradient(135deg, #fce7f3, #f9a8d4);
  border-color: #ec4899;
  color: #9d174d;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Logos Bar */
.logos-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logos-text {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logos-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.exam-badge {
  padding: 8px 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.hero-visual {
  flex: 1;
  position: relative;
  height: 450px;
  z-index: 1;
  animation: heroVisualFade 1s ease 0.3s backwards;
}

@keyframes heroVisualFade {
  from {
    opacity: 0;
    transform: scale(0.9) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* Floating Cards with Glassmorphism */
.floating-card {
  position: absolute;
  padding: 18px 28px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: float 4s ease-in-out infinite;
  z-index: 2;
}

.dark .floating-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.floating-card.card-1 {
  top: 15%;
  left: 5%;
  animation-delay: 0s;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
}

.dark .floating-card.card-1 {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.floating-card.card-2 {
  top: 45%;
  right: 5%;
  animation-delay: 1.3s;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  color: var(--primary);
}

.floating-card.card-3 {
  bottom: 25%;
  left: 20%;
  animation-delay: 2.6s;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
  color: var(--success);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(2deg); }
  50% { transform: translateY(-25px) rotate(0deg); }
  75% { transform: translateY(-15px) rotate(-2deg); }
}

/* Features Section */
.features {
  padding: 100px 40px;
  background: var(--surface);
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  padding: 28px;
  background: var(--background);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.1);
}

.feature-card-large {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.feature-visual {
  flex: 1;
  background: var(--surface);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.feature-demo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-step {
  padding: 12px 16px;
  background: var(--background);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.demo-step.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.feature-text {
  padding: 0 8px;
}

.feature-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.feature-emoji {
  font-size: 36px;
  display: block;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 600;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Topics Preview */
.topics-preview {
  padding: 100px 40px;
  background: var(--background);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.topic-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.topic-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

.topic-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.topic-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.topic-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* How It Works */
.how-it-works {
  padding: 100px 40px;
  background: var(--surface);
}

.steps-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.step-card {
  flex: 1;
  max-width: 280px;
  padding: 32px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0 auto 16px;
}

.step-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

.step-arrow {
  font-size: 24px;
  color: var(--text-muted);
}

/* Old topic pills kept for compatibility */
.topic-pills {
  display: none;
}

.topic-pill {
  padding: 14px 28px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.topic-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

/* CTA Section */
.cta-section {
  padding: 100px 40px;
  text-align: center;
  background: var(--gradient-primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: white;
  font-size: 42px;
  margin-bottom: 12px;
  font-weight: 700;
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: 32px;
  font-size: 18px;
}

.btn-white {
  background: white !important;
  color: var(--primary) !important;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.btn-white:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.cta-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  font-size: 14px;
  opacity: 0.9;
  flex-wrap: wrap;
}

/* Hero Stats Bar */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Trust Avatars */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 15px;
}

.trust-avatars {
  display: flex;
  margin-right: 4px;
}

.trust-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-left: -8px;
}

.trust-avatar:first-child {
  margin-left: 0;
}

/* Badge Pulse */
.badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  animation: pulse 2s ease-in-out infinite;
}

/* Floating Card Content */
.floating-card .card-emoji {
  font-size: 24px;
}

.floating-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.floating-card .card-title {
  font-weight: 700;
  font-size: 15px;
}

.floating-card .card-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.floating-card.card-4 {
  top: 60%;
  right: 25%;
  animation-delay: 3.5s;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
  color: #d97706;
}

/* Social Proof Bar */
.social-proof {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  padding: 32px 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.proof-icon {
  font-size: 18px;
}

/* Section Subtitle */
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 16px;
}

/* CTA Section Enhancements */
.cta-content {
  position: relative;
  z-index: 1;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  font-size: 14px;
  opacity: 0.9;
  flex-wrap: wrap;
}

.cta-features span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Footer */
.landing-footer {
  padding: 40px;
  background: var(--background);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.footer-brand img {
  width: 32px !important;
  height: 32px !important;
}

.landing-footer p {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* Landing Page Scroll Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.features-grid .feature-card {
  animation: fadeInUp 0.6s ease backwards;
}

.features-grid .feature-card:nth-child(1) { animation-delay: 0.1s; }
.features-grid .feature-card:nth-child(2) { animation-delay: 0.2s; }
.features-grid .feature-card:nth-child(3) { animation-delay: 0.3s; }
.features-grid .feature-card:nth-child(4) { animation-delay: 0.4s; }
.features-grid .feature-card:nth-child(5) { animation-delay: 0.5s; }
.features-grid .feature-card:nth-child(6) { animation-delay: 0.6s; }

.topic-pills .topic-pill {
  animation: fadeInUp 0.5s ease backwards;
}

.topic-pills .topic-pill:nth-child(1) { animation-delay: 0.05s; }
.topic-pills .topic-pill:nth-child(2) { animation-delay: 0.1s; }
.topic-pills .topic-pill:nth-child(3) { animation-delay: 0.15s; }
.topic-pills .topic-pill:nth-child(4) { animation-delay: 0.2s; }
.topic-pills .topic-pill:nth-child(5) { animation-delay: 0.25s; }
.topic-pills .topic-pill:nth-child(6) { animation-delay: 0.3s; }
.topic-pills .topic-pill:nth-child(7) { animation-delay: 0.35s; }
.topic-pills .topic-pill:nth-child(8) { animation-delay: 0.4s; }
.topic-pills .topic-pill:nth-child(9) { animation-delay: 0.45s; }
.topic-pills .topic-pill:nth-child(10) { animation-delay: 0.5s; }
.topic-pills .topic-pill:nth-child(11) { animation-delay: 0.55s; }
.topic-pills .topic-pill:nth-child(12) { animation-delay: 0.6s; }

/* ============================================
   Modal
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 420px;
  width: 90%;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--background);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.auth-header h2 {
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.hidden {
  display: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
}

.form-group input {
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--background);
  color: var(--text);
  transition: all var(--transition-fast);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-error,
.auth-error-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  animation: slideDown 0.3s ease;
}

.auth-error-box .error-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.auth-error.hidden {
  display: none;
}

.auth-error-box.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dark .auth-error,
.dark .auth-error-box {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  max-width: 360px;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-icon {
  font-size: 20px;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  color: var(--text);
}

/* ============================================
   XP Popup
   ============================================ */
.xp-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 24px 48px;
  background: var(--gradient-warning);
  border-radius: var(--radius-xl);
  color: white;
  font-weight: 700;
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3000;
  animation: xpPop 0.5s ease;
  box-shadow: var(--shadow-xl);
}

.xp-popup.hidden {
  display: none;
}

@keyframes xpPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  50% { transform: translate(-50%, -50%) scale(1.1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.xp-popup-icon {
  font-size: 32px;
}

/* ============================================
   Level Up Modal
   ============================================ */
.level-up-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  z-index: 3000;
}

.level-up-modal.hidden {
  display: none;
}

.level-up-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px 64px;
  text-align: center;
  animation: levelUpAnim 0.6s ease;
}

@keyframes levelUpAnim {
  0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
  50% { transform: scale(1.1) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.level-up-animation {
  font-size: 80px;
  margin-bottom: 16px;
}

.new-level {
  font-size: 72px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 16px 0;
}

/* ============================================
   Achievement Popup
   ============================================ */
.achievement-popup {
  position: fixed;
  bottom: 100px;
  right: 24px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2500;
  animation: slideInRight 0.5s ease;
}

.achievement-popup.hidden {
  display: none;
}

.achievement-popup-icon {
  font-size: 40px;
}

.achievement-popup h4 {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 4px;
}

.achievement-popup p {
  font-weight: 600;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  
  .continue-card {
    grid-column: span 1;
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
  }
  
  .hero h1 {
    font-size: 40px;
  }
  
  .hero-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar.open ~ .sidebar-overlay,
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }
  
  .sidebar-close-btn {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .header {
    padding: 0 16px;
  }
  
  .search-box {
    width: 180px;
  }
  
  .views-container {
    padding: 20px;
  }
  
  .welcome-banner {
    padding: 24px;
    flex-direction: column;
    text-align: center;
  }
  
  .welcome-mascot {
    display: none;
  }
  
  /* Landing Page Mobile */
  .landing-header {
    padding: 16px 20px;
  }
  
  .landing-logo .logo-img {
    width: 40px !important;
    height: 40px !important;
  }
  
  .landing-logo .logo-text {
    font-size: 18px;
  }
  
  .landing-nav {
    display: none;
  }
  
  .bg-orb {
    opacity: 0.5;
  }
  
  .hero {
    flex-direction: column;
    padding: 110px 20px 60px;
    text-align: center;
    min-height: auto;
    gap: 40px;
  }
  
  .hero-title {
    font-size: 32px;
    letter-spacing: -1px;
  }
  
  .hero-subtitle {
    font-size: 16px;
    margin: 0 auto 24px;
  }
  
  .hero-cta {
    align-items: center;
  }
  
  .hero-cta .btn-xl {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .hero-stats-row {
    justify-content: center;
  }
  
  .stat-card {
    padding: 12px 16px;
  }
  
  .stat-number {
    font-size: 18px;
  }
  
  .hero-visual {
    display: block;
    min-height: auto;
    width: 100%;
  }
  
  .hero-mockup {
    max-width: 100%;
  }
  
  .mockup-content {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 10px;
  }
  
  .float-badge {
    display: none;
  }
  
  .logos-bar {
    padding: 24px 20px;
  }
  
  .logos-list {
    gap: 10px;
  }
  
  .exam-badge {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .features {
    padding: 60px 20px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  .section-header p {
    font-size: 16px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .feature-card-large {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .feature-card {
    padding: 20px;
  }
  
  .feature-visual {
    display: none;
  }
  
  .topics-preview {
    padding: 60px 20px;
  }
  
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .topic-card {
    padding: 16px;
  }
  
  .topic-icon {
    font-size: 24px;
  }
  
  .topic-card h4 {
    font-size: 14px;
  }
  
  .how-it-works {
    padding: 60px 20px;
  }
  
  .steps-row {
    flex-direction: column;
    gap: 16px;
  }
  
  .step-arrow {
    transform: rotate(90deg);
  }
  
  .step-card {
    max-width: 100%;
  }
  
  .cta-section {
    padding: 60px 20px;
  }
  
  .cta-section h2 {
    font-size: 28px;
  }
  
  .cta-section p {
    font-size: 16px;
  }
  
  .cta-features {
    flex-direction: column;
    gap: 12px;
  }
  
  .landing-footer {
    padding: 30px 20px;
  }
  
  /* Mobile Auth Modal */
  .auth-modal {
    margin: 16px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .auth-logo-img {
    width: 72px !important;
    height: 72px !important;
  }
  
  .auth-header h2 {
    font-size: 22px;
  }
  
  .auth-header p {
    font-size: 14px;
  }
  
  .auth-security-notice {
    font-size: 11px;
    padding: 10px 12px;
  }
  
  /* Mobile Dashboard Cards */
  .home-grid {
    grid-template-columns: 1fr;
  }
  
  .home-card {
    padding: 20px;
  }
  
  /* Mobile Navigation */
  .sidebar {
    width: 280px;
  }
  
  .logo-img {
    width: 48px !important;
    height: 48px !important;
  }
  
  /* Mobile Header */
  .streak-badge,
  .xp-badge {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .streak-label,
  .xp-label {
    display: none;
  }
  
  /* Mobile Quiz/Practice */
  .quiz-card,
  .flashcard-set-card {
    padding: 16px;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 15px;
  }
  
  .hero-stats {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-stat {
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }
  
  .social-proof {
    flex-direction: column;
    gap: 16px;
  }
  
  .floating-card {
    display: none;
  }
  
  .floating-card.card-1,
  .floating-card.card-2 {
    display: flex;
    position: static;
    margin: 8px 0;
  }
  
  .hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
  }
  
  .auth-modal {
    margin: 8px;
    padding: 20px;
  }
  
  .btn-xl {
    padding: 14px 24px;
    font-size: 15px;
  }
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* ============================================
   Profile Dropdown
   ============================================ */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--text);
  font-size: 14px;
}

.dropdown-item:hover {
  background: var(--background);
}

.dropdown-item:first-child {
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.dropdown-item:last-child {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.user-avatar {
  position: relative;
}

.leaderboard-item.current-user {
  background: rgba(99, 102, 241, 0.1);
  border-left: 3px solid var(--primary);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal {
  animation: fadeIn 0.3s ease;
}

.modal.hidden {
  animation: fadeOut 0.3s ease;
}

.toast {
  animation: slideIn 0.3s ease;
}

/* ============================================
   Enhanced Logo Styles & Animations
   ============================================ */
.logo-img {
  width: 64px !important;
  height: 64px !important;
  object-fit: contain;
  transition: transform var(--transition-normal), filter var(--transition-normal);
  animation: logoEntrance 0.6s ease;
}

.auth-logo-img {
  width: 100px !important;
  height: 100px !important;
  object-fit: contain;
  margin-bottom: 20px;
  transition: transform var(--transition-normal), filter var(--transition-normal);
  animation: logoEntrance 0.6s ease;
}

.logo-img:hover, .auth-logo-img:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.4));
}

@keyframes logoEntrance {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
  }
  50% {
    transform: scale(1.05) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* Auth Security Notice */
.auth-security-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
}

.security-icon {
  font-size: 14px;
}

/* Auth Legal Links */
.auth-legal-links {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-legal-links a {
  color: var(--primary);
  text-decoration: none;
}

.auth-legal-links a:hover {
  text-decoration: underline;
}

/* ============================================
   Card Animations & Hover Effects
   ============================================ */
.home-card, .quiz-card, .flashcard-set-card, .achievement-card, .topic-node, .pricing-card {
  transition: all var(--transition-normal);
  animation: cardFadeIn 0.5s ease backwards;
}

.home-card:nth-child(1) { animation-delay: 0.1s; }
.home-card:nth-child(2) { animation-delay: 0.2s; }
.home-card:nth-child(3) { animation-delay: 0.3s; }
.home-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-card:hover, .quiz-card:hover, .flashcard-set-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.achievement-card:hover {
  transform: scale(1.05) rotate(2deg);
}

.topic-node:hover {
  transform: translateX(8px);
}

.pricing-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* ============================================
   Button Enhancements
   ============================================ */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  animation: buttonPress 0.2s ease;
}

@keyframes buttonPress {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ============================================
   Smooth Page Transitions
   ============================================ */
.view {
  animation: viewTransition 0.4s ease;
}

.view.active {
  animation: viewFadeIn 0.4s ease;
}

@keyframes viewTransition {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes viewFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================================
   Progress Bar Animations
   ============================================ */
.level-fill, .goal-fill, .progress-fill, .lesson-progress-fill {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.level-fill::after, .goal-fill::after, .progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================
   Nav Item Enhancements
   ============================================ */
.nav-item {
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
  transition: height var(--transition-fast);
}

.nav-item:hover::before, .nav-item.active::before {
  height: 60%;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-50%) scale(1.3);
  }
}

/* ============================================
   Search Box Enhancements
   ============================================ */
.search-box input {
  position: relative;
}

.search-box input:focus {
  animation: searchGlow 2s infinite;
}

@keyframes searchGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  }
}

/* ============================================
   Avatar & Dropdown Animations
   ============================================ */
.user-avatar {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.user-avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.profile-dropdown {
  animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  position: relative;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--primary);
  transition: width var(--transition-fast);
}

.dropdown-item:hover::before {
  width: 3px;
}

/* ============================================
   Streak & XP Badge Animations
   ============================================ */
.streak-badge, .xp-badge {
  position: relative;
  overflow: hidden;
}

.streak-badge::before, .xp-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   Modal Enhancements
   ============================================ */
.modal-content {
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-backdrop {
  animation: backdropFade 0.3s ease;
}

@keyframes backdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   Loading & Skeleton States
   ============================================ */
@keyframes skeleton {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, rgba(255,255,255,0.5) 50%, var(--border) 75%);
  background-size: 200px 100%;
  animation: skeleton 1.5s infinite;
}

/* ============================================
   Scroll Animations
   ============================================ */
.feature-card, .topic-pill {
  transition: all var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.topic-pill:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Enhanced Input Focus States
   ============================================ */
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  transform: scale(1.01);
}

/* ============================================
   Toast Enhancements
   ============================================ */
.toast {
  animation: toastSlide 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: var(--shadow-xl);
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ============================================
   Leaderboard Row Animations
   ============================================ */
.leaderboard-item {
  transition: all var(--transition-fast);
  animation: listItemFade 0.4s ease backwards;
}

.leaderboard-item:nth-child(1) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.3s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.4s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes listItemFade {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.leaderboard-item:hover {
  transform: translateX(8px);
  background: var(--background);
}

/* Dark mode overrides */
.dark .option-btn,
.dark .flashcard-back,
.dark .question-text,
.dark .feedback-area p,
.dark .hint-box {
  color: var(--text);
}

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

/* ============================================
   MOBILE UI IMPROVEMENTS - Jan 2026
   ============================================ */

/* Improved logo sizes throughout */
.landing-logo .logo-img {
  width: 72px !important;
  height: 72px !important;
}

.auth-logo-img {
  width: 120px !important;
  height: 120px !important;
  margin-bottom: 24px;
}

.sidebar .logo-img {
  width: 52px !important;
  height: 52px !important;
}

/* Better mobile scaling */
@media (max-width: 768px) {
  /* Root scaling */
  html {
    font-size: 15px;
  }
  
  /* Landing header */
  .landing-header {
    padding: 12px 16px;
    gap: 12px;
  }
  
  .landing-logo .logo-img {
    width: 48px !important;
    height: 48px !important;
  }
  
  .landing-logo .logo-text {
    font-size: 20px;
  }
  
  .landing-nav {
    display: none;
  }
  
  .landing-actions {
    gap: 8px;
  }
  
  .landing-actions .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  /* Hero section - cleaner on mobile */
  .hero-v2 {
    padding: 100px 16px 40px;
  }
  
  .hero-h1 {
    font-size: 32px !important;
    line-height: 1.2;
  }
  
  .hero-p {
    font-size: 16px;
    margin-bottom: 24px;
  }
  
  .hero-btns {
    flex-direction: column;
    gap: 12px;
  }
  
  .hero-btns .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-social-proof {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  /* Hide dashboard preview on mobile */
  .dashboard-preview {
    display: none !important;
  }
  
  .hero-right {
    display: none;
  }
  
  /* Stats strip */
  .hero-stats-strip {
    padding: 16px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stat-block {
    flex: 0 0 40%;
    padding: 8px;
  }
  
  .stat-sep {
    display: none;
  }
  
  /* Features bento - simplified on mobile */
  .bento-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  .bento-item {
    padding: 20px;
  }
  
  .bento-lg, .bento-md, .bento-sm {
    grid-column: span 1 !important;
  }
  
  /* Topic tiles */
  .topic-tiles {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .topic-tile {
    padding: 16px;
  }
  
  /* Pricing cards */
  .price-cards {
    flex-direction: column;
    gap: 20px;
  }
  
  .price-card-v2 {
    min-width: unset;
    width: 100%;
  }
  
  /* Auth modal */
  .auth-modal {
    padding: 24px 20px;
    margin: 16px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .auth-logo-img {
    width: 80px !important;
    height: 80px !important;
  }
  
  .auth-header h2 {
    font-size: 22px;
  }
  
  /* App dashboard on mobile */
  .views-container {
    padding: 16px;
  }
  
  .welcome-banner {
    padding: 20px;
    border-radius: var(--radius-lg);
  }
  
  .welcome-content h1 {
    font-size: 22px;
  }
  
  .home-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  .continue-card {
    grid-column: span 1 !important;
  }
  
  .home-card {
    padding: 16px;
  }
  
  /* Header */
  .header {
    padding: 0 16px;
    height: 60px;
  }
  
  .search-box {
    display: none;
  }
  
  .streak-badge, .xp-badge {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .streak-label {
    display: none;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .hero-h1 {
    font-size: 26px !important;
  }
  
  .hero-pill {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .section-h2 {
    font-size: 24px;
  }
  
  .section-sub {
    font-size: 14px;
  }
  
  .boards-strip {
    padding: 16px;
  }
  
  .boards-row {
    gap: 8px;
  }
  
  .board-tag {
    font-size: 11px;
    padding: 6px 12px;
  }
  
  /* Steps timeline */
  .steps-timeline {
    flex-direction: column;
    gap: 24px;
  }
  
  .step-line {
    display: none;
  }
  
  /* Footer */
  .footer-cols {
    flex-direction: column;
    gap: 24px;
  }
  
  /* CTA */
  .cta-v2 h2 {
    font-size: 24px;
  }
  
  .cta-checks {
    flex-direction: column;
    gap: 8px;
  }
}

/* Better touch targets */
@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 48px;
    min-width: 48px;
  }
  
  .nav-item {
    min-height: 48px;
  }
  
  .option-btn {
    min-height: 56px;
    padding: 16px;
  }
  
  .practice-tab {
    min-height: 48px;
  }
}

/* ============================================
   Cleaner Landing Page Styles
   ============================================ */
.hero-v2 {
  padding-top: 140px;
  padding-bottom: 60px;
}

.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-left {
  max-width: 600px;
}

.hero-h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-h1 span {
  display: block;
}

.hero-p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
}

/* Simplified feature section */
.features-v2 {
  padding: 80px 20px;
}

.section-h2 {
  font-size: 36px;
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

/* Better pricing display */
.pricing-v2 {
  padding: 80px 20px;
}

.price-cards {
  max-width: 800px;
  margin: 0 auto;
}

.price-card-v2 {
  padding: 32px;
  border-radius: var(--radius-xl);
}

.price-card-v2 .pc-header {
  margin-bottom: 24px;
}

.price-card-v2 .pc-price {
  font-size: 48px;
  font-weight: 800;
}

.pc-list li {
  padding: 10px 0;
  font-size: 15px;
}

/* Footer cleanup */
.footer-v2 {
  padding: 60px 20px 30px;
}

.footer-brand-v2 img {
  width: 48px;
  height: 48px;
}

/* ============================================
   Fair Pricing Tiers Visual
   ============================================ */
.pricing-card.featured::before {
  content: "BEST VALUE";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-accent);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Free tier enhancements */
.pricing-card:not(.featured) .price-features li {
  color: var(--text);
}

.pricing-card:not(.featured) .price-features li::before {
  color: var(--accent);
}

/* ============================================
   Final UI Fixes - January 2026
   ============================================ */

/* Bigger logos everywhere */
.landing-logo .logo-img {
  width: 80px !important;
  height: 80px !important;
}

.auth-logo-img {
  width: 140px !important;
  height: 140px !important;
  margin-bottom: 20px;
}

.sidebar .logo-img {
  width: 56px !important;
  height: 56px !important;
}

.header .logo-img {
  width: 48px !important;
  height: 48px !important;
}

/* Improved XP Popup */
.xp-popup {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  padding: 20px 40px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border-radius: 20px;
  font-weight: 700;
  font-size: 24px;
  text-align: center;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.5);
  animation: xpPopImproved 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-popup-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 8px;
}

.xp-popup-amount {
  font-size: 28px;
  font-weight: 800;
}

@keyframes xpPopImproved {
  0% { 
    opacity: 0; 
    transform: translateX(-50%) translateY(-30px) scale(0.5); 
  }
  60% { 
    transform: translateX(-50%) translateY(0) scale(1.15); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(-50%) translateY(0) scale(1); 
  }
}

/* Achievement popup spacing fix */
.achievement-popup {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9998;
  animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fix random lines - remove unwanted borders */
.view::before,
.view::after,
.dashboard::before,
.dashboard::after {
  display: none !important;
}

.home-grid,
.bento-grid,
.topic-path {
  border: none !important;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
  /* Bigger mobile logos */
  .landing-logo .logo-img {
    width: 56px !important;
    height: 56px !important;
  }
  
  .landing-logo .logo-text {
    font-size: 22px !important;
  }
  
  .auth-logo-img {
    width: 100px !important;
    height: 100px !important;
  }
  
  .sidebar .logo-img {
    width: 48px !important;
    height: 48px !important;
  }
  
  /* Fix streak/XP header spacing */
  .header-stats {
    gap: 8px;
  }
  
  .stat-item {
    padding: 6px 10px;
    font-size: 13px;
    gap: 4px;
  }
  
  /* Fix XP popup on mobile */
  .xp-popup {
    top: 15%;
    padding: 16px 32px;
    font-size: 20px;
    width: auto;
    max-width: 85%;
  }
  
  .xp-popup-amount {
    font-size: 24px;
  }
  
  /* Remove any random lines/borders on mobile */
  .hero-v2,
  .features-v2,
  .pricing-v2 {
    border: none !important;
  }
  
  .hero-v2::before,
  .hero-v2::after,
  .features-v2::before,
  .features-v2::after {
    display: none !important;
  }
  
  /* Better mobile grid spacing */
  .bento-grid {
    gap: 12px;
    padding: 0 12px;
  }
  
  .topic-tiles {
    gap: 10px;
  }
  
  /* Fix auth modal on mobile */
  .auth-content {
    padding: 24px 20px;
    max-height: 85vh;
  }
  
  /* Ensure proper stacking */
  .toast-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
  }
  
  .toast {
    font-size: 14px;
    padding: 12px 16px;
  }
}

/* Smaller mobile screens */
@media (max-width: 480px) {
  .landing-logo .logo-img {
    width: 48px !important;
    height: 48px !important;
  }
  
  .landing-logo .logo-text {
    font-size: 20px !important;
  }
  
  .auth-logo-img {
    width: 80px !important;
    height: 80px !important;
  }
  
  .xp-popup {
    top: 12%;
    padding: 14px 24px;
    font-size: 18px;
    border-radius: 16px;
  }
  
  .xp-popup-icon {
    font-size: 28px;
  }
  
  .xp-popup-amount {
    font-size: 20px;
  }
  
  /* Fix header on small screens */
  .header {
    padding: 8px 12px;
  }
  
  .header-stats {
    gap: 6px;
  }
  
  .stat-item {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* ============================================
   UI ENHANCEMENTS - Modern & Motivating
   ============================================ */

/* Enhanced Button Glow Effects */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-glow:hover::before {
  left: 100%;
}

.btn-primary {
  position: relative;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
  transform: translateY(-3px);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

/* Enhanced Card Hover Effects */
.home-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.home-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.home-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.home-card:hover::before {
  opacity: 1;
}

/* Topic Path Enhancements */
.topic-node {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.topic-node:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.topic-node::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.topic-node:hover::after {
  opacity: 1;
}

.topic-circle {
  width: 64px;
  height: 64px;
  background: var(--background);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: all 0.3s ease;
  border: 3px solid var(--border);
  flex-shrink: 0;
}

.topic-circle.completed {
  background: var(--gradient-accent);
  border-color: var(--accent);
  color: white;
}

.topic-circle.current {
  background: var(--gradient-primary);
  border-color: var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
}

.topic-connector {
  width: 4px;
  height: 40px;
  background: var(--border);
  margin-left: 50px;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.topic-connector.completed {
  background: var(--gradient-accent);
}

/* Status Badges */
.status-complete {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-progress {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-new {
  color: var(--warning);
  background: rgba(245, 158, 11, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Quiz Card Enhancements */
.quiz-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quiz-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.quiz-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.quiz-card:hover::before {
  opacity: 0.05;
}

.quiz-card > * {
  position: relative;
  z-index: 1;
}

.quiz-card-icon {
  font-size: 48px;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.quiz-card:hover .quiz-card-icon {
  transform: scale(1.1);
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Flashcard Set Card Enhancements */
.flashcard-set-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.flashcard-set-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.fc-set-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.fc-set-meta {
  color: var(--text-muted);
  font-size: 13px;
}

/* Leaderboard Enhancements */
.leaderboard-loading,
.leaderboard-empty,
.leaderboard-error {
  text-align: center;
  padding: 48px 24px;
}

.loading-spinner {
  font-size: 48px;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.leaderboard-empty .empty-icon,
.leaderboard-error .error-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.leaderboard-empty h3,
.leaderboard-error h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.leaderboard-empty p,
.leaderboard-error p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.leaderboard-your-rank {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--primary);
}

.leaderboard-item.top-three {
  font-weight: 600;
}

.leaderboard-item.top-three .lb-rank {
  font-size: 24px;
}

/* Profile Dropdown Enhancements */
.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item:hover {
  background: var(--background);
  color: var(--primary);
}

/* Welcome Banner Enhancement */
.welcome-banner {
  position: relative;
}

.welcome-banner::after {
  content: '📚';
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 80px;
  opacity: 0.3;
}

/* XP Badge Animation */
.xp-badge {
  animation: xpGlow 3s ease-in-out infinite;
}

@keyframes xpGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
  50% {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
  }
}

/* Streak Badge Animation */
.streak-badge {
  animation: fireGlow 2s ease-in-out infinite;
}

@keyframes fireGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
  50% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
  }
}

/* Level Badge Enhancement */
.level-badge {
  position: relative;
  animation: levelPulse 3s ease-in-out infinite;
}

@keyframes levelPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Quiz Feedback Animations */
.quiz-feedback.correct {
  animation: correctBounce 0.5s ease;
}

@keyframes correctBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.quiz-feedback.incorrect {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Lesson Content Enhancement */
.lesson-content {
  animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.lesson-content .highlight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 16px 0;
}

.lesson-content .example {
  background: var(--background);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  font-family: 'JetBrains Mono', monospace;
}

.lesson-content .tip {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.tip-icon {
  font-size: 24px;
  flex-shrink: 0;
}

/* Results View Enhancement */
.results-animation {
  font-size: 80px;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.results-score-display {
  animation: countUp 0.5s ease-out 0.3s backwards;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Achievement Popup Enhancement */
.achievement-popup {
  animation: achievementSlide 0.5s ease;
}

@keyframes achievementSlide {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Dark mode specific enhancements */
.dark .topic-node:hover {
  background: var(--surface-elevated);
}

.dark .quiz-card:hover,
.dark .flashcard-set-card:hover {
  background: var(--surface-elevated);
}

.dark .leaderboard-item:hover {
  background: var(--surface-elevated);
}

/* Mobile Responsiveness for new styles */
@media (max-width: 768px) {
  .topic-node {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  
  .topic-node:hover {
    transform: translateY(-4px);
  }
  
  .topic-node::after {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 4px;
  }
  
  .topic-connector {
    margin-left: auto;
    margin-right: auto;
  }
  
  .topic-details {
    width: 100%;
  }
  
  .topic-action {
    width: 100%;
  }
  
  .topic-action .btn {
    width: 100%;
  }
  
  .welcome-banner::after {
    display: none;
  }
}

/* ============================================
   IMPROVED XP POPUP STYLING
   ============================================ */
.xp-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
}

.xp-popup .xp-popup-inner,
.xp-popup-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  padding: 16px 28px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.xp-popup.hidden {
  display: none;
}

.xp-popup-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  padding: 16px 28px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4), 0 0 0 4px rgba(16, 185, 129, 0.1);
  animation: xpPopupBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-popup-icon {
  font-size: 32px;
  animation: xpStarSpin 0.6s ease;
}

@keyframes xpStarSpin {
  0% { transform: rotate(0deg) scale(0); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.xp-popup-content {
  display: flex;
  flex-direction: column;
  color: white;
}

.xp-popup-label {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.xp-popup-amount {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

@keyframes xpPopupBounce {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(-20px);
  }
  50% {
    transform: scale(1.1) translateY(0);
  }
  70% {
    transform: scale(0.95) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================
   IMPROVED ACHIEVEMENT POPUP STYLING
   ============================================ */
.achievement-popup {
  position: fixed;
  top: 100px;
  right: 24px;
  background: var(--surface);
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px var(--border);
  z-index: 9999;
  max-width: 360px;
  animation: achievementSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.achievement-popup.hidden {
  display: none;
}

@keyframes achievementSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.achievement-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #eab308);
  border-radius: 16px 16px 0 0;
}

.achievement-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  animation: achievementBounce 0.6s ease 0.2s;
}

@keyframes achievementBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.achievement-content {
  flex: 1;
  min-width: 0;
}

.achievement-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.achievement-xp {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}

/* Mobile adjustments for popups */
@media (max-width: 640px) {
  .xp-popup {
    top: 60px;
  }
  
  .xp-popup-inner {
    padding: 12px 20px;
    gap: 12px;
  }
  
  .xp-popup-icon {
    font-size: 24px;
  }
  
  .xp-popup-amount {
    font-size: 22px;
  }
  
  .achievement-popup {
    right: 12px;
    left: 12px;
    max-width: none;
    top: 70px;
  }
  
  .achievement-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
}

/* ============================================
   Topic Detail View
   ============================================ */
.topic-detail-view {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

.topic-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.topic-detail-icon {
  font-size: 48px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  flex-shrink: 0;
}

.topic-detail-info h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: var(--text-primary);
}

.topic-detail-info p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.topic-area-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  text-transform: capitalize;
}

.topic-detail-section {
  margin-bottom: 24px;
}

.topic-detail-section h3 {
  font-size: 18px;
  margin: 0 0 16px 0;
  color: var(--text-primary);
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lesson-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lesson-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lesson-card-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  border-radius: 10px;
  flex-shrink: 0;
}

.lesson-card-content {
  flex: 1;
}

.lesson-card-content h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.lesson-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.lesson-card-arrow {
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.lesson-card:hover .lesson-card-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

.coming-soon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}

.coming-soon-card span {
  font-size: 36px;
  margin-bottom: 12px;
}

.coming-soon-card p {
  margin: 0;
  color: var(--text-secondary);
}

.practice-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.practice-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.practice-card:hover:not(.disabled) {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.practice-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.practice-card-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #ff8a65);
  border-radius: 10px;
  flex-shrink: 0;
}

.practice-card.disabled .practice-card-icon {
  background: var(--background);
}

.practice-card-content {
  flex: 1;
}

.practice-card-content h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.practice-card-content p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Mobile adjustments for topic detail */
@media (max-width: 640px) {
  .topic-detail-view {
    padding: 12px;
  }
  
  .topic-detail-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
  }
  
  .topic-detail-icon {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }
  
  .topic-detail-info h2 {
    font-size: 20px;
  }
  
  .lesson-card {
    padding: 14px 16px;
  }
  
  .lesson-card-icon {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  
  .lesson-card-meta {
    flex-direction: column;
    gap: 4px;
  }
}

/* ============================================
   PREMIUM BADGE
   ============================================ */
.premium-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 14px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  border: 2px solid var(--surface);
  animation: premiumPulse 2s ease-in-out infinite;
}

@keyframes premiumPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

body.is-premium .pricing-card.premium {
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
}

body.is-premium .pricing-card.premium::before {
  content: '✓ Active';
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ============================================
   IMPROVED XP POPUP (CLEANER DESIGN)
   ============================================ */
.xp-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
}

.xp-popup.hidden {
  display: none;
}

.xp-popup-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  padding: 16px 28px;
  border-radius: 50px;
  box-shadow: 
    0 10px 40px rgba(99, 102, 241, 0.4),
    0 0 0 4px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: xpPopupSlide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes xpPopupSlide {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.xp-popup-icon {
  font-size: 24px;
  animation: xpIconBounce 0.6s ease;
}

@keyframes xpIconBounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.3) rotate(-10deg); }
  50% { transform: scale(1.1) rotate(10deg); }
  75% { transform: scale(1.2) rotate(-5deg); }
}

.xp-popup-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.xp-popup-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

.xp-popup-amount {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

/* ============================================
   IMPROVED ACHIEVEMENT POPUP (CLEANER DESIGN)
   ============================================ */
.achievement-popup {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 0 0 1px var(--border);
  z-index: 9999;
  max-width: 320px;
  animation: achievementPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes achievementPop {
  0% {
    opacity: 0;
    transform: translateX(100px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.achievement-popup.hidden {
  display: none;
}

.achievement-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706);
  border-radius: 16px 16px 0 0;
}

.achievement-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  animation: achievementIconPop 0.6s ease 0.2s both;
}

@keyframes achievementIconPop {
  0% { transform: scale(0.5) rotate(-10deg); }
  50% { transform: scale(1.15) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.achievement-content {
  flex: 1;
  min-width: 0;
}

.achievement-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.achievement-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.achievement-xp {
  font-size: 11px;
  color: #6366f1;
  font-weight: 700;
  margin-top: 4px;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .xp-popup {
    top: 70px;
  }
  
  .xp-popup-inner {
    padding: 12px 20px;
    gap: 10px;
  }
  
  .xp-popup-icon {
    font-size: 20px;
  }
  
  .xp-popup-amount {
    font-size: 18px;
  }
  
  .achievement-popup {
    right: 12px;
    left: auto;
    max-width: 280px;
    top: 70px;
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .achievement-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
  
  .achievement-popup-icon {
    font-size: 28px;
  }
  
  .achievement-popup h4 {
    font-size: 10px;
  }
  
  .achievement-popup p {
    font-size: 13px;
  }
  
  .premium-badge {
    width: 18px;
    height: 18px;
    font-size: 11px;
  }
}

/* ============================================
   PREMIUM FEATURES STYLES
   ============================================ */

/* Sidebar premium navigation */
.nav-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  padding: 16px 24px 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.premium-nav {
  position: relative;
}

.premium-nav .premium-star {
  position: absolute;
  right: 16px;
  font-size: 12px;
}

body.is-premium .premium-nav .premium-star {
  display: none;
}

/* Premium feature badge */
.premium-feature-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
}

/* Premium gate (locked content) */
.premium-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 2px dashed var(--border);
}

.premium-lock {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.premium-gate h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.premium-gate p {
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 0 20px;
}

.premium-content {
  display: none;
}

body.is-premium .premium-gate {
  display: none;
}

body.is-premium .premium-content {
  display: block;
}

/* ============================================
   PAST PAPERS
   ============================================ */
.paper-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.paper-filters select {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  min-width: 150px;
}

.past-papers-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.past-paper-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.pp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pp-topic {
  font-weight: 700;
  color: var(--primary);
  text-transform: capitalize;
}

.pp-marks {
  background: var(--background);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.pp-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

.pp-difficulty {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: capitalize;
}

.pp-difficulty.foundation {
  background: #dbeafe;
  color: #1e40af;
}

.pp-difficulty.higher {
  background: #fce7f3;
  color: #9d174d;
}

.pp-board {
  color: var(--text-secondary);
}

.pp-question {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--background);
  border-radius: 8px;
}

.pp-show-solution {
  margin-bottom: 16px;
}

.pp-solution {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #10b981;
}

.pp-solution.hidden {
  display: none;
}

.solution-steps {
  margin-bottom: 16px;
}

.solution-step {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-family: 'Courier New', monospace;
}

.solution-step:last-child {
  border-bottom: none;
}

.solution-answer {
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  color: #059669;
}

/* ============================================
   REVISION PLAN
   ============================================ */
.plan-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.plan-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.plan-stat-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.plan-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.plan-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.plan-week {
  margin-bottom: 32px;
}

.plan-week h4 {
  margin: 0 0 16px;
  color: var(--text);
}

.plan-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.plan-day {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-day:hover:not(.rest) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plan-day.weak {
  border-left: 4px solid #ef4444;
}

.plan-day.new {
  border-left: 4px solid #6366f1;
}

.plan-day.review {
  border-left: 4px solid #f59e0b;
}

.plan-day.practice {
  border-left: 4px solid #10b981;
}

.plan-day.rest {
  opacity: 0.5;
  cursor: default;
}

.plan-day-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.plan-day-topic {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.plan-day-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================
   PREDICTED GRADES
   ============================================ */
.grade-display {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  margin-bottom: 32px;
}

.predicted-grade-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}

.grade-label {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.grade-value {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.grade-confidence {
  font-size: 12px;
  opacity: 0.8;
}

.grade-breakdown {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.grade-breakdown h4 {
  margin: 0 0 16px;
}

.grade-topic-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.grade-topic-row:last-child {
  border-bottom: none;
}

.gt-name {
  flex: 1;
}

.gt-score {
  width: 60px;
  text-align: center;
  color: var(--text-secondary);
}

.gt-grade {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  background: var(--background);
}

.gt-grade.grade-9, .gt-grade.grade-8 {
  background: #dcfce7;
  color: #166534;
}

.gt-grade.grade-7, .gt-grade.grade-6 {
  background: #dbeafe;
  color: #1e40af;
}

.gt-grade.grade-5, .gt-grade.grade-4 {
  background: #fef3c7;
  color: #92400e;
}

.gt-grade.grade-3, .gt-grade.grade-2, .gt-grade.grade-1 {
  background: #fee2e2;
  color: #991b1b;
}

.grade-tips {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.grade-tips h4 {
  margin: 0 0 16px;
}

.improvement-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.improvement-tip:last-child {
  border-bottom: none;
}

.improvement-tip .tip-icon {
  font-size: 20px;
}

/* ============================================
   EXAM TIPS
   ============================================ */
.tips-category {
  margin-bottom: 32px;
}

.tips-category h3 {
  margin: 0 0 16px;
  color: var(--text);
}

.tips-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.exam-tip-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.exam-tip-card h4 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 15px;
}

.exam-tip-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================
   SUPPORT
   ============================================ */
.support-form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.support-form-card h4 {
  margin: 0 0 20px;
}

#support-form .form-group {
  margin-bottom: 16px;
}

#support-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

#support-form select,
#support-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

#support-form textarea {
  resize: vertical;
  min-height: 120px;
}

.support-faq {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.support-faq h4 {
  margin: 0 0 16px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  cursor: pointer;
  font-weight: 500;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-toggle {
  font-size: 20px;
  color: var(--text-secondary);
}

.faq-answer {
  padding: 0 0 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-answer.hidden {
  display: none;
}

/* ============================================
   MOBILE ADJUSTMENTS FOR PREMIUM FEATURES
   ============================================ */
@media (max-width: 768px) {
  .paper-filters {
    flex-direction: column;
  }
  
  .paper-filters select {
    width: 100%;
  }
  
  .grade-display {
    grid-template-columns: 1fr;
  }
  
  .grade-value {
    font-size: 56px;
  }
  
  .plan-days {
    grid-template-columns: 1fr 1fr;
  }
  
  .tips-list {
    grid-template-columns: 1fr;
  }
  
  .nav-section-label {
    padding: 12px 20px 6px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .plan-days {
    grid-template-columns: 1fr;
  }
  
  .plan-overview {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   WORKED SOLUTIONS
   ============================================ */
.worked-solutions-section {
  margin-top: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.solutions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.solutions-header h3 {
  margin: 0;
  font-size: 18px;
}

.solutions-gate {
  padding: 30px 20px;
  border: none;
  background: var(--background);
  border-radius: 12px;
}

.solutions-gate p {
  margin-bottom: 16px;
}

.solutions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.solution-item {
  background: var(--background);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid var(--border);
}

.solution-item.correct {
  border-left-color: #10b981;
}

.solution-item.incorrect {
  border-left-color: #ef4444;
}

.solution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.solution-number {
  font-weight: 700;
  color: var(--primary);
}

.solution-status {
  font-size: 13px;
  font-weight: 600;
}

.solution-item.correct .solution-status {
  color: #10b981;
}

.solution-item.incorrect .solution-status {
  color: #ef4444;
}

.solution-question {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.solution-your-answer {
  margin-bottom: 8px;
  font-size: 14px;
}

.solution-your-answer .wrong {
  color: #ef4444;
  font-weight: 600;
}

.solution-correct-answer {
  margin-bottom: 16px;
  font-size: 14px;
}

.solution-correct-answer .right {
  color: #10b981;
  font-weight: 600;
}

.solution-explanation {
  background: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.dark .solution-explanation {
  background: var(--surface);
}

.solution-explanation strong {
  display: block;
  margin-bottom: 12px;
  color: var(--primary);
}

.solution-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.solution-step-item {
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
  font-size: 14px;
}

.solution-step-item::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.solution-hint {
  background: #fef3c7;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
}

.dark .solution-hint {
  background: rgba(254, 243, 199, 0.1);
  color: #fbbf24;
}

/* Results Quick Actions */
.results-quick-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.results-action-btn {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.results-action-btn:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
  transform: translateY(-2px);
}

.results-action-btn .action-icon {
  font-size: 18px;
}

@media (max-width: 480px) {
  .results-quick-actions {
    flex-direction: column;
  }
  
  .results-action-btn {
    min-width: 100%;
  }
}

/* ============================================
   ACCOUNT SETTINGS MODAL (COMPACT)
   ============================================ */
#auth-modal.settings-modal .modal-content {
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
}

.settings-form-compact .form-group {
  margin-bottom: 12px;
}

.settings-form-compact input {
  padding: 10px 12px;
  font-size: 14px;
}

.settings-form-compact input:disabled {
  background: var(--background);
  cursor: not-allowed;
  opacity: 0.7;
}

.status-badge {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.premium {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
  color: #f59e0b;
}

.status-badge.free {
  background: var(--background);
  color: var(--text-secondary);
}

/* ============================================
   SCROLLABLE SIDEBAR
   ============================================ */
.sidebar {
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 20px;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ============================================
   LEADERBOARD PREMIUM BADGE
   ============================================ */
.lb-premium {
  font-size: 12px;
  margin-left: 4px;
  vertical-align: middle;
}

.leaderboard-item.is-premium .lb-name {
  color: var(--accent);
}

.leaderboard-item.is-premium .lb-avatar {
  box-shadow: 0 0 0 2px #fbbf24;
}

/* ============================================
   BUTTON SUCCESS STATE
   ============================================ */
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  cursor: default !important;
}

.btn-success:hover {
  transform: none !important;
}

/* ============================================
   MOCK TESTS
   ============================================ */
.mock-tests-section {
  margin-bottom: 32px;
}

.mock-tests-section h3 {
  margin: 0 0 8px;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.mock-tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.mock-test-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mock-test-card:hover:not(.locked) {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mock-test-card.locked {
  opacity: 0.7;
}

.mock-test-card.locked:hover {
  border-color: var(--accent);
}

.mock-test-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mock-test-difficulty {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
}

.mock-test-difficulty.foundation {
  background: #dbeafe;
  color: #1e40af;
}

.mock-test-difficulty.higher {
  background: #fce7f3;
  color: #9d174d;
}

.free-badge {
  background: #dcfce7;
  color: #166534;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
}

.premium-lock-small {
  font-size: 14px;
}

.mock-test-card h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.mock-test-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.individual-questions-section {
  margin-top: 32px;
}

.individual-questions-section h3 {
  margin: 0 0 16px;
}

.premium-gate.compact {
  flex-direction: row;
  padding: 16px 20px;
  gap: 16px;
  margin-bottom: 20px;
}

.premium-gate.compact span {
  font-size: 24px;
}

.premium-gate.compact p {
  flex: 1;
  margin: 0;
  text-align: left;
}

/* Text answer input for mock tests */
.text-answer-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-answer-input {
  padding: 16px;
  font-size: 18px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
}

.text-answer-input:focus {
  border-color: var(--primary);
  outline: none;
}

@media (max-width: 768px) {
  .mock-tests-grid {
    grid-template-columns: 1fr;
  }
  
  .premium-gate.compact {
    flex-direction: column;
    text-align: center;
  }
  
  .premium-gate.compact p {
    text-align: center;
  }
}

/* ============================================
   REVISION REMINDERS
   ============================================ */
.reminders-card {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
  border-color: rgba(251, 146, 60, 0.3);
}

.reminders-card h3 {
  color: #fb923c;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.reminders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reminder-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reminder-item:hover {
  border-color: #fb923c;
  transform: translateX(4px);
}

.reminder-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.reminder-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================
   SUPPORT MESSAGING
   ============================================ */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

.support-form-card,
.support-messages-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

.support-form-card h4,
.support-messages-card h4 {
  margin: 0 0 16px;
  font-size: 16px;
}

.message-limit-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.message-limit-notice span {
  font-size: 20px;
}

.message-limit-notice p {
  margin: 0;
  font-size: 13px;
  color: #fbbf24;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.no-messages {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.support-message-item {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.support-message-item.replied {
  border-color: rgba(16, 185, 129, 0.3);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.message-subject {
  font-weight: 600;
  font-size: 14px;
}

.message-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.message-status.replied {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.message-content {
  margin-bottom: 8px;
}

.user-message {
  font-size: 14px;
  color: var(--text);
  margin: 0;
}

.reply-content {
  background: rgba(124, 58, 237, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.reply-label {
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  display: block;
  margin-bottom: 4px;
}

.reply-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.message-time {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ============================================
   ADMIN MESSAGES
   ============================================ */
.admin-message-counts {
  display: flex;
  gap: 12px;
}

.count-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.count-badge.pending {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.count-badge.replied {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.admin-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.admin-messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-message-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.admin-message-item.pending {
  border-left: 4px solid #fbbf24;
}

.admin-message-item.replied {
  border-left: 4px solid #10b981;
  opacity: 0.8;
}

.admin-message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-info .username {
  font-weight: 700;
  color: var(--primary);
}

.user-info .email {
  font-size: 12px;
  color: var(--text-secondary);
}

.admin-message-subject {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.admin-message-content {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--background);
  border-radius: 8px;
}

.admin-reply-sent {
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  margin-bottom: 12px;
}

.admin-reply-sent strong {
  color: #10b981;
}

.admin-reply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-reply-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
}

.admin-reply-form textarea:focus {
  border-color: var(--primary);
  outline: none;
}

.admin-link {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%) !important;
  border: 1px solid rgba(251, 191, 36, 0.3) !important;
  margin-top: 8px;
}

.admin-link:hover {
  border-color: #fbbf24 !important;
}

/* ============================================
   NEW DASHBOARD DESIGN (Seneca/Sparx inspired)
   ============================================ */

.dashboard-greeting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  border-radius: 20px;
  color: white;
}

.greeting-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.greeting-text p {
  opacity: 0.9;
  font-size: 16px;
}

.streak-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.15);
  padding: 12px 20px;
  border-radius: 16px;
}

.streak-flame-big {
  font-size: 36px;
}

.streak-info {
  display: flex;
  flex-direction: column;
}

.streak-number {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.streak-label-text {
  font-size: 12px;
  opacity: 0.9;
}

/* Daily Progress */
.daily-progress-section {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: 16px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.daily-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.daily-bar {
  height: 10px;
  background: var(--bg);
  border-radius: 10px;
  overflow: hidden;
}

.daily-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* Study Today Section */
.study-today-section {
  margin-bottom: 32px;
}

.study-today-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 14px;
}

.study-topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.study-topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.study-topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: var(--primary);
}

.study-topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--topic-color, var(--primary));
}

.topic-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.topic-card-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.topic-card-progress {
  font-size: 12px;
  color: var(--text-secondary);
}

.topic-card-bar {
  height: 4px;
  background: var(--bg);
  border-radius: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.topic-card-bar-fill {
  height: 100%;
  background: var(--topic-color, var(--primary));
  border-radius: 4px;
  transition: width 0.3s;
}

/* Quick Actions */
.quick-actions-section {
  margin-bottom: 32px;
}

.quick-actions-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.quick-action-card:hover {
  border-color: var(--primary);
  background: var(--hover);
}

.qa-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  background: var(--bg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qa-text h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.qa-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

.qa-arrow {
  margin-left: auto;
  font-size: 20px;
  color: var(--text-secondary);
}

.premium-action .qa-icon {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
}

/* Stats Row */
.stats-row-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.stat-card-new {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: var(--bg);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Lesson Diagrams - Modern CSS-based */
.lesson-diagram {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
  text-align: center;
}

.lesson-diagram-title {
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Number System Diagram */
.number-system-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.number-set {
  border: 3px solid;
  border-radius: 16px;
  padding: 16px;
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-top: -8px;
}

.number-set:first-child {
  margin-top: 0;
}

.number-set-label {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--bg);
  padding: 0 8px;
  font-weight: 600;
  font-size: 13px;
}

.number-set-examples {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.set-real { border-color: #6366f1; }
.set-real .number-set-label { color: #6366f1; }

.set-rational { border-color: #3b82f6; }
.set-rational .number-set-label { color: #3b82f6; }

.set-integer { border-color: #10b981; }
.set-integer .number-set-label { color: #10b981; }

.set-whole { border-color: #f59e0b; }
.set-whole .number-set-label { color: #f59e0b; }

.set-natural { border-color: #ef4444; }
.set-natural .number-set-label { color: #ef4444; }

/* Number Line Diagram */
.number-line-diagram {
  padding: 20px 0;
}

.number-line {
  position: relative;
  height: 60px;
  margin: 20px auto;
  max-width: 500px;
}

.number-line-axis {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary));
  border-radius: 2px;
}

.number-line-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.number-line-arrow.left {
  left: 0;
  border-right: 12px solid var(--primary);
}

.number-line-arrow.right {
  right: 0;
  border-left: 12px solid var(--primary);
}

.number-line-points {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 0;
  left: 30px;
  right: 30px;
  bottom: 0;
}

.number-point {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.number-point-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 22px;
}

.number-point-label {
  margin-top: 8px;
  font-weight: 600;
  font-size: 14px;
}

.number-line-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.line-label {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.line-label.negative {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.line-label.positive {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* Place Value Table */
.place-value-table {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  border-collapse: collapse;
}

.place-value-table th,
.place-value-table td {
  padding: 12px 8px;
  text-align: center;
  border: 1px solid var(--border);
}

.place-value-table th {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.place-value-table td {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.place-value-table .decimal-point {
  font-size: 28px;
  border: none;
  background: transparent;
}

/* Irrational Numbers Cards */
.irrational-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.irrational-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.irrational-symbol {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Georgia', serif;
}

.irrational-value {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-family: monospace;
}

.irrational-name {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--text);
}

/* Quick Reference Table */
.reference-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.reference-table th,
.reference-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.reference-table th {
  background: var(--bg);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
}

.reference-table td:first-child {
  font-weight: 600;
  color: var(--primary);
}

/* Expression Anatomy Diagram */
.expression-anatomy {
  padding: 20px;
}

.expression-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 32px;
  font-family: 'Georgia', serif;
  margin-bottom: 20px;
}

.expression-part {
  padding: 8px 12px;
  border-radius: 8px;
  position: relative;
  font-weight: 600;
}

.expression-part.coeff {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.expression-part.var {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.expression-part.power {
  background: rgba(168, 85, 247, 0.15);
  color: #7c3aed;
  font-size: 20px;
  vertical-align: super;
  padding: 4px 6px;
}

.expression-part.const {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.expression-op {
  font-size: 24px;
  color: var(--text-secondary);
  padding: 0 8px;
}

.expression-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.legend-dot.coeff { background: #dc2626; }
.legend-dot.var { background: #2563eb; }
.legend-dot.power { background: #7c3aed; }
.legend-dot.const { background: #16a34a; }

/* Vocabulary Cards */
.vocab-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.vocab-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.vocab-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.vocab-term {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.vocab-def {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.vocab-example {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Georgia', serif;
}

/* Like Terms Visual */
.like-terms-visual {
  text-align: center;
  padding: 20px 0;
}

.terms-before,
.terms-after {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.term-bubble {
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Georgia', serif;
}

.term-bubble.x-term {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 2px solid #dc2626;
}

.term-bubble.y-term {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  border: 2px solid #2563eb;
}

.term-bubble.const-term {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 2px solid #16a34a;
}

.term-op {
  font-size: 20px;
  color: var(--text-secondary);
}

.terms-arrow {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  padding: 16px 0;
}

/* Like Terms Comparison Box */
.like-terms-box {
  border-radius: 12px;
  overflow: hidden;
}

.like-terms-box .box-header {
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}

.like-terms-box .box-content {
  padding: 16px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.like-terms-box.yes {
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid #10b981;
}

.like-terms-box.yes .box-header {
  background: #10b981;
  color: white;
}

.like-terms-box.no {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid #ef4444;
}

.like-terms-box.no .box-header {
  background: #ef4444;
  color: white;
}

.like-terms-box .reason {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Practice Grid */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.practice-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  position: relative;
}

.practice-q {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Georgia', serif;
}

.practice-a {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Georgia', serif;
}

/* Fraction Visuals */
.fraction-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 20px;
}

.pizza-diagram {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100px;
  height: 100px;
}

.pizza-slice {
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.pizza-slice.filled {
  background: var(--primary);
}

.pizza-slice.empty {
  background: var(--bg);
}

.pizza-slice:nth-child(1) { border-radius: 100% 0 0 0; }
.pizza-slice:nth-child(2) { border-radius: 0 100% 0 0; }
.pizza-slice:nth-child(3) { border-radius: 0 0 0 100%; }
.pizza-slice:nth-child(4) { border-radius: 0 0 100% 0; }

.fraction-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Georgia', serif;
}

.fraction-line {
  width: 40px;
  height: 4px;
  background: var(--primary);
  margin: 4px 0;
}

.fraction-labels {
  display: flex;
  flex-direction: column;
  gap: 30px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Fraction Types Grid */
.fraction-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.fraction-type-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.fraction-type-card.proper { border-color: #10b981; }
.fraction-type-card.improper { border-color: #f59e0b; }
.fraction-type-card.mixed { border-color: #6366f1; }

.type-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.type-example {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Georgia', serif;
}

.type-desc {
  font-size: 13px;
  color: var(--text);
  margin: 8px 0;
}

.type-visual {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Equivalent Bars */
.equivalent-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.eq-bar {
  height: 32px;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.eq-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

/* Conversion Box */
.conversion-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.conv-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.conv-example {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: 'Georgia', serif;
}

.conv-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.conv-result {
  font-size: 28px;
  font-weight: 700;
  color: #10b981;
  font-family: 'Georgia', serif;
}

/* Percentage Visuals */
.percent-bar-visual {
  padding: 20px;
}

.percent-bar {
  height: 40px;
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 16px;
}

.percent-fill {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.percent-equivalents {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.percent-equivalents .equiv {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
}

.percent-equivalents .eq {
  color: var(--text-secondary);
  font-size: 18px;
}

/* Building Blocks Visual */
.building-blocks-visual {
  padding: 16px;
}

.block-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.building-block {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.building-block.half {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.block-total {
  text-align: center;
  padding: 12px;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 16px;
}

/* Multiplier Visual */
.multiplier-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.mult-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
}

.mult-row.increase {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mult-row.decrease {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.mult-row .label {
  font-weight: 700;
  min-width: 50px;
}

.mult-row .mult {
  font-weight: 700;
  color: var(--primary);
}

.mult-row .reason {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Multiplier Table */
.multiplier-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mult-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-weight: 600;
  padding: 8px 16px;
  background: var(--bg);
  border-radius: 8px;
}

.mult-row-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
}

.mult-row-table.increase {
  background: rgba(16, 185, 129, 0.1);
}

.mult-row-table.decrease {
  background: rgba(239, 68, 68, 0.1);
}

.mult-row-table span:last-child {
  font-weight: 700;
  color: var(--primary);
}

/* Ratio Visuals */
.ratio-visual {
  text-align: center;
  padding: 20px;
}

.ratio-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.ratio-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ratio-items {
  font-size: 28px;
  letter-spacing: 4px;
}

.ratio-colon {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.ratio-result {
  font-size: 20px;
  padding: 12px 24px;
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 8px;
  display: inline-block;
}

.ratio-order-visual {
  padding: 16px;
}

.ratio-example .scenario {
  display: block;
  text-align: center;
  margin-bottom: 16px;
  font-size: 16px;
}

.ratio-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ratio-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ratio-option .label {
  color: var(--text-secondary);
}

.ratio-option .value {
  font-family: 'Georgia', serif;
}

/* Step List Visual */
.step-list-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.step-item .step-num {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* Ratio Share Visual */
.ratio-share-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.share-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.share-step .step-label {
  font-weight: 600;
  color: var(--primary);
}

.share-step .step-calc {
  font-family: 'Georgia', serif;
}

.share-step.check {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

.share-results {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: 'Georgia', serif;
}

/* Angle Types Grid */
.angle-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  padding: 16px;
}

.angle-type-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.angle-visual {
  font-size: 36px;
  margin-bottom: 8px;
  color: var(--primary);
}

.angle-visual.acute { transform: rotate(-30deg); }
.angle-visual.obtuse { transform: rotate(30deg); }

.angle-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.angle-range {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Angle Facts Visual */
.angle-facts-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.angle-fact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.angle-fact .fact-diagram {
  font-size: 24px;
  min-width: 50px;
  text-align: center;
}

.angle-fact .fact-text {
  display: flex;
  flex-direction: column;
}

.angle-fact .fact-text span {
  color: var(--primary);
  font-weight: 700;
}

/* Parallel Lines Rules */
.parallel-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.rule-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.rule-card .shape-letter {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.rule-card .rule-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.rule-card .rule-result {
  font-weight: 700;
  color: #10b981;
}

/* Angle Calculation Grid */
.angle-calc-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
}

/* Polygon Table */
.polygon-table {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.polygon-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 6px;
}

.polygon-row.header {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.polygon-row:not(.header) {
  background: var(--surface);
}

.polygon-row:not(.header) span:last-child {
  font-weight: 700;
  color: var(--primary);
}

/* Probability Scale */
.probability-scale {
  padding: 40px 20px 60px;
}

.prob-bar {
  position: relative;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
}

.prob-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
  border-radius: 4px;
}

.prob-marker {
  position: absolute;
  top: -30px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.prob-marker .marker-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.prob-marker .marker-text {
  position: absolute;
  top: 45px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Dice Visual */
.dice-visual {
  text-align: center;
  padding: 16px;
}

.dice-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.dice {
  font-size: 32px;
  padding: 8px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
}

.dice.highlight {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.dice-calc {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.dice-calc .result {
  font-weight: 700;
  color: #10b981;
}

/* Notation Cards */
.notation-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.notation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.notation-type {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.notation-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Georgia', serif;
}

/* Sample Space Grid */
.sample-space-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.sample-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
}

.sample-event {
  font-weight: 500;
}

.sample-outcomes {
  font-family: monospace;
  color: var(--primary);
  font-weight: 600;
}

/* Rule Summary Cards */
.rule-summary-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.rule-sum-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.rule-sum-card .rule-name {
  font-weight: 600;
}

.rule-sum-card .rule-formula {
  font-family: 'Georgia', serif;
  color: var(--primary);
}

/* Exclusive Visual */
.exclusive-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  flex-wrap: wrap;
}

.event-circle {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.or-text {
  font-weight: 700;
  color: var(--text-secondary);
}

.formula-result {
  background: var(--surface);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Georgia', serif;
  font-weight: 600;
}

/* Statistics Overview */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px;
}

@media (max-width: 600px) {
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card-mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card-mini .stat-icon {
  font-size: 24px;
}

.stat-card-mini .stat-name {
  font-weight: 600;
  font-size: 14px;
}

.stat-card-mini .stat-desc {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Mean Calculation Visual */
.mean-calc-visual {
  text-align: center;
  padding: 16px;
}

.data-boxes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.data-boxes span {
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 6px;
  font-weight: 600;
}

.data-boxes .total {
  background: var(--primary);
  color: white;
}

.mean-result {
  font-size: 20px;
  font-family: 'Georgia', serif;
}

/* Median Visual */
.median-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.median-example {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.example-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.ordered-data {
  display: flex;
  gap: 4px;
}

.ordered-data span {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
}

.ordered-data span.middle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.median-answer {
  font-family: 'Georgia', serif;
}

/* Mode & Range Visual */
.mode-range-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
}

@media (max-width: 500px) {
  .mode-range-visual {
    grid-template-columns: 1fr;
  }
}

.mode-section, .range-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
}

.section-title {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.frequency-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.freq-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.freq-item.highlight {
  font-weight: 700;
  color: var(--primary);
}

.freq-bar {
  height: 8px;
  background: var(--primary);
  border-radius: 4px;
  flex-grow: 1;
}

.range-calc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Georgia', serif;
}

.range-calc .highest { color: #ef4444; }
.range-calc .lowest { color: #10b981; }
.range-calc .range-result { color: var(--primary); }

/* Average Choice Grid */
.average-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

@media (max-width: 500px) {
  .average-choice-grid {
    grid-template-columns: 1fr;
  }
}

.choice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-name {
  font-weight: 700;
  color: var(--primary);
}

.choice-when {
  font-size: 13px;
}

.choice-example {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Sequence Visual */
.sequence-visual {
  padding: 16px;
  overflow-x: auto;
}

.seq-terms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.seq-term {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 50px;
}

.term-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Georgia', serif;
}

.term-pos {
  font-size: 11px;
  color: var(--text-secondary);
}

.seq-arrow {
  font-weight: 600;
  color: #10b981;
  font-size: 14px;
}

/* Sequence Types Grid */
.sequence-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

@media (max-width: 500px) {
  .sequence-types-grid {
    grid-template-columns: 1fr;
  }
}

.seq-type-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seq-name {
  font-weight: 700;
  color: var(--primary);
}

.seq-rule {
  font-size: 13px;
  color: var(--text-secondary);
}

.seq-example {
  font-family: 'Georgia', serif;
  font-size: 14px;
}

/* Transformation Visual */
.transform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

@media (max-width: 500px) {
  .transform-grid {
    grid-template-columns: 1fr;
  }
}

.transform-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.transform-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.transform-name {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.transform-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.transform-key {
  font-size: 12px;
  background: var(--bg);
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 8px;
  display: inline-block;
}

/* Vector Visual */
.vector-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 20px;
  flex-wrap: wrap;
}

.vector-display {
  display: flex;
  align-items: center;
  font-size: 48px;
  font-family: 'Georgia', serif;
}

.vector-bracket {
  font-weight: 300;
  color: var(--text-secondary);
}

.vector-values {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
}

.vec-x, .vec-y {
  font-weight: 700;
  color: var(--primary);
}

.vector-meaning {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vec-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.vec-label {
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: monospace;
}

.vec-desc {
  color: #10b981;
  font-weight: 600;
}

/* Translation Calculation */
.translation-calc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.trans-step {
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
}

.trans-result {
  padding: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid #10b981;
  border-radius: 8px;
  text-align: center;
  font-size: 18px;
}

/* Flowchart Diagram */
.flowchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
}

.flowchart-box {
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  max-width: 280px;
  width: 100%;
  text-align: center;
}

.flowchart-box.start {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: white;
}

.flowchart-box.process {
  background: var(--surface);
  border: 2px solid var(--border);
}

.flowchart-box.decision {
  background: rgba(251, 191, 36, 0.1);
  border: 2px solid #f59e0b;
  transform: rotate(0deg);
}

.flowchart-box.end {
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid #10b981;
  color: #10b981;
  font-weight: 600;
}

.flowchart-arrow {
  font-size: 20px;
  color: var(--text-secondary);
}

.flowchart-split {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: center;
}

.flowchart-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.flowchart-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.formula-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.05));
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 16px 24px;
  margin: 16px 0;
  text-align: center;
}

.formula-box .formula {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Georgia', serif;
}

.formula-box .formula-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.example-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.05));
  border-left: 4px solid #10b981;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 16px 0;
}

.example-box-title {
  font-weight: 600;
  color: #10b981;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-box {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
  border-left: 4px solid #f59e0b;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 16px 0;
}

.tip-box-title {
  font-weight: 600;
  color: #f59e0b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-box {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.05));
  border-left: 4px solid #ef4444;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  margin: 16px 0;
}

.warning-box-title {
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile Responsive for new dashboard */
@media (max-width: 768px) {
  .dashboard-greeting {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }
  
  .greeting-text h1 {
    font-size: 22px;
  }
  
  .streak-highlight {
    width: 100%;
    justify-content: center;
  }
  
  .study-topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-row-section {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card-new {
    padding: 12px;
  }
  
  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .stat-value {
    font-size: 16px;
  }
}

/* ============================================
   GUIDED REVISION SECTION
   ============================================ */

.guided-revision-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.next-step-card {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 16px;
  padding: 20px;
  color: white;
  position: relative;
  overflow: hidden;
}

.next-step-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.next-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.next-step-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.next-step-time {
  font-size: 12px;
  opacity: 0.9;
}

.next-step-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.next-step-reason {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 16px;
  line-height: 1.4;
}

.next-step-btn {
  background: white;
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.next-step-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sprint-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.sprint-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.1);
}

.sprint-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.sprint-content {
  flex: 1;
}

.sprint-content h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sprint-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.sprint-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sprint-btn:hover {
  background: #7c3aed;
  transform: scale(1.05);
}

/* Students Online Counter */
.online-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

#students-online {
  font-weight: 700;
  color: var(--primary);
}

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-card {
  height: 120px;
  border-radius: 16px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .guided-revision-section {
    grid-template-columns: 1fr;
  }
  
  .next-step-card {
    padding: 16px;
  }
  
  .sprint-card {
    padding: 16px;
  }
  
  .sprint-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* ============================================
   MICROINTERACTIONS & POLISH
   ============================================ */

/* Button press effect */
button:active {
  transform: scale(0.97);
}

/* Card hover lift */
.study-topic-card:hover,
.stat-card-new:hover,
.quick-action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* XP popup animation */
.xp-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--primary);
  color: white;
  padding: 16px 32px;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 700;
  animation: xpPop 1.5s ease forwards;
  z-index: 9999;
  pointer-events: none;
}

@keyframes xpPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  40% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -100%); }
}

/* Improved selected answer state */
.option-btn.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.option-btn.correct {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.option-btn.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Accessibility: Larger tap targets */
.option-btn {
  min-height: 48px;
}

.quick-action-card {
  min-height: 72px;
}

/* High contrast for dark mode focus states */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Keyboard navigation for quiz options */
.option-btn:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* ============================================
   CHALLENGES & REFERRALS
   ============================================ */

.referral-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.referral-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 16px;
}

.referral-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.referral-content {
  flex: 1;
}

.referral-content h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.referral-content p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.code-copy-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.code-copy-box input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}

.code-copy-box.large {
  align-items: center;
}

.friend-code-display {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary);
  font-family: monospace;
}

.copy-btn {
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}

.referral-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.referral-stats strong {
  color: var(--primary);
}

/* Challenge Actions */
.challenge-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.challenge-action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.challenge-action-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.challenge-action-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.action-input-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-input-group input,
.action-input-group select {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}

.action-input-group select {
  min-width: 100px;
  flex: 0;
}

/* Challenges List */
.challenges-list-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.challenges-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.no-challenges {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.challenge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.challenge-card.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.challenge-card.ended {
  opacity: 0.7;
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.challenge-header h4 {
  font-size: 15px;
  font-weight: 600;
}

.challenge-status {
  font-size: 12px;
  font-weight: 600;
}

.challenge-status.active {
  color: #10b981;
}

.challenge-status.ended {
  color: var(--text-secondary);
}

.challenge-info {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

/* Leaderboard Entry */
.leaderboard-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 8px;
}

.leaderboard-entry.top-3 {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(251, 191, 36, 0.1));
}

.leaderboard-entry .rank {
  font-size: 18px;
  min-width: 30px;
}

.leaderboard-entry .avatar {
  font-size: 20px;
}

.leaderboard-entry .name {
  flex: 1;
  font-weight: 600;
}

.leaderboard-entry .score {
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 640px) {
  .referral-section {
    grid-template-columns: 1fr;
  }
  
  .challenge-actions {
    grid-template-columns: 1fr;
  }
  
  .referral-card {
    flex-direction: column;
    text-align: center;
  }
  
  .referral-icon {
    margin: 0 auto;
  }
}

/* ============================================
   EMAIL VERIFICATION
   ============================================ */

.verify-email-container {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.verify-email-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.verify-icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.verify-email-card h2 {
  margin: 0 0 12px 0;
  font-size: 24px;
}

.verify-email-card p {
  color: var(--text-secondary);
  margin: 0 0 24px 0;
}

.verify-loading .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.verify-email-card.success .verify-icon { color: #10b981; }
.verify-email-card.error .verify-icon { color: #ef4444; }

/* Email verification banner */
.email-verify-banner {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.email-verify-banner p {
  margin: 0;
  font-size: 14px;
}

.email-verify-banner .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  font-size: 13px;
}

.email-verify-banner .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Status badges in account settings */
.status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge.verified {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.status-badge.not-verified {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

/* Verification required block */
.verification-required {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 16px;
}

.verification-required .verify-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.verification-required h3 {
  margin: 0 0 8px 0;
  color: var(--text);
}

.verification-required p {
  color: var(--text-secondary);
  margin: 0 0 20px 0;
}

/* ============================================
   ONBOARDING MODAL (Medly-style)
   ============================================ */

.onboarding-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.onboarding-modal.hidden {
  display: none;
}

.onboarding-container {
  width: 100%;
  max-width: 600px;
  padding: 40px;
  text-align: center;
}

/* Progress Steps */
.onboarding-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 48px;
  padding: 0 20px;
}

.progress-step {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.progress-step.active {
  background: var(--primary);
}

.progress-step.completed {
  background: var(--primary);
}

/* Step Content */
.onboarding-step {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.onboarding-step.active {
  display: block;
}

.onboarding-step h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text);
}

.step-subtitle {
  color: var(--text-secondary);
  margin-top: -24px;
  margin-bottom: 32px;
}

/* Onboard Sections */
.onboard-section {
  margin-bottom: 32px;
}

.onboard-section label {
  display: block;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.onboard-section input {
  width: 100%;
  max-width: 400px;
  padding: 16px 24px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 16px;
  text-align: center;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
}

.onboard-section input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Avatar Grid */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.avatar-option {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-option:hover {
  transform: scale(1.1);
  border-color: var(--primary);
}

.avatar-option.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  transform: scale(1.1);
}

/* Goal Options */
.goal-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.goal-option {
  padding: 18px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.goal-option:hover {
  border-color: var(--primary);
  background: var(--hover);
}

.goal-option.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  color: var(--primary);
}

/* Year Options */
.year-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.year-option {
  padding: 18px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.year-option:hover {
  border-color: var(--primary);
}

.year-option.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary);
}

/* Board Options */
.board-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.board-option {
  padding: 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 120px;
}

.board-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.board-option.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.board-logo {
  font-size: 32px;
}

.board-option span:last-child {
  font-weight: 600;
  font-size: 15px;
}

/* Tier Options */
.tier-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 450px;
  margin: 0 auto;
}

.tier-option {
  padding: 32px 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 160px;
}

.tier-option:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.tier-option.selected {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.tier-icon {
  font-size: 40px;
}

.tier-name {
  font-size: 18px;
  font-weight: 700;
}

.tier-grades {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Onboarding Navigation */
.onboarding-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding: 0 20px;
}

.onboarding-nav .btn-primary {
  min-width: 160px;
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 50px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive Onboarding */
@media (max-width: 768px) {
  .onboarding-container {
    padding: 24px 20px;
  }
  
  .onboarding-step h1 {
    font-size: 22px;
  }
  
  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  
  .avatar-option {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }
  
  .board-options {
    grid-template-columns: 1fr;
  }
  
  .tier-options {
    grid-template-columns: 1fr;
  }
  
  .onboarding-nav {
    flex-direction: column-reverse;
    gap: 12px;
  }
  
  .onboarding-nav .btn-ghost {
    visibility: visible !important;
  }
}

/* ============================================
   TRIGONOMETRY & ADVANCED MATH STYLES
   ============================================ */

/* Fraction display */
.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 4px;
}

.frac .num {
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}

.frac .den {
  padding-top: 2px;
}

/* Trig Triangle Visual */
.trig-triangle-visual {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.triangle-diagram {
  width: 200px;
  height: 150px;
  position: relative;
  background: linear-gradient(135deg, transparent 50%, rgba(139, 92, 246, 0.1) 50%);
  border-left: 3px solid var(--primary);
  border-bottom: 3px solid var(--primary);
}

.triangle-side {
  position: absolute;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.triangle-side.hyp {
  top: 50%;
  right: -10px;
  transform: rotate(-40deg);
  background: #ef4444;
  color: white;
}

.triangle-side.opp {
  left: -70px;
  top: 50%;
  transform: translateY(-50%);
  background: #3b82f6;
  color: white;
}

.triangle-side.adj {
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #22c55e;
  color: white;
}

.triangle-angle {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  font-style: italic;
}

.side-labels p {
  margin: 8px 0;
  font-size: 14px;
}

/* Trig Ratios Grid */
.trig-ratios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.trig-ratio-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 2px solid var(--border);
}

.trig-ratio-card.sin {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.trig-ratio-card.cos {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.trig-ratio-card.tan {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}

.ratio-name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}

.trig-ratio-card.sin .ratio-name { color: #ef4444; }
.trig-ratio-card.cos .ratio-name { color: #3b82f6; }
.trig-ratio-card.tan .ratio-name { color: #22c55e; }

.ratio-formula {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Georgia', serif;
}

.ratio-meaning {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Trig Working Steps */
.trig-working {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.working-step {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: 'Georgia', serif;
  font-size: 16px;
  line-height: 1.8;
}

.working-step:last-child {
  border-bottom: none;
}

.step-label {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  font-family: var(--font-primary);
}

/* Trig Values Table */
.trig-values-table {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
}

.trig-table-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.trig-table-row:last-child {
  border-bottom: none;
}

.trig-table-row.header {
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.trig-table-row span {
  font-family: 'Georgia', serif;
}

/* Higher Tier Badge */
.higher-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  margin: 12px 0;
}

/* Formula Cards Grid */
.formula-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.formula-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.formula-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.shape-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.shape-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--primary);
}

.shape-formula {
  font-family: 'Georgia', serif;
  font-size: 14px;
  padding: 4px 0;
  color: var(--text);
}

/* Circle Formulas Visual */
.circle-formulas-visual {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.circle-diagram {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-shape {
  width: 100px;
  height: 100px;
  border: 4px solid var(--primary);
  border-radius: 50%;
  position: relative;
}

.radius-line {
  position: absolute;
  width: 46px;
  height: 3px;
  background: #ef4444;
  top: 50%;
  left: 50%;
  transform: translateY(-50%);
}

.radius-label {
  position: absolute;
  top: 40%;
  left: 60%;
  font-weight: 700;
  color: #ef4444;
  font-style: italic;
}

.circle-formulas {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Volume Concepts */
.volume-concepts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.concept-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.concept-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.concept-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
}

.concept-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Triangle Label Visual */
.triangle-label-visual {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
}

.triangle-label-visual ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}

.triangle-label-visual li {
  padding: 8px 0;
  font-family: 'Georgia', serif;
}

/* Mobile responsive for trig */
@media (max-width: 768px) {
  .trig-ratios-grid {
    grid-template-columns: 1fr;
  }
  
  .trig-triangle-visual {
    flex-direction: column;
  }
  
  .formula-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .circle-formulas-visual {
    flex-direction: column;
  }
}

/* ============================================
   PYTHAGORAS VISUAL STYLES
   ============================================ */

.pythag-visual {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.pythag-triangle-container {
  position: relative;
  width: 200px;
  height: 160px;
}

.pythag-triangle-svg {
  width: 100%;
  height: 100%;
}

.pythag-labels {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.pythag-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.pythag-label-dot {
  width: 16px;
  height: 4px;
  border-radius: 2px;
}

.pythag-label-dot.side-a { background: var(--primary); }
.pythag-label-dot.side-b { background: var(--primary); }
.pythag-label-dot.side-c { background: #ef4444; }

/* SVG-based diagram styling */
.pythag-svg, .trig-svg {
  display: block;
  margin: 0 auto;
}

.pythag-svg text, .trig-svg text {
  font-family: var(--font-primary);
}

/* Side labels cards */
.side-labels-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.side-label-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 14px;
}

.side-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.triples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.triple-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.triple-values {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.triple-check {
  font-size: 12px;
  color: var(--text-secondary);
}

/* FOIL Grid */
.foil-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.foil-card {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.foil-letter {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.foil-word {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 4px 0;
}

.foil-eg {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  font-family: 'Georgia', serif;
}

/* Expand Visual */
.expand-visual {
  text-align: center;
  padding: 20px;
}

.expand-before, .expand-after {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 24px;
  font-family: 'Georgia', serif;
}

.outside-term {
  color: #ef4444;
  font-weight: 700;
}

.inside-term {
  color: var(--primary);
  font-weight: 600;
}

.result-term {
  background: rgba(139, 92, 246, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}

.expand-arrows {
  padding: 16px 0;
  font-size: 24px;
  color: var(--text-secondary);
}

/* Balance Scale Visual */
.balance-visual {
  text-align: center;
  padding: 20px;
}

.balance-scale {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 24px;
  font-family: 'Georgia', serif;
}

.balance-side {
  background: var(--surface);
  border: 3px solid var(--primary);
  padding: 16px 24px;
  border-radius: 12px;
  font-weight: 600;
}

.balance-center {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

/* Equation Steps */
.equation-steps {
  margin-top: 12px;
}

.eq-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-family: 'Georgia', serif;
  font-size: 18px;
}

.eq-equals {
  font-weight: 700;
  color: var(--primary);
}

.eq-action {
  font-size: 14px;
  color: var(--text-secondary);
  font-family: var(--font-primary);
}

/* AND/OR Visual */
.and-or-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rule-box {
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.rule-box.and-rule {
  background: rgba(59, 130, 246, 0.1);
  border: 2px solid #3b82f6;
}

.rule-box.or-rule {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid #22c55e;
}

.rule-symbol {
  display: block;
  font-size: 24px;
  font-weight: 800;
}

.and-rule .rule-symbol { color: #3b82f6; }
.or-rule .rule-symbol { color: #22c55e; }

.rule-operation {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0;
}

.rule-when {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Tree Diagram Visual */
.tree-diagram-visual {
  padding: 20px;
}

.tree-level {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 12px 0;
}

.tree-start {
  background: var(--primary);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600;
}

.tree-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.branch-prob {
  font-size: 12px;
  color: var(--text-secondary);
}

.branch-outcome {
  background: var(--surface);
  border: 2px solid var(--primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.final-outcome {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* Rules List Visual */
.rules-list-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  padding: 12px 16px;
  border-radius: 10px;
}

.rule-num {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Tree Calc Visual */
.tree-calc-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.calc-rule {
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}

.calc-symbol {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.calc-word {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0;
}

.calc-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* nth Term Visual */
.nth-term-visual {
  text-align: center;
}

.term-example {
  font-size: 16px;
  margin-bottom: 16px;
}

.method-comparison {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.method-card {
  padding: 16px;
  border-radius: 12px;
}

.method-card.bad {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid #ef4444;
}

.method-card.good {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid #22c55e;
}

.method-name {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.method-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Check Table */
.check-table {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

.check-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.check-row:last-child { border-bottom: none; }

.check-row.header {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

/* Properties Grid */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.property-card {
  background: var(--surface);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.prop-icon {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.prop-text {
  font-size: 13px;
  font-weight: 600;
}

/* Mirror Lines Grid */
.mirror-lines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mirror-card {
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--border);
}

.mirror-name {
  display: block;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
}

.mirror-eq {
  display: block;
  font-family: 'Georgia', serif;
  font-size: 18px;
  margin: 8px 0;
}

.mirror-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Reflect Rules Table */
.reflect-rules-table, .rotation-rules-table {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

.reflect-row, .rot-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-family: 'Georgia', serif;
}

.reflect-row:last-child, .rot-row:last-child { border-bottom: none; }

.reflect-row.header, .rot-row.header {
  background: var(--primary);
  color: white;
  font-weight: 600;
  font-family: var(--font-primary);
}

/* Rotation Requirements */
.rotation-requirements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.req-card {
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--border);
}

.req-num {
  display: block;
  background: var(--primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 0 auto 8px;
  line-height: 28px;
  font-weight: 700;
}

.req-name {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.req-eg {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Steps Visual */
.steps-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.step-box {
  background: var(--surface);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
}

.step-n {
  display: block;
  background: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0 auto 8px;
  line-height: 24px;
  font-size: 12px;
  font-weight: 700;
}

/* Full Description */
.full-description {
  background: rgba(34, 197, 94, 0.1);
  border: 2px solid #22c55e;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 16px;
}

/* Mobile responsive for new elements */
@media (max-width: 768px) {
  .foil-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .and-or-visual,
  .method-comparison,
  .properties-grid,
  .mirror-lines-grid {
    grid-template-columns: 1fr;
  }
  
  .rotation-requirements {
    grid-template-columns: 1fr;
  }
  
  .steps-visual {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tree-calc-visual {
    grid-template-columns: 1fr;
  }
  
  .balance-scale {
    flex-direction: column;
  }
}

/* ============================================
   Mini Games View
   ============================================ */
.minigame-section {
  margin-bottom: 32px;
}

.minigame-section h3 {
  margin-bottom: 16px;
  color: var(--text);
}

.minigames-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.minigame-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-fast);
}

.minigame-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.minigame-card.featured {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border: 2px solid var(--primary);
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.minigame-badge {
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  position: absolute;
  top: -12px;
  left: 20px;
}

.minigame-card.featured {
  position: relative;
  padding-top: 32px;
}

.minigame-icon {
  font-size: 48px;
  text-align: center;
  flex-shrink: 0;
}

.minigame-info {
  flex: 1;
}

.minigame-info h3, .minigame-info h4 {
  margin: 0 0 8px;
  color: var(--text);
}

.minigame-info p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.minigame-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reward-tag {
  background: rgba(139, 92, 246, 0.15);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.minigame-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.minigame-stats {
  font-size: 13px;
  color: var(--text-secondary);
}

.minigame-stats strong {
  color: var(--primary);
}

.btn-large {
  padding: 14px 28px;
  font-size: 16px;
}

/* Weekly Prize Reminder */
.weekly-prize-reminder {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-top: 32px;
}

[data-theme="dark"] .weekly-prize-reminder {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
}

.weekly-prize-reminder h4 {
  margin: 0 0 8px;
  color: #92400e;
}

[data-theme="dark"] .weekly-prize-reminder h4 {
  color: #fef3c7;
}

.weekly-prize-reminder p {
  margin: 0;
  color: #78350f;
  font-size: 14px;
}

[data-theme="dark"] .weekly-prize-reminder p {
  color: #fde68a;
}

/* Boss Battle Modal */
.boss-battle-modal {
  padding: 32px;
  text-align: center;
  max-width: 500px;
}

.boss-intro-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: boss-bounce 1s ease-in-out infinite;
}

@keyframes boss-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.boss-intro-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.boss-intro-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.boss-intro-rules {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.boss-intro-rules ul {
  margin: 0;
  padding-left: 20px;
}

.boss-intro-rules li {
  margin: 8px 0;
  color: var(--text-secondary);
}

.boss-intro-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Boss Battle Game UI */
.boss-battle-game {
  padding: 24px;
  max-width: 600px;
  margin: 0 auto;
}

.battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.battle-timer {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.battle-timer.warning {
  color: #f59e0b;
  animation: timer-pulse 0.5s ease-in-out infinite;
}

.battle-timer.danger {
  color: #ef4444;
}

@keyframes timer-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.battle-score {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.score-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--success);
}

.battle-combo {
  background: linear-gradient(135deg, var(--primary), #ec4899);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
}

.battle-progress {
  background: var(--surface);
  border-radius: 20px;
  padding: 4px;
  margin-bottom: 24px;
  display: flex;
  gap: 4px;
}

.progress-dot {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.progress-dot.correct {
  background: var(--success);
}

.progress-dot.incorrect {
  background: var(--error);
}

.progress-dot.current {
  background: var(--primary);
  animation: current-pulse 1s ease-in-out infinite;
}

@keyframes current-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.battle-question {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.battle-question h3 {
  margin: 0;
  font-size: 18px;
  text-align: center;
  color: var(--text);
}

.battle-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.battle-option {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.battle-option:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.battle-option.correct {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--success);
  color: var(--success);
}

.battle-option.incorrect {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--error);
  color: var(--error);
}

/* Boss Battle Results */
.boss-results-modal {
  padding: 32px;
  text-align: center;
  max-width: 500px;
}

.results-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.results-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.result-stat {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius-md);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.xp-breakdown {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.xp-breakdown h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.xp-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.xp-line:last-child {
  border-bottom: none;
  font-weight: 600;
  color: var(--primary);
}

.xp-line span:last-child {
  color: var(--success);
}

/* ============================================
   XP Shop View
   ============================================ */
.shop-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), #ec4899);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
}

.balance-icon {
  font-size: 20px;
}

.balance-amount {
  font-size: 20px;
}

.balance-label {
  font-size: 14px;
  opacity: 0.9;
}

.xp-shop {
  max-width: 800px;
  margin: 0 auto;
}

.xp-boost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.xp-boost-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all var(--transition-fast);
}

.xp-boost-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.xp-boost-card.affordable {
  border-color: var(--success);
}

.xp-boost-card.locked {
  opacity: 0.7;
}

.boost-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.boost-hours {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.boost-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.boost-cost {
  margin-bottom: 16px;
}

.cost-xp {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.shop-premium-status {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.shop-premium-status h3 {
  margin: 0 0 8px;
  color: var(--primary);
}

.shop-premium-status p {
  margin: 0;
  color: var(--text-secondary);
}

.premium-time-large {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 12px;
}

.shop-tips {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.shop-tips h4 {
  margin: 0 0 12px;
  color: var(--text);
}

.shop-tips ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.shop-tips li {
  margin: 8px 0;
}

/* Premium Alternatives Grid */
.premium-alternatives {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.premium-alternatives h3 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--text);
}

.alternatives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.alternative-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.alternative-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.alt-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.alternative-card h4 {
  margin: 0 0 4px;
  color: var(--text);
}

.alternative-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Premium Status Banner */
.premium-status-banner {
  max-width: 600px;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.premium-status-banner.hidden {
  display: none;
}

.premium-active-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), #ec4899);
  color: white;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.premium-time-info {
  color: var(--text-secondary);
}

.premium-time-info strong {
  color: var(--primary);
  font-size: 18px;
}

/* ============================================
   Enhanced Animations & Polish
   ============================================ */

/* View Transition Animation */
.view {
  animation: viewSlideIn 0.3s ease-out;
}

@keyframes viewSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary); }
  50% { box-shadow: 0 0 20px var(--primary), 0 0 40px var(--primary); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* XP Popup Animation */
.xp-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 800;
  color: var(--success);
  text-shadow: 0 4px 20px rgba(34, 197, 94, 0.5);
  z-index: 10000;
  pointer-events: none;
  animation: xpPopup 1.5s ease-out forwards;
}

@keyframes xpPopup {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  40% {
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(0.8);
  }
}

/* Combo Animation */
.combo-popup {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  font-weight: 700;
  color: #f59e0b;
  text-shadow: 0 2px 10px rgba(245, 158, 11, 0.5);
  z-index: 10000;
  pointer-events: none;
  animation: comboPopup 0.8s ease-out forwards;
}

@keyframes comboPopup {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.5) rotate(-10deg);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.3) rotate(5deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-50px) scale(0.8);
  }
}

/* Premium Badge Glow */
.premium-badge, .user-premium {
  animation: premiumGlow 2s ease-in-out infinite;
}

@keyframes premiumGlow {
  0%, 100% { 
    filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.5));
  }
  50% { 
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.8));
  }
}

/* Streak Fire Animation */
.streak-icon.on-fire {
  animation: fireGlow 0.5s ease-in-out infinite alternate;
}

@keyframes fireGlow {
  from { 
    filter: drop-shadow(0 0 5px #f97316);
    transform: scale(1);
  }
  to { 
    filter: drop-shadow(0 0 15px #ef4444);
    transform: scale(1.1);
  }
}

/* Achievement Unlock Animation */
.achievement-unlocked {
  animation: achievementPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes achievementPop {
  0% { transform: scale(0) rotate(-180deg); }
  60% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

/* Level Up Animation */
.level-up-animation {
  animation: levelUp 1s ease-out;
}

@keyframes levelUp {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

/* Button Hover Glow */
.btn-primary:hover {
  box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Card Shine Effect on Hover */
.home-card::after,
.quiz-card::after,
.minigame-card::after,
.xp-boost-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg) translateY(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}

.home-card:hover::after,
.quiz-card:hover::after,
.minigame-card:hover::after,
.xp-boost-card:hover::after {
  transform: rotate(45deg) translateY(100%);
}

.home-card, .quiz-card, .minigame-card, .xp-boost-card {
  position: relative;
  overflow: hidden;
}

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* Success Checkmark Animation */
.success-check {
  animation: successCheck 0.5s ease-out;
}

@keyframes successCheck {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Error Shake Animation */
.error-shake {
  animation: shake 0.5s ease-out;
}

/* Confetti Animation */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--primary);
  pointer-events: none;
  z-index: 10000;
  animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(-100vh) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg);
  }
}

/* Boss Battle Timer Warning */
.battle-timer.warning {
  animation: timerWarning 0.5s ease-in-out infinite;
}

@keyframes timerWarning {
  0%, 100% { color: #f59e0b; transform: scale(1); }
  50% { color: #ef4444; transform: scale(1.1); }
}

/* Mini Game Card Hover */
.minigame-card.featured:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

/* Progress Bar Animation */
.progress-fill {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stat Counter Animation */
.stat-value-animated {
  transition: all 0.3s ease-out;
}

/* Toast Slide In */
.toast {
  animation: toastSlideIn 0.3s ease-out, toastSlideOut 0.3s ease-in 3.7s forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Premium Upsell Pulse */
.premium-upsell {
  animation: upsellPulse 2s ease-in-out infinite;
}

@keyframes upsellPulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
  }
}

/* GCSE Countdown Urgent */
.gcse-countdown.urgent {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #ef4444;
  animation: urgentPulse 1s ease-in-out infinite;
}

[data-theme="dark"] .gcse-countdown.urgent {
  background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
}

@keyframes urgentPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* Leaderboard Crown Animation */
.weekly-leader-badge {
  animation: crownBounce 1s ease-in-out infinite;
}

@keyframes crownBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-3px) rotate(5deg); }
}

/* Quiz Option Feedback */
.option-btn.correct {
  animation: correctPop 0.3s ease-out;
}

.option-btn.incorrect {
  animation: incorrectShake 0.3s ease-out;
}

@keyframes correctPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes incorrectShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

/* Smooth Number Transitions */
.animated-number {
  display: inline-block;
  transition: transform 0.3s ease-out;
}

.animated-number.changing {
  transform: scale(1.2);
  color: var(--success);
}

/* Premium Feature Card Highlight */
.pricing-card.premium {
  position: relative;
  overflow: hidden;
}

.pricing-card.premium::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(139, 92, 246, 0.1) 50%,
    transparent 70%
  );
  animation: premiumShine 3s ease-in-out infinite;
}

@keyframes premiumShine {
  0% { transform: translateX(-100%) rotate(0deg); }
  100% { transform: translateX(100%) rotate(0deg); }
}

/* Boss Battle Overlay */
.boss-battle-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.boss-battle-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: battleContainerSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes battleContainerSlide {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Speed Round Mini Game */
.minigame-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayFadeIn 0.3s ease-out;
}

.minigame-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.minigame-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.minigame-timer {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.minigame-timer.danger {
  color: #ef4444;
  animation: timerWarning 0.5s ease-in-out infinite;
}

.minigame-score {
  font-size: 18px;
  font-weight: 600;
  color: var(--success);
}

.minigame-question {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minigame-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.minigame-option {
  padding: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.minigame-option:hover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
}

.minigame-option.correct {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--success);
}

.minigame-option.incorrect {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--error);
}

/* Results Modal Animation */
.results-modal {
  animation: resultsAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultsAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

/* Streak Counter */
.streak-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-radius: 20px;
  color: white;
  font-weight: 600;
}

.streak-display .streak-flame {
  animation: flameDance 0.3s ease-in-out infinite alternate;
}

@keyframes flameDance {
  from { transform: scale(1) rotate(-5deg); }
  to { transform: scale(1.1) rotate(5deg); }
}

/* Dashboard Stats Cards */
.stat-card {
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Premium Call-to-Action */
.premium-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #ec4899 100%);
  color: white;
  padding: 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.premium-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 60%
  );
  animation: ctaShine 2s linear infinite;
}

@keyframes ctaShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Days Until GCSE Counter */
.gcse-countdown {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 2px solid #3b82f6;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  text-align: center;
  margin-bottom: 20px;
}

[data-theme="dark"] .gcse-countdown {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
}

.gcse-countdown .days-number {
  font-size: 42px;
  font-weight: 800;
  color: #2563eb;
  line-height: 1;
}

[data-theme="dark"] .gcse-countdown .days-number {
  color: #60a5fa;
}

.gcse-countdown .days-label {
  font-size: 14px;
  color: #1e40af;
  font-weight: 500;
}

[data-theme="dark"] .gcse-countdown .days-label {
  color: #93c5fd;
}

/* ============================================
   Enhanced Premium/Pricing Styles
   ============================================ */

/* Value Proposition Stats */
.premium-value-prop {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border-radius: var(--radius-lg);
}

.value-stat {
  text-align: center;
}

.value-number {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.value-label {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 120px;
  display: block;
  margin-top: 4px;
}

/* Popular Badge */
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 20px;
  white-space: nowrap;
  animation: pulse 2s ease-in-out infinite;
}

.pricing-card.featured {
  position: relative;
  margin-top: 20px;
}

/* Price Savings */
.price-savings {
  font-size: 13px;
  color: var(--success);
  margin-bottom: 16px;
  font-weight: 500;
}

/* Feature Highlight */
.feature-highlight {
  background: rgba(139, 92, 246, 0.1);
  margin: 0 -16px;
  padding: 8px 16px;
  border-radius: 4px;
}

.feature-limited {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.7;
}

/* Premium CTA Button */
.premium-cta-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px;
}

.btn-text {
  font-size: 16px;
  font-weight: 700;
}

.btn-subtext {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

/* Trust Signals */
.premium-trust {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  padding: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Alternatives Intro */
.alternatives-intro {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Alternative Card Bonus */
.alt-bonus {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 8px;
  border-radius: 10px;
}

/* GCSE Countdown Enhancement */
.gcse-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.countdown-content {
  text-align: center;
}

.countdown-message {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Mobile Responsive for Pricing */
@media (max-width: 768px) {
  .premium-value-prop {
    flex-direction: column;
    gap: 20px;
  }
  
  .premium-trust {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  
  .gcse-countdown {
    flex-direction: column;
    gap: 8px;
  }
}

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

/* ============================================
   COMPREHENSIVE UI FIXES - January 2026
   ============================================ */

/* === 1. MINIGAME EXIT BUTTON === */
.minigame-exit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
}

.minigame-exit-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
}

/* === 2. FIX CUT-OFF TEXT (BADGES/LABELS) === */
.minigame-card.featured {
  overflow: visible !important;
  position: relative;
}

.minigame-badge {
  position: absolute;
  top: -10px;
  left: 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  z-index: 10;
}

.pricing-card.featured {
  overflow: visible !important;
  position: relative;
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* === 3. SMALLER LOGIN MODAL === */
.modal-content {
  padding: 24px !important;
  max-width: 380px !important;
}

.auth-logo-img {
  width: 60px !important;
  height: 60px !important;
  margin-bottom: 12px !important;
}

.auth-header {
  margin-bottom: 16px !important;
}

.auth-header h2 {
  font-size: 20px !important;
  margin-bottom: 4px !important;
}

.auth-header p {
  font-size: 13px !important;
}

.auth-tabs {
  margin-bottom: 16px !important;
}

.auth-tab {
  padding: 8px 16px !important;
  font-size: 13px !important;
}

.form-group {
  margin-bottom: 12px !important;
}

.form-group label {
  font-size: 12px !important;
  margin-bottom: 4px !important;
}

.form-group input {
  padding: 10px 12px !important;
  font-size: 14px !important;
}

.auth-form .btn {
  padding: 10px !important;
  font-size: 14px !important;
  margin-top: 8px !important;
}

.auth-divider {
  margin: 12px 0 !important;
  font-size: 12px !important;
}

.google-btn {
  padding: 10px !important;
  font-size: 13px !important;
}

.auth-footer {
  margin-top: 12px !important;
  font-size: 10px !important;
}

/* === 4. SMALLER GCSE COUNTDOWN === */
.gcse-countdown {
  padding: 10px 16px !important;
  margin-bottom: 12px !important;
  display: inline-flex !important;
  gap: 12px !important;
  border-radius: var(--radius-md) !important;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
  border: 1px solid #7dd3fc !important;
}

[data-theme="dark"] .gcse-countdown {
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%) !important;
  border-color: #0284c7 !important;
}

.gcse-countdown .days-number {
  font-size: 24px !important;
  font-weight: 700 !important;
}

.gcse-countdown .days-label {
  font-size: 11px !important;
}

.countdown-message {
  font-size: 12px !important;
  display: none !important;
}

/* === 5. IMPROVED MINIGAMES STYLING === */
.minigames-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.minigame-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.minigame-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.minigame-card.featured {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: #f59e0b;
  padding: 24px;
}

.minigame-icon {
  font-size: 40px;
  margin-bottom: 4px;
}

.minigame-info h3,
.minigame-info h4 {
  margin: 0 0 6px 0;
  font-weight: 700;
}

.minigame-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.minigame-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reward-tag {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.minigame-action {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.minigame-stats {
  font-size: 12px;
  color: var(--text-secondary);
}

.minigame-leaderboard-reminder {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.minigame-leaderboard-reminder .reminder-icon {
  font-size: 40px;
}

.minigame-leaderboard-reminder .reminder-text h4 {
  margin: 0 0 4px 0;
  color: var(--primary);
}

.minigame-leaderboard-reminder .reminder-text p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.minigame-leaderboard-reminder small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

/* === 6. MINIGAME OVERLAY IMPROVEMENTS === */
.minigame-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.97) 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.minigame-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 600px;
  width: 90%;
  position: relative;
  animation: scaleIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.minigame-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.minigame-timer {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.minigame-timer.urgent {
  color: #ef4444 !important;
  animation: timerPulse 0.5s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.minigame-score {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.minigame-question {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
  color: var(--text);
}

.minigame-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.minigame-option {
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  color: var(--text);
}

.minigame-option:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.15);
  transform: scale(1.03);
  color: var(--text);
}

.minigame-option.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  color: white !important;
  transform: scale(1.05);
}

.minigame-option.incorrect {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
  color: white !important;
  transform: scale(0.97);
}

.minigame-quit {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px;
}

/* Dark mode minigame fixes */
.dark .minigame-container,
.dark .minigame-question,
.dark .minigame-option,
.dark .minigame-score,
.dark .minigame-timer,
.dark .crunch-question,
.dark .streak-display,
.dark .memory-card .card-back {
  color: var(--text);
}

.dark .minigame-option {
  background: var(--surface-elevated);
  border-color: var(--border);
}

.dark .minigame-option:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
}

.dark .crunch-input {
  background: var(--surface-elevated);
  color: var(--text);
  border-color: var(--border);
}

.dark .minigame-header {
  border-bottom-color: var(--border);
}

/* === 7. NUMBER CRUNCH INPUT FIX === */
.crunch-question {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
}

.crunch-input-wrapper {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.crunch-input {
  width: 180px;
  padding: 16px 20px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  border: 3px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  color: var(--text);
  transition: all 0.2s ease;
  -moz-appearance: textfield;
}

.crunch-input::-webkit-outer-spin-button,
.crunch-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.crunch-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.crunch-submit-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.crunch-submit-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* === 8. MEMORY MATCH IMPROVEMENTS === */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  perspective: 1000px;
  cursor: pointer;
}

.memory-card .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

.memory-card.flipped .card-inner,
.memory-card.matched .card-inner {
  transform: rotateY(180deg);
}

.memory-card .card-front,
.memory-card .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  padding: 8px;
  text-align: center;
  line-height: 1.2;
}

.memory-card .card-front {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  font-size: 28px;
}

.memory-card .card-back {
  background: var(--surface);
  border: 2px solid var(--primary);
  transform: rotateY(180deg);
  color: var(--text);
}

.memory-card.matched .card-back {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-color: #10b981;
}

/* === 9. XP SHOP IMPROVEMENTS === */
#xp-shop-view .view-header {
  margin-bottom: 24px;
}

.shop-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
}

.shop-balance .balance-icon {
  font-size: 20px;
}

.shop-balance .balance-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.xp-boost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.xp-boost-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.xp-boost-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.xp-boost-card.affordable {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.xp-boost-card.locked {
  opacity: 0.6;
}

.boost-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.boost-hours {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.boost-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.boost-cost {
  margin-bottom: 16px;
}

.boost-cost .cost-xp {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* === 10. BOSS BATTLE IMPROVEMENTS === */
.boss-battle-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boss-battle-container {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 700px;
  width: 95%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.battle-timer {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.battle-timer.urgent {
  color: #ef4444;
  animation: pulse 0.5s ease-in-out infinite;
}

.battle-progress {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.battle-combo {
  text-align: center;
}

.battle-combo .combo-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.battle-combo .combo-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.battle-combo .combo-value.active {
  color: #f59e0b;
}

.battle-combo .combo-value.fire {
  color: #ef4444;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.battle-score-bar {
  position: relative;
  height: 32px;
  background: var(--background);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}

.battle-score-bar .score-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #10b981 100%);
  transition: width 0.3s ease;
}

.battle-score-bar .score-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  z-index: 1;
}

.battle-question-area {
  margin-bottom: 20px;
}

.battle-question-area .question-text {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  min-height: 60px;
  line-height: 1.4;
}

.battle-question-area .question-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.battle-option {
  background: var(--background);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.battle-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.battle-option.correct {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border-color: #10b981 !important;
  color: white !important;
}

.battle-option.incorrect {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border-color: #ef4444 !important;
  color: white !important;
}

.battle-feedback {
  text-align: center;
  min-height: 40px;
}

.feedback-correct {
  color: #10b981;
  font-weight: 700;
  font-size: 16px;
}

.feedback-incorrect {
  color: #ef4444;
  font-weight: 600;
  font-size: 14px;
}

/* === 11. BOSS INTRO MODAL === */
.boss-battle-intro {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(8px) !important;
}

.boss-battle-intro .modal-content,
.boss-intro-content {
  max-width: 500px !important;
  padding: 32px !important;
  background: var(--surface) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-xl) !important;
  animation: bounce-in 0.3s ease !important;
}

.boss-intro-header {
  text-align: center;
  margin-bottom: 24px;
}

.boss-intro-header .boss-icon {
  font-size: 56px;
  display: block;
  margin-bottom: 12px;
}

.boss-intro-header h2 {
  margin: 0;
  font-size: 24px;
}

.boss-intro-body .battle-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.boss-intro-body .stat {
  text-align: center;
}

.boss-intro-body .stat-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.boss-intro-body .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.boss-intro-body .battle-rewards {
  background: var(--background);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.boss-intro-body .battle-rewards h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
}

.boss-intro-body .battle-rewards ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.boss-intro-body .battle-rewards li {
  margin-bottom: 4px;
}

.reduced-xp-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

.boss-intro-body .battle-tips {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.boss-intro-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* === 12. BOSS RESULTS MODAL === */
.boss-results-modal .modal-content {
  max-width: 450px !important;
  text-align: center;
}

.results-header {
  margin-bottom: 24px;
}

.results-header .results-icon {
  font-size: 64px;
  margin-bottom: 12px;
}

.results-header h2 {
  margin: 0;
}

.results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.results-stats .stat {
  background: var(--background);
  padding: 16px;
  border-radius: var(--radius-md);
}

.results-stats .stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.results-stats .stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.xp-earned-display {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 2px solid #10b981;
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.xp-total {
  font-size: 36px;
  font-weight: 800;
  color: #10b981;
}

.xp-breakdown {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.xp-breakdown .xp-line {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.daily-limit-notice {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid #f59e0b;
  color: #d97706;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 16px;
}

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* === 13. FIX SIGNUP POPUP BACKGROUND === */
.modal-overlay {
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
}

.modal-overlay .modal-content,
.boss-battle-intro .boss-intro-content,
.confirm-modal-overlay .confirm-modal {
  background: var(--surface) !important;
}

.modal-overlay .modal-content {
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.confirm-modal-overlay .confirm-modal {
  border: 1px solid var(--border);
}

/* === 14. DASHBOARD IMPROVEMENTS === */
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dashboard-header .greeting {
  flex: 1;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

/* === 15. STREAK DISPLAY IMPROVEMENTS === */
.streak-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #f59e0b;
}

/* === 16. AVATAR SELECTION IN SETTINGS === */
.avatar-selection {
  display: flex;
  align-items: center;
  gap: 16px;
}

.current-avatar-large {
  font-size: 48px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  flex: 1;
}

.avatar-option {
  font-size: 20px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.avatar-option:hover {
  border-color: var(--primary);
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* === 17. MOBILE RESPONSIVE FIXES === */
@media (max-width: 600px) {
  .modal-content {
    padding: 20px !important;
    max-width: 95% !important;
    margin: 10px;
  }
  
  .minigame-container {
    padding: 20px;
    width: 95%;
  }
  
  .minigame-options {
    grid-template-columns: 1fr;
  }
  
  .battle-question-area .question-options {
    grid-template-columns: 1fr;
  }
  
  .memory-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  
  .memory-card .card-back {
    font-size: 10px;
  }
  
  .boss-intro-body .battle-stats {
    gap: 16px;
  }
  
  .boss-intro-body .stat-value {
    font-size: 24px;
  }
  
  .crunch-question {
    font-size: 24px;
  }
  
  .crunch-input {
    width: 140px;
    font-size: 20px;
    padding: 12px 16px;
  }
  
  .gcse-countdown {
    padding: 8px 12px !important;
  }
  
  .gcse-countdown .days-number {
    font-size: 20px !important;
  }
}

/* ============================================
   COMPREHENSIVE SITE ENHANCEMENTS v2
   Modern Animations, Effects & Polish
   ============================================ */

/* === GLOBAL ANIMATIONS === */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 20px 10px rgba(99, 102, 241, 0.1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes bounce-in {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes rainbow-border {
  0% { border-color: #6366f1; }
  25% { border-color: #8b5cf6; }
  50% { border-color: #ec4899; }
  75% { border-color: #f59e0b; }
  100% { border-color: #6366f1; }
}

/* === ENHANCED LANDING PAGE === */
#landing {
  position: relative;
  overflow: hidden;
}

.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.1), transparent),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(16, 185, 129, 0.08), transparent);
}

.bg-particles .particle {
  position: absolute;
  border-radius: 50%;
  animation: float-slow 8s ease-in-out infinite;
}

.particle.p1 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%); top: 10%; left: 10%; animation-delay: 0s; }
.particle.p2 { width: 200px; height: 200px; background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%); top: 60%; right: 10%; animation-delay: 2s; }
.particle.p3 { width: 150px; height: 150px; background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%); bottom: 20%; left: 30%; animation-delay: 4s; }
.particle.p4 { width: 100px; height: 100px; background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%); top: 30%; right: 30%; animation-delay: 1s; }
.particle.p5 { width: 180px; height: 180px; background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%); top: 70%; left: 60%; animation-delay: 3s; }

/* Landing Header Enhancement */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.dark .landing-header {
  background: rgba(15, 23, 42, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-logo .logo-img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.landing-logo .logo-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 20px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-nav {
  display: flex;
  gap: 32px;
}

.landing-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
  position: relative;
}

.landing-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.landing-nav a:hover {
  color: var(--primary);
}

.landing-nav a:hover::after {
  width: 100%;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hero Section v2 */
.hero-v2 {
  min-height: 100vh;
  padding: 120px 32px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.hero-left {
  animation: slide-up-fade 0.8s ease-out;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 100px;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 24px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  animation: pulse-glow 3s infinite;
}

.pill-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.hero-h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-h1 span {
  display: block;
}

.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 30%, #ec4899 70%, #f59e0b 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 5s ease infinite;
}

.hero-p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn-xl {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-glow {
  position: relative;
  overflow: visible;
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--gradient-primary);
  border-radius: inherit;
  filter: blur(15px);
  opacity: 0.5;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.btn-glow:hover::before {
  opacity: 0.8;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-stack {
  display: flex;
}

.avatar-stack .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
  border: 3px solid var(--surface);
  margin-left: -10px;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.proof-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proof-text .stars {
  font-size: 14px;
  letter-spacing: 2px;
}

.proof-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Hero Right - Dashboard Preview */
.hero-right {
  animation: slide-in-right 0.8s ease-out 0.2s both;
}

.dashboard-preview {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: visible;
  animation: float 6s ease-in-out infinite;
}

.preview-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.chrome-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chrome-dots span:nth-child(1) { background: #EF4444; }
.chrome-dots span:nth-child(2) { background: #F59E0B; }
.chrome-dots span:nth-child(3) { background: #22C55E; }

.chrome-title {
  font-size: 12px;
  color: var(--text-muted);
}

.preview-body {
  padding: 20px;
}

.preview-welcome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--background);
  border-radius: 12px;
  margin-bottom: 16px;
}

.wave-emoji {
  font-size: 28px;
  animation: wiggle 2s infinite;
}

.preview-welcome > div {
  flex: 1;
}

.preview-welcome strong {
  display: block;
  font-size: 14px;
}

.preview-welcome span {
  font-size: 12px;
  color: var(--text-secondary);
}

.streak-pill {
  padding: 6px 12px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: #92400E;
}

.preview-progress {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
}

.progress-ring {
  position: relative;
  width: 60px;
  height: 60px;
}

.progress-ring svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.progress-ring span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.preview-cards-row {
  display: flex;
  gap: 12px;
}

.preview-mini-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
}

.preview-mini-card span {
  font-size: 20px;
}

.preview-mini-card div strong {
  display: block;
  font-size: 13px;
}

.preview-mini-card div small {
  font-size: 11px;
  color: var(--text-secondary);
}

.xp-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.quiz-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Floating Notifications */
.float-notif {
  position: absolute;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: bounce-in 0.5s ease-out both;
}

.fn-1 {
  top: -10px;
  right: -20px;
  animation-delay: 1s;
  border: 2px solid rgba(245, 158, 11, 0.3);
}

.fn-2 {
  bottom: 30%;
  left: -30px;
  animation-delay: 2s;
  border: 2px solid rgba(99, 102, 241, 0.3);
}

.fn-3 {
  bottom: -10px;
  right: 20%;
  animation-delay: 3s;
  border: 2px solid rgba(239, 68, 68, 0.3);
}

/* Hero Stats Strip */
.hero-stats-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  margin-top: 60px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.dark .hero-stats-strip {
  background: rgba(30, 41, 59, 0.6);
}

.stat-block {
  text-align: center;
}

.stat-val {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-lbl {
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* === ENHANCED VIEW CARDS & SECTIONS === */
.view {
  animation: slide-up-fade 0.4s ease-out;
}

/* Dashboard Enhancements */
#dashboard-view .quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quick-action-card {
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.quick-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.quick-action-card:hover::before {
  transform: scaleX(1);
}

/* Learn View Cards */
.topic-card-v2 {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.topic-card-v2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(99, 102, 241, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.topic-card-v2:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.topic-card-v2:hover::after {
  opacity: 1;
}

/* Leaderboard Enhancements */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.leaderboard-item:hover {
  transform: translateX(8px);
  border-color: var(--primary);
}

.leaderboard-item.rank-1 {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: #F59E0B;
}

.leaderboard-item.rank-2 {
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.1) 0%, rgba(107, 114, 128, 0.1) 100%);
  border-color: #9CA3AF;
}

.leaderboard-item.rank-3 {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(180, 83, 9, 0.1) 100%);
  border-color: #D97706;
}

.leaderboard-rank {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 50%;
  background: var(--background);
}

.rank-1 .leaderboard-rank { background: linear-gradient(135deg, #FCD34D, #F59E0B); color: white; }
.rank-2 .leaderboard-rank { background: linear-gradient(135deg, #D1D5DB, #9CA3AF); color: white; }
.rank-3 .leaderboard-rank { background: linear-gradient(135deg, #FBBF24, #D97706); color: white; }

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.achievement-card {
  padding: 24px 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.achievement-card.unlocked {
  border-color: var(--accent) !important;
  border-width: 3px !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.15) 100%) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3), inset 0 0 30px rgba(16, 185, 129, 0.1) !important;
}

.achievement-card:hover {
  transform: scale(1.05);
}

.achievement-icon {
  font-size: 48px;
  margin-bottom: 12px;
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.3s ease;
}

.achievement-card.unlocked .achievement-icon {
  filter: none;
  opacity: 1;
  animation: pop 0.5s ease;
}

/* === REDESIGNED ADMIN PANEL === */
#admin-view {
  max-width: 1400px;
  margin: 0 auto;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.admin-stat-card.premium::before {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
}

.admin-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.admin-stat-card .stat-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.admin-stat-card .stat-value {
  font-size: 42px;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat-card.premium .stat-value {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  -webkit-background-clip: text;
  background-clip: text;
}

.admin-stat-card .stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--background);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.admin-tab {
  flex: 1;
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab:hover {
  color: var(--text);
  background: var(--surface);
}

.admin-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Admin Panel */
.admin-panel {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--border);
}

.admin-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-search {
  flex: 1;
  min-width: 280px;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.admin-search:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.admin-filter {
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

/* Admin Users Table */
.admin-users-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-users-table th {
  padding: 16px;
  text-align: left;
  background: var(--background);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

.admin-users-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.admin-users-table tbody tr {
  transition: all 0.2s ease;
}

.admin-users-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

.admin-users-table .user-avatar {
  font-size: 20px;
  margin-right: 8px;
}

/* Admin User Modal - Redesigned */
.admin-user-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.admin-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
  animation: bounce-in 0.3s ease;
  box-shadow: var(--shadow-xl);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.admin-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.admin-modal-header .modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-modal-header .modal-close:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

.admin-modal-body {
  padding: 28px;
}

.admin-modal-body .form-group {
  margin-bottom: 20px;
}

.admin-modal-body label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.admin-modal-body input,
.admin-modal-body select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.admin-modal-body input:focus,
.admin-modal-body select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.admin-modal-body small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-actions .btn {
  flex: 1;
}

.danger-zone {
  margin-top: 24px;
  padding: 20px;
  background: rgba(239, 68, 68, 0.05);
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(239, 68, 68, 0.3);
}

.danger-zone h4 {
  margin: 0 0 16px 0;
  color: var(--error);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.danger-zone h4::before {
  content: '⚠️';
}

.danger-zone .form-group {
  display: flex;
  gap: 12px;
  margin: 0;
}

.danger-zone input {
  flex: 1;
}

/* === MINI GAMES IMPROVEMENTS === */
.minigames-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.minigame-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.minigame-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.minigame-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.minigame-card:hover::before {
  transform: scaleX(1);
}

.minigame-card.featured {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-color: var(--primary);
}

.minigame-card.featured::before {
  transform: scaleX(1);
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
}

.minigame-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.minigame-info h3,
.minigame-info h4 {
  margin-bottom: 8px;
}

.minigame-info p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.minigame-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.reward-tag {
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

/* === XP SHOP IMPROVEMENTS === */
.xp-boost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.xp-boost-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  border: 2px solid var(--border);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.xp-boost-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.xp-boost-card.affordable:hover {
  transform: translateY(-6px);
  border-color: transparent;
}

.xp-boost-card.affordable:hover::before {
  opacity: 1;
}

.boost-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.boost-hours {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.boost-cost {
  padding: 12px 20px;
  background: var(--background);
  border-radius: 100px;
  display: inline-block;
  margin-top: 16px;
}

.boost-cost .cost-xp {
  font-weight: 700;
  color: var(--primary);
}

/* === PREMIUM PAGE IMPROVEMENTS === */
.pricing-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 2px solid var(--border);
  width: 340px;
  transition: all 0.3s ease;
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  z-index: -1;
  animation: rainbow-border 4s linear infinite;
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: var(--gradient-primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 100px;
  white-space: nowrap;
}

/* Mobile Premium Page Fixes */
  .pricing-cards {
    flex-direction: column;
    align-items: center;
  }
  
  .pricing-card {
    width: 100%;
    max-width: 350px;
    padding: 24px;
  }
  
  .pricing-card.featured {
    transform: none;
  }
  
  .premium-value-prop {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  
  .premium-alternatives {
    padding: 16px;
  }
  
  .alternatives-grid {
    grid-template-columns: 1fr;
  }
  
  .premium-trust {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .price-features li {
    font-size: 13px;
    padding: 8px 0;
  }
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */

#admin-view {
  padding-bottom: 40px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.admin-stat-card.premium {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.admin-stat-card .stat-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.admin-stat-card .stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.admin-stat-card .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}

.admin-tab {
  padding: 10px 20px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-tab:hover {
  border-color: var(--primary);
}

.admin-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Admin Panels */
.admin-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
}

.admin-panel.hidden {
  display: none;
}

/* Admin Toolbar */
.admin-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
}

.admin-filter {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
}

/* Admin Users Table */
.admin-users-table-wrapper {
  overflow-x: auto;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-users-table th,
.admin-users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-users-table th {
  background: var(--background);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-users-table tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.admin-users-table .user-avatar {
  margin-right: 8px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.badge.premium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.badge.free {
  background: var(--background);
  color: var(--text-secondary);
}

.badge.verified {
  color: #10b981;
}

.badge.unverified {
  color: #ef4444;
}

/* Admin Pagination */
.admin-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Admin User Modal */
.admin-user-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-user-modal.hidden {
  display: none;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.admin-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.admin-modal-header h3 {
  margin: 0;
}

.admin-modal-body .form-group {
  margin-bottom: 16px;
}

.admin-modal-body label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 13px;
}

.admin-modal-body input,
.admin-modal-body select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
}

.admin-modal-body small {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.danger-zone {
  background: rgba(239, 68, 68, 0.1);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.danger-zone h4 {
  margin: 0 0 12px 0;
  color: #ef4444;
}

.danger-zone .form-group {
  display: flex;
  gap: 8px;
  margin: 0;
}

.danger-zone input {
  flex: 1;
}

/* Signup Items */
.signup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.signup-item:last-child {
  border-bottom: none;
}

.signup-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.signup-username {
  font-weight: 600;
}

.signup-email {
  font-size: 12px;
  color: var(--text-secondary);
}

.signup-badges {
  display: flex;
  gap: 6px;
}

.signup-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* Button sizes */
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-warning {
  background: #f59e0b;
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

/* Admin Messages in Panel */
#admin-inbox-panel .admin-message-item {
  background: var(--background);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}

#admin-inbox-panel .admin-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#admin-inbox-panel .user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#admin-inbox-panel .username {
  font-weight: 600;
}

#admin-inbox-panel .email {
  font-size: 12px;
  color: var(--text-secondary);
}

#admin-inbox-panel .message-status {
  font-size: 12px;
  font-weight: 500;
}

#admin-inbox-panel .message-status.pending {
  color: #f59e0b;
}

#admin-inbox-panel .message-status.replied {
  color: #10b981;
}

#admin-inbox-panel .admin-message-subject {
  font-weight: 600;
  margin-bottom: 8px;
}

#admin-inbox-panel .admin-message-content {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

#admin-inbox-panel .admin-reply-sent {
  background: rgba(16, 185, 129, 0.1);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

#admin-inbox-panel .admin-reply-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 8px;
  resize: vertical;
}

#admin-inbox-panel .message-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* No data state */
.no-data {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

/* Mobile admin fixes */
@media (max-width: 768px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .admin-tabs {
    flex-wrap: wrap;
  }
  
  .admin-tab {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .admin-toolbar {
    flex-direction: column;
  }
  
  .admin-search {
    width: 100%;
  }
  
  .admin-users-table {
    font-size: 12px;
  }
  
  .admin-users-table th,
  .admin-users-table td {
    padding: 8px 6px;
  }
  
  .admin-modal-content {
    padding: 16px;
  }
  
  .signup-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   COMPREHENSIVE UI/UX POLISH - March 2026
   Professional-grade visual refinement
   ============================================ */

/* === GLOBAL SPACING & CONSISTENCY === */
.views-container {
  padding: 28px 32px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* === SIDEBAR POLISH === */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 8px rgba(0, 0, 0, 0.03);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-brand {
  padding: 20px 20px 16px;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.level-display {
  padding: 16px 20px;
  margin: 0 12px;
  border-radius: var(--radius-md);
  border-bottom: none;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.06) 100%);
  margin-bottom: 8px;
}

.level-badge {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.25);
}

.level-num {
  font-size: 18px;
}

.level-progress {
  height: 7px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.level-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.level-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmerProgress 2s infinite;
}

@keyframes shimmerProgress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.sidebar-nav {
  padding: 8px 12px;
  gap: 2px;
}

.nav-item {
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-item:hover {
  background: rgba(99, 102, 241, 0.06);
  color: var(--primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  transition: transform 0.2s ease;
}

.nav-section-label {
  padding: 16px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.premium-star {
  font-size: 12px;
  margin-left: auto;
  opacity: 0.7;
}

.sidebar-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-footer .nav-item {
  padding: 10px 16px;
}

/* === HEADER POLISH === */
.header {
  height: 64px;
  padding: 0 28px;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.dark .header {
  background: rgba(30, 41, 59, 0.85);
  border-bottom-color: rgba(51, 65, 85, 0.8);
}

.search-box {
  width: 280px;
}

.search-box input {
  padding: 9px 16px 9px 40px;
  border-radius: 10px;
  font-size: 13.5px;
  background: var(--background);
}

.streak-badge {
  padding: 7px 14px;
  font-size: 13px;
  gap: 5px;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.streak-badge:hover {
  transform: scale(1.05);
}

.xp-badge {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.xp-badge:hover {
  transform: scale(1.05);
}

.user-avatar {
  width: 38px;
  height: 38px;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  padding: 6px;
  z-index: 200;
  animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item:hover {
  background: var(--background);
}

/* === DASHBOARD GREETING POLISH === */
.dashboard-greeting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  border-radius: 20px;
  color: white;
  position: relative;
  overflow: hidden;
}

.dashboard-greeting::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-greeting::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.greeting-text h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.greeting-text p {
  opacity: 0.9;
  font-size: 15px;
}

.streak-highlight {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.2s ease;
}

.streak-highlight:hover {
  transform: scale(1.03);
}

.streak-flame-big {
  font-size: 32px;
}

.streak-number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.streak-label-text {
  font-size: 11px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* === DAILY PROGRESS SECTION POLISH === */
.daily-progress-section {
  background: var(--surface);
  padding: 18px 22px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.daily-progress-section:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.daily-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.daily-header span:last-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.daily-bar {
  height: 10px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
  overflow: hidden;
}

.daily-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* === GCSE COUNTDOWN POLISH === */
.gcse-countdown {
  padding: 14px 20px !important;
  margin-bottom: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 14px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
  border: 1px solid rgba(125, 211, 252, 0.5) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: auto;
}

.gcse-countdown:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.12);
}

.dark .gcse-countdown {
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.5) 0%, rgba(7, 89, 133, 0.5) 100%) !important;
  border-color: rgba(2, 132, 199, 0.4) !important;
}

.gcse-countdown .days-number {
  font-size: 26px !important;
  font-weight: 800 !important;
  color: #0369a1;
  font-family: 'Poppins', sans-serif;
}

.dark .gcse-countdown .days-number {
  color: #7dd3fc;
}

.gcse-countdown .days-label {
  font-size: 12px !important;
  font-weight: 500;
  color: #0c4a6e;
}

.dark .gcse-countdown .days-label {
  color: #bae6fd;
}

/* === GUIDED REVISION SECTION POLISH === */
.guided-revision-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-bottom: 24px;
}

.next-step-card {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
  border-radius: 18px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.next-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.25);
}

.next-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.next-step-badge {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(4px);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.next-step-time {
  font-size: 12px;
  opacity: 0.8;
  background: rgba(255,255,255,0.12);
  padding: 3px 10px;
  border-radius: 12px;
}

.next-step-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.next-step-reason {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 18px;
  line-height: 1.5;
}

.next-step-btn {
  background: white;
  color: #6366f1;
  border: none;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.next-step-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.sprint-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.sprint-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.sprint-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.sprint-content {
  flex: 1;
}

.sprint-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sprint-content p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.sprint-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 10px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
  width: 100%;
}

.sprint-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(99, 102, 241, 0.4);
}

/* === STUDY TOPICS GRID POLISH === */
.study-today-section {
  margin-bottom: 28px;
}

.study-today-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.section-subtitle {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 14px;
}

.study-topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

.study-topic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.study-topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  border-color: var(--primary);
}

.study-topic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--topic-color, var(--primary));
  border-radius: 3px 3px 0 0;
}

.topic-card-icon {
  font-size: 30px;
  margin-bottom: 10px;
}

.topic-card-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text);
}

.topic-card-progress {
  font-size: 12px;
  color: var(--text-secondary);
}

.topic-card-bar {
  height: 4px;
  background: var(--background);
  border-radius: 4px;
  margin-top: 10px;
  overflow: hidden;
}

/* === QUICK ACTIONS POLISH === */
.quick-actions-section {
  margin-bottom: 28px;
}

.quick-actions-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  min-height: 68px;
}

.quick-action-card:hover {
  border-color: var(--primary);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.qa-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  background: var(--background);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.quick-action-card:hover .qa-icon {
  transform: scale(1.08);
}

.qa-text h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.qa-text p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.qa-arrow {
  margin-left: auto;
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-action-card:hover .qa-arrow {
  transform: translateX(3px);
  color: var(--primary);
}

/* === STATS ROW POLISH === */
.stats-row-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card-new {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.stat-card-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.stat-icon {
  font-size: 22px;
  width: 42px;
  height: 42px;
  background: var(--background);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* === HOME GRID POLISH === */
.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.home-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.home-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.home-card h3 {
  font-size: 15px;
  margin-bottom: 14px;
}

.achievements-card {
  grid-column: span 1;
}

.ai-card {
  grid-column: span 1;
}

.reminders-card {
  grid-column: span 2;
}

/* === ONLINE COUNTER POLISH === */
.online-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulseDot 2s infinite;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
  50% { opacity: 0.6; box-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }
}

/* === MODAL SYSTEM OVERHAUL === */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: modalFadeIn 0.25s ease;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  background: var(--surface);
  border-radius: 20px;
  padding: 28px !important;
  max-width: 400px !important;
  width: 92%;
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--background);
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text);
  transform: rotate(90deg);
}

/* Custom confirm modal (replaces browser confirm()) */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: modalFadeIn 0.2s ease;
}

.confirm-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  animation: modalScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.confirm-modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.confirm-modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-modal p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
}

.confirm-modal-actions .btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
}

/* === CARD & COMPONENT CONSISTENCY === */
.view-header {
  margin-bottom: 24px;
}

.view-header h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* === PRACTICE VIEW POLISH === */
.practice-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--background);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.practice-tab {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.practice-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.practice-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(99, 102, 241, 0.05);
}

/* === QUIZ CARD POLISH === */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--primary);
}

/* === ACHIEVEMENT CARDS POLISH === */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.achievement-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.achievement-card.locked {
  opacity: 0.45;
}

.achievement-icon {
  font-size: 44px;
  margin-bottom: 10px;
}

/* === LEADERBOARD POLISH === */
.leaderboard-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.leaderboard-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 4px;
  background: var(--background);
}

.lb-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 4px;
}

.lb-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-bottom: none;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 6px;
  transition: transform 0.15s ease;
}

.leaderboard-item:hover {
  transform: translateX(4px);
}

.leaderboard-item:nth-child(1) {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.8) 0%, rgba(253, 230, 138, 0.6) 100%);
}

.leaderboard-item:nth-child(2) {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.6) 0%, rgba(209, 213, 219, 0.4) 100%);
}

.leaderboard-item:nth-child(3) {
  background: linear-gradient(135deg, rgba(254, 215, 170, 0.6) 0%, rgba(253, 186, 116, 0.4) 100%);
}

/* === LESSON VIEW POLISH === */
.lesson-container {
  max-width: 760px;
  margin: 0 auto;
}

.lesson-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.lesson-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--background);
  border-radius: 6px;
  overflow: hidden;
  min-width: 120px;
}

.lesson-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.lesson-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 24px;
  min-height: 300px;
  line-height: 1.7;
  font-size: 15px;
}

.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* === FLASHCARD POLISH === */
.flashcard-view {
  max-width: 560px;
  margin: 0 auto;
}

.flashcard {
  width: 100%;
  height: 280px;
  cursor: pointer;
}

.flashcard-front, .flashcard-back {
  border-radius: 20px;
  padding: 28px;
  font-size: 19px;
}

.flashcard-front {
  background: var(--gradient-primary);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
}

.flashcard-back {
  background: var(--surface);
  border: 2px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* === PRICING CARDS POLISH === */
.pricing-cards {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.pricing-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 36px;
  border: 1px solid var(--border);
  width: 320px;
  text-align: center;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
  transform: scale(1.03);
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-4px);
}

/* === TOAST POLISH === */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  font-size: 14px;
  font-weight: 500;
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 260px;
  max-width: 400px;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.warning {
  border-left: 4px solid #f59e0b;
}

.toast.info {
  border-left: 4px solid #6366f1;
}

/* === LANDING PAGE HERO POLISH === */
.hero-v2 {
  padding: 120px 40px 80px;
}

.hero-grid {
  gap: 48px;
}

.hero-h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero-p {
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-btns {
  gap: 14px;
  margin-bottom: 36px;
}

.hero-btns .btn-xl {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 14px;
  font-weight: 700;
}

.hero-btns .btn-outline {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 14px;
  font-weight: 600;
}

/* Dashboard preview floating */
.dashboard-preview {
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.18), 0 8px 32px rgba(0,0,0,0.08);
}

/* === LANDING SECTIONS POLISH === */
.landing-header {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.landing-nav a {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.landing-nav a:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
}

/* === XP SHOP POLISH === */
.xp-boost-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.xp-boost-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.xp-boost-card.affordable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--primary);
}

.xp-boost-card.locked {
  opacity: 0.6;
}

.boost-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.boost-hours {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.boost-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.boost-cost {
  margin-bottom: 14px;
}

.cost-xp {
  font-weight: 700;
  color: var(--primary);
  font-size: 16px;
}

/* === REVI MASCOT STYLES === */
.revi-mascot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  margin: 12px 0;
  animation: reviFadeIn 0.5s ease;
}

@keyframes reviFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.revi-avatar {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  animation: reviBounce 3s ease-in-out infinite;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
}

.revi-avatar-emoji {
  font-size: 36px;
  flex-shrink: 0;
  animation: reviBounce 3s ease-in-out infinite;
}

@keyframes reviBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.revi-message {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.revi-message strong {
  color: var(--primary);
  font-weight: 600;
}

.revi-tip {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(52, 211, 153, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 16px;
  margin: 16px 0;
}

.revi-tip .revi-avatar {
  width: 36px;
  height: 36px;
  animation: none;
}

.revi-tip .revi-message {
  font-size: 13px;
}

/* Empty state with mascot */
.empty-state-revi {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-secondary);
}

.empty-state-revi .revi-avatar {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 14px;
}

.empty-state-revi h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text);
}

.empty-state-revi p {
  font-size: 14px;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.5;
}

/* === SCROLLBAR STYLING === */
.main-content {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.main-content::-webkit-scrollbar {
  width: 6px;
}

.main-content::-webkit-scrollbar-track {
  background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* === SMOOTH TRANSITIONS FOR ALL INTERACTIVE ELEMENTS === */
a, button, input, select, textarea {
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* === RESPONSIVE IMPROVEMENTS === */
@media (max-width: 1024px) {
  .views-container {
    padding: 24px 20px 40px;
  }
  
  .stats-row-section {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .home-grid {
    grid-template-columns: 1fr;
  }
  
  .guided-revision-section {
    grid-template-columns: 1fr;
  }
  
  .xp-boost-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .views-container {
    padding: 16px 14px 32px;
  }
  
  .dashboard-greeting {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 22px;
    border-radius: 16px;
  }
  
  .greeting-text h1 {
    font-size: 22px;
  }
  
  .streak-highlight {
    width: 100%;
    justify-content: center;
  }
  
  .study-topics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-row-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .stat-card-new {
    padding: 12px;
  }
  
  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .stat-value {
    font-size: 17px;
  }
  
  .hero-h1 {
    font-size: 36px;
    letter-spacing: -1px;
  }
  
  .hero-p {
    font-size: 15px;
  }
  
  .hero-btns .btn-xl,
  .hero-btns .btn-outline {
    padding: 14px 28px;
    font-size: 15px;
    width: 100%;
    justify-content: center;
  }
  
  .xp-boost-grid {
    grid-template-columns: 1fr;
  }
  
  .header {
    padding: 0 14px;
    height: 56px;
  }
  
  .search-box {
    display: none;
  }
  
  .streak-badge .streak-label,
  .xp-badge .xp-label {
    display: none;
  }
  
  .pricing-cards {
    flex-direction: column;
    align-items: center;
  }
  
  .pricing-card {
    width: 100%;
    max-width: 380px;
  }
  
  .pricing-card.featured {
    transform: none;
  }
  
  .lesson-content {
    padding: 20px;
    border-radius: 14px;
  }
  
  .confirm-modal {
    padding: 22px;
    margin: 16px;
  }
}

@media (max-width: 480px) {
  .study-topics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .study-topic-card {
    padding: 14px;
  }
  
  .topic-card-icon {
    font-size: 26px;
    margin-bottom: 8px;
  }
  
  .topic-card-name {
    font-size: 13px;
  }
  
  .stats-row-section {
    grid-template-columns: 1fr 1fr;
  }
  
  .next-step-card {
    padding: 18px;
  }
  
  .next-step-title {
    font-size: 15px;
  }
  
  .sprint-card {
    padding: 16px;
  }
}

/* === INTERACTIVE LESSON PRACTICE SECTIONS === */
.practice-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 20px 0;
}

.practice-section-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.practice-question {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.practice-question:last-child {
  margin-bottom: 0;
}

.practice-q-text {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
}

.practice-reveal-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.practice-reveal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

.practice-answer {
  display: none;
  margin-top: 12px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(52, 211, 153, 0.06) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  animation: revealSlide 0.3s ease;
}

.practice-answer.visible {
  display: block;
}

@keyframes revealSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.practice-answer .step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.practice-answer .step-num {
  background: var(--primary);
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.practice-answer .final-answer {
  font-weight: 700;
  color: var(--primary);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.worked-example {
  background: var(--surface);
  border: 2px solid rgba(16, 185, 129, 0.2);
  border-radius: 14px;
  padding: 20px;
  margin: 16px 0;
}

.worked-example-title {
  font-weight: 700;
  font-size: 14px;
  color: #10b981;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.worked-step {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.worked-step-num {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.worked-step-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

.worked-step-content .math {
  font-family: 'Poppins', monospace;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin: 2px 0;
}

.exam-mark-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  margin-left: 8px;
}

/* === REVI ON LANDING PAGE === */
.hero-revi-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 16px;
  margin-bottom: 28px;
  animation: reviFadeIn 0.8s ease 0.5s backwards;
}

.hero-revi-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: contain;
  animation: reviBounce 3s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-revi-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-revi-text strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.hero-revi-text span {
  font-size: 13px;
  color: var(--text-secondary);
}

.dark .hero-revi-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
  border-color: rgba(99, 102, 241, 0.25);
}

/* === REVI IN SIDEBAR === */
.sidebar-revi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 4px 12px 4px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(251, 191, 36, 0.06) 100%);
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  cursor: default;
  transition: background 0.3s ease;
}

.sidebar-revi:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
}

.sidebar-revi-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  animation: reviBounce 4s ease-in-out infinite;
  flex-shrink: 0;
}

.sidebar-revi-tip {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
}

/* === REVI IN LEVEL UP === */
.level-up-revi {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: contain;
  margin-bottom: 8px;
  animation: reviBounce 2s ease-in-out infinite;
}

.level-up-revi-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 12px;
}

/* === RESPONSIVE REVI === */
@media (max-width: 768px) {
  .hero-revi-banner {
    padding: 12px 16px;
  }
  
  .hero-revi-img {
    width: 44px;
    height: 44px;
  }
  
  .hero-revi-text strong {
    font-size: 14px;
  }
  
  .hero-revi-text span {
    font-size: 12px;
  }
  
  .sidebar-revi {
    margin: 4px 8px;
    padding: 8px 12px;
  }
  
  .sidebar-revi-img {
    width: 28px;
    height: 28px;
  }
}

/* === SELECTION COLOR === */
::selection {
  background: rgba(99, 102, 241, 0.2);
  color: var(--text);
}

/* === FOCUS-VISIBLE FOR ACCESSIBILITY === */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
