/* ============================================
   ReviseEasy - Modern GCSE Maths Revision
   Gamified Learning Experience
   ============================================ */

: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);
}

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

.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-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.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
   ============================================ */
.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%;
}

/* ============================================
   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 {
  padding: 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-md);
  color: var(--error);
  font-size: 14px;
  text-align: center;
}

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

/* ============================================
   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);
  }
  
  .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;
  }
}
