:root {
  --primary: #6366F1;
  --primary-dark: #4F46E5;
  --primary-light: #818CF8;
  --secondary: #10B981;
  --secondary-dark: #059669;
  --accent: #F59E0B;
  --accent-pink: #EC4899;
  --correct: #10B981;
  --wrong: #EF4444;
  --bg: #F8FAFC;
  --bg-dark: #F1F5F9;
  --card: #FFFFFF;
  --text: #1E293B;
  --text-light: #64748B;
  --text-lighter: #94A3B8;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-md: rgba(0, 0, 0, 0.12);
  --shadow-lg: rgba(0, 0, 0, 0.18);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --gold: #FFD700;
  --silver: #C0C0C0;
  --bronze: #CD7F32;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

.screen-overlay,
.section,
.modal {
  will-change: opacity;
}

.answer-option,
.power-up,
.nav-btn,
.btn-primary,
.btn-secondary {
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== HOME SECTION ========== */
.home-section {
  padding: 0 !important;
  min-height: 100vh;
  background: var(--bg);
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 10;
  position: relative;
  padding: 40px 20px;
}

.hero-logo-large {
  width: 150px;
  height: 150px;
  margin: 0 auto 30px;
  position: relative;
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.logo-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: logoRingSpin 10s linear infinite;
}

@keyframes logoRingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.logo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: 900;
  color: #667eea;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hero-title {
  font-size: 64px;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease;
}

.gradient-text {
  background: linear-gradient(135deg, #FFD700, #FFA500, #FF69B4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 22px;
  margin-bottom: 40px;
  opacity: 0.95;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-hero {
  padding: 20px 50px;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 50px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(67, 233, 123, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-start-learning::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.btn-start-learning:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(67, 233, 123, 0.5);
  background: linear-gradient(135deg, #38f9d7 0%, #43e97b 100%);
}

.btn-start-learning:hover::before {
  left: 100%;
}

.btn-start-learning:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(67, 233, 123, 0.4);
}

.quiz-game-container {
  max-width: 900px;
  margin: 0 auto;
}

.quiz-home {
  min-height: calc(100vh - 155px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-home-content {
  text-align: center;
  background: white;
  padding: 60px 40px;
  border-radius: 24px;
  box-shadow: 0 10px 40px var(--shadow);
}

.quiz-logo {
  font-size: 80px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.quiz-home-content h1 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 15px;
}

.quiz-home-content p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 40px;
}

.quiz-home-options {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  padding: 18px 40px;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 3px solid var(--primary);
  box-shadow: 0 8px 25px var(--shadow);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
}

.btn-large {
  min-width: 200px;
  padding: 20px 50px;
  font-size: 20px;
}

.btn-icon {
  font-size: 24px;
}

.modal {
  display: none;
  margin-top: 40px;
}

.modal.active {
  display: block;
  animation: slideUp 0.2s ease;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--shadow);
  max-width: 400px;
  margin: 0 auto;
}

.modal-content h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
}

.pin-input {
  width: 100%;
  padding: 20px;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 8px;
  font-family: 'Nunito', sans-serif;
  margin-bottom: 20px;
}

.pin-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modal-actions {
  display: flex;
  gap: 15px;
}

.error-text {
  color: var(--wrong);
  font-weight: 700;
  text-align: center;
  margin-top: 15px;
  display: none;
}

.error-text.active {
  display: block;
}

.game-lobby {
  display: none;
  min-height: calc(100vh - 155px);
}

.game-lobby.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.back-btn {
  padding: 12px 24px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  margin-bottom: 20px;
  display: inline-block;
}

.back-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateX(-5px);
}

.lobby-content {
  background: white;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 10px 40px var(--shadow);
  text-align: center;
}

.lobby-content h2 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 20px;
}

.game-pin-display {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: var(--bg);
  padding: 20px 40px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 30px;
}

.pin-code {
  font-size: 40px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 6px;
}

.host-join {
  margin-bottom: 30px;
}

.host-join h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--primary);
}

.host-join input {
  width: 100%;
  max-width: 400px;
  padding: 18px 24px;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  margin-bottom: 20px;
}

.host-join input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.players-waiting {
  animation: slideUp 0.3s ease;
}

.host-info {
  background: var(--gradient-primary);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 30px;
}

.host-info h3 {
  font-size: 20px;
  font-weight: 800;
  color: white;
  margin: 0;
}

.players-section {
  background: var(--bg);
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 30px;
}

.players-section h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  min-height: 80px;
}

.player-card {
  background: white;
  padding: 15px;
  border-radius: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px var(--shadow);
  animation: slideUp 0.2s ease;
  position: relative;
}

.player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
}

.player-name {
  flex: 1;
}

.btn-kick {
  padding: 5px 10px;
  background: var(--wrong);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
}

.btn-kick:hover {
  background: #C0392B;
  transform: scale(1.05);
}

.btn-start-game {
  padding: 20px 60px;
  background: var(--gradient-success);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 10px 30px rgba(67, 233, 123, 0.3);
}

.btn-start-game:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(67, 233, 123, 0.4);
}

.achievements-section {
  background: white;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 6px 25px var(--shadow);
  margin-bottom: 40px;
}

.section-title-small {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 30px;
  text-align: center;
}

.achievements-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.achievement-difficulty-section {
  margin-bottom: 0;
}

.achievement-difficulty-section:last-child {
  margin-bottom: 0;
}

.achievement-difficulty-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 4px solid currentColor;
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievements-difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.achievement-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 3px solid #e2e8f0;
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-difficulty-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.achievement-difficulty-badge.easy {
  background: linear-gradient(135deg, #10B981, #059669);
}

.achievement-difficulty-badge.hard {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.achievement-difficulty-badge.impossible {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  animation: impossibleGlow 2s ease-in-out infinite;
}

@keyframes impossibleGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.8), 0 0 30px rgba(239, 68, 68, 0.4); }
}

.achievement-card.unlocked {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: var(--gold);
}

.achievement-card.unlocked::before {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.achievement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-lg);
}

.achievement-icon {
  font-size: 56px;
  margin-bottom: 15px;
  margin-top: 15px;
  filter: grayscale(100%) opacity(0.4);
  transition: all 0.3s ease;
}

.achievement-card.unlocked .achievement-icon {
  filter: none;
  animation: achievementPop 0.5s ease;
}

@keyframes achievementPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.achievement-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}

.achievement-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.5;
}

.achievement-progress {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.achievement-progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.achievement-card.unlocked .achievement-progress-bar {
  background: var(--gradient-success);
}

.achievement-status {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
}

.achievement-card.unlocked .achievement-status {
  color: var(--secondary);
}

.achievement-reward {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
}

.achievement-card.unlocked .achievement-reward {
  background: var(--gold);
}

.achievements-unlocked {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
}

.achievements-unlocked h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.unlocked-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.unlocked-achievement-badge {
  background: white;
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  animation: achievementSlideIn 0.5s ease;
}



@keyframes achievementSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.unlocked-achievement-badge .achievement-icon {
  font-size: 32px;
  filter: none;
}

.skill-tree-container {
  max-width: 1400px;
  margin: 0 auto;
}

.skill-tree-header {
  text-align: center;
  margin-bottom: 40px;
}

.skill-tree-header h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 10px;
}

.skill-tree-header p {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 20px;
}

.skill-points-display {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  padding: 15px 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow);
}

.sp-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.sp-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
}

.skill-tree-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.skill-branch {
  background: white;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 6px 25px var(--shadow);
}

.branch-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 30px;
  text-align: center;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.skill-node {
  background: white;
  border: 4px solid #e5e7eb;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.skill-node:hover::before {
  left: 100%;
}

.skill-node.locked {
  opacity: 0.7;
}

.skill-node.locked:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-lg);
}

.skill-node.affordable {
  border-color: var(--secondary);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--secondary); }
  50% { box-shadow: 0 0 20px var(--secondary); }
}

.skill-node.unlocked {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: var(--correct);
  opacity: 1;
}

.skill-node.partially-owned {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: var(--accent);
  opacity: 1;
}

.skill-node.max-owned {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: var(--correct);
  opacity: 1;
  cursor: default;
}

.skill-node.max-owned::after {
  content: 'âœ… MAX';
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--correct);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.skill-node.unlocked .skill-lock {
  display: none;
}

.skill-icon {
  font-size: 56px;
  margin-bottom: 15px;
}

.skill-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}

.skill-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.5;
  min-height: 42px;
}

.skill-owned {
  display: inline-block;
  padding: 6px 14px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
  transition: all 0.3s ease;
}

.skill-node.partially-owned .skill-owned {
  border-color: var(--accent);
  color: var(--accent);
}

.skill-node.max-owned .skill-owned {
  border-color: var(--correct);
  background: var(--correct);
  color: white;
}

.skill-cost {
  display: inline-block;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.skill-node.unlocked .skill-cost {
  background: var(--correct);
}

.skill-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  opacity: 0.5;
}

.skill-points-earned {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 3px solid var(--gold);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
}

.sp-earned-icon {
  font-size: 64px;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(180deg); }
}

.sp-earned-text h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}

.sp-earned-value {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary);
}

.leaderboard-container {
  max-width: 1000px;
  margin: 0 auto;
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 40px;
}

.leaderboard-header h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 10px;
}

.leaderboard-header p {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 600;
}

.leaderboard-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 30px;
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
}

.leaderboard-content {
  background: white;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px var(--shadow);
}

.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 40px;
  padding: 20px;
}

.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 20px;
  border-radius: 16px;
  min-width: 200px;
  transition: all 0.2s ease;
}

.podium-place:hover {
  transform: translateY(-10px);
}

.podium-place.first {
  background: linear-gradient(135deg, var(--gold), #FFA500);
  order: 2;
  padding: 30px 20px;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
}

.podium-place.second {
  background: linear-gradient(135deg, var(--silver), #A8A8A8);
  order: 1;
  box-shadow: 0 10px 40px rgba(192, 192, 192, 0.4);
}

.podium-place.third {
  background: linear-gradient(135deg, var(--bronze), #B87333);
  order: 3;
  box-shadow: 0 10px 40px rgba(205, 127, 50, 0.4);
}

.podium-crown {
  font-size: 40px;
  margin-bottom: -10px;
  animation: bounce 2s ease-in-out infinite;
}

.podium-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px var(--shadow);
}

.podium-place.first .podium-avatar {
  width: 100px;
  height: 100px;
  font-size: 60px;
}

.podium-name {
  font-size: 20px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}

.podium-score {
  font-size: 24px;
  font-weight: 900;
  color: white;
  margin-bottom: 10px;
}

.podium-rank {
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg);
  border-radius: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.leaderboard-item:hover {
  transform: translateX(10px);
  box-shadow: 0 4px 15px var(--shadow);
  background: white;
}

.leaderboard-rank {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: white;
  flex-shrink: 0;
}

.leaderboard-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.leaderboard-info {
  flex: 1;
}

.leaderboard-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.leaderboard-stats {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
}

.leaderboard-score {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

.screen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  z-index: 200;
  overflow-y: auto;
}

.screen-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

/* ========== GAME SCREEN - MOBILE FIRST ========== */

/* Base Game Layout */
.game-layout {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Game Header - Compact by default */
.game-header {
  background: white;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px var(--shadow);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.question-counter {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  min-width: 60px;
}

.timer-container {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.timer-ring {
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 4;
}

.timer-ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 900;
}

.score-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 80px;
}

.score-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
}

.score-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
}

/* Game Content - Scrollable with proper spacing */
.game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 15px 100px 15px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.question-area {
  text-align: center;
  margin-bottom: 25px;
  flex-shrink: 0;
}

.question-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 15px;
}

.question-text {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  padding: 0 5px;
}

/* Answers Container - Mobile First */
.answers-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.answers-container.truefalse-layout {
  grid-template-columns: 1fr;
}

.answers-container.enumeration-layout {
  grid-template-columns: 1fr;
}

.answer-option {
  background: white;
  border: 3px solid transparent;
  border-radius: 16px;
  padding: 18px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 15px var(--shadow);
  text-align: center;
  line-height: 1.4;
  word-wrap: break-word;
}

.answer-option:active {
  transform: scale(0.98);
}

.answer-option:hover:not(.disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow-lg);
}

.answer-option.option-0 { border-color: #EF4444; }
.answer-option.option-1 { border-color: #3B82F6; }
.answer-option.option-2 { border-color: #F59E0B; }
.answer-option.option-3 { border-color: #10B981; }

.answer-option.correct {
  background: var(--correct);
  color: white;
  border-color: var(--correct);
  animation: correctPulse 0.6s ease;
}

.answer-option.wrong {
  background: var(--wrong);
  color: white;
  border-color: var(--wrong);
  animation: wrongShake 0.5s ease;
}

@keyframes correctPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.answer-option.disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* Power-ups - Fixed at bottom */
.power-ups {
  position: fixed;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  gap: 10px;
  z-index: 150;
  background: rgba(255, 255, 255, 0.98);
  padding: 12px 15px;
  border-radius: 20px;
  box-shadow: 0 6px 25px var(--shadow-lg);
  backdrop-filter: blur(10px);
  max-width: calc(100vw - 30px);
}

.power-up {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: white;
  border: 3px solid var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  position: relative;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.power-up:active {
  transform: scale(0.95);
}

.power-up:hover:not(.used) {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 20px var(--shadow-lg);
}

.power-up.used {
  opacity: 0.3;
  cursor: not-allowed;
  filter: grayscale(1);
  transform: scale(0.9);
}

.power-up[data-power="fifty"] { 
  border-color: #3B82F6;
  background: linear-gradient(135deg, #ffffff 0%, #DBEAFE 100%);
}
.power-up[data-power="freeze"] { 
  border-color: #A855F7;
  background: linear-gradient(135deg, #ffffff 0%, #F3E8FF 100%);
}
.power-up[data-power="skip"] { 
  border-color: #F59E0B;
  background: linear-gradient(135deg, #ffffff 0%, #FEF3C7 100%);
}
.power-up[data-power="double"] { 
  border-color: #EC4899;
  background: linear-gradient(135deg, #ffffff 0%, #FCE7F3 100%);
}

.power-count {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.power-icon {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.game-exit-btn {
  position: fixed;
  bottom: 15px;
  left: 15px;
  width: 50px;
  height: 50px;
  background: white;
  border: 3px solid var(--wrong);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
  color: var(--wrong);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--shadow);
}

.game-exit-btn:active {
  transform: scale(0.95);
}

.game-exit-btn:hover {
  background: var(--wrong);
  color: white;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Powerup Notification */
.powerup-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(-10deg);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px 40px;
  border-radius: 24px;
  box-shadow: 0 15px 50px rgba(102, 126, 234, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  z-index: 400;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 4px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  max-width: 90vw;
}

.powerup-notification.active {
  transform: translate(-50%, -50%) scale(1) rotate(0deg);
  animation: powerupPulse 0.5s ease 0.3s;
}

@keyframes powerupPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  50% { transform: translate(-50%, -50%) scale(1.08) rotate(3deg); }
}

.powerup-icon {
  font-size: 60px;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.3));
  animation: iconSpin 0.6s ease;
}

@keyframes iconSpin {
  0% { transform: rotate(0deg) scale(0); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.powerup-text {
  font-size: 22px;
  font-weight: 900;
  color: white;
  text-align: center;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.game-exit-btn {
  position: fixed;
  bottom: 40px;
  left: 40px;
  width: 60px;
  height: 60px;
  background: white;
  border: 3px solid var(--wrong);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 900;
  color: var(--wrong);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--shadow);
}

.game-exit-btn:hover {
  background: var(--wrong);
  color: white;
  transform: rotate(90deg) scale(1.15);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* Feedback Screen - Updated for Better Mobile Support */
.feedback-content {
  max-width: 800px;
  width: 100%;
  margin: auto;
  padding: 40px 20px;
  text-align: center;
  overflow-y: auto;
  max-height: 100vh;
}

.result-display {
  margin-bottom: 40px;
}

.result-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  background: var(--correct);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: white;
  animation: scaleIn 0.5s ease;
}

.result-icon.wrong {
  background: var(--wrong);
}

@keyframes scaleIn {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.result-text {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 15px;
}

.result-points {
  font-size: 36px;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 15px;
}

.streak-display {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #FF6B6B, #FF8E53);
  border-radius: 16px;
  color: white;
  font-size: 24px;
  font-weight: 800;
  animation: pulse 1s ease infinite;
}

.streak-display.hidden {
  display: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.streak-icon {
  font-size: 32px;
  animation: fire 0.5s ease infinite;
}

@keyframes fire {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

.answer-info {
  background: white;
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 6px 20px var(--shadow);
  text-align: left;
}

.answer-info h3 {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 15px;
  text-transform: uppercase;
  font-weight: 700;
}

.answer-info p {
  font-size: 24px;
  font-weight: 700;
}

.mini-leaderboard-section {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 6px 20px var(--shadow);
  margin-bottom: 30px;
}

.mini-leaderboard-section h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}

.btn-next {
  padding: 18px 50px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  width: 100%;
  max-width: 400px;
}

.btn-next:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive for Feedback Screen */
@media (max-width: 768px) {
  .feedback-content {
    padding: 20px 15px;
    max-height: calc(100vh - 40px);
  }
  
  .result-display {
    margin-bottom: 25px;
  }
  
  .result-icon {
    width: 80px;
    height: 80px;
    font-size: 48px;
    margin-bottom: 20px;
  }
  
  .result-text {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .result-points {
    font-size: 24px;
    margin-bottom: 12px;
  }
  
  .streak-display {
    padding: 10px 20px;
    font-size: 20px;
    gap: 8px;
  }
  
  .streak-icon {
    font-size: 28px;
  }
  
  .answer-info {
    padding: 20px 15px;
    margin-bottom: 20px;
  }
  
  .answer-info h3 {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .answer-info p {
    font-size: 18px;
    line-height: 1.4;
  }
  
  .mini-leaderboard-section {
    padding: 20px 15px;
    margin-bottom: 20px;
  }
  
  .mini-leaderboard-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .btn-next {
    padding: 16px 40px;
    font-size: 18px;
    width: 100%;
    max-width: 100%;
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .feedback-content {
    padding: 15px 10px;
  }
  
  .result-icon {
    width: 70px;
    height: 70px;
    font-size: 40px;
    margin-bottom: 15px;
  }
  
  .result-text {
    font-size: 28px;
  }
  
  .result-points {
    font-size: 20px;
  }
  
  .streak-display {
    padding: 8px 16px;
    font-size: 18px;
  }
  
  .streak-icon {
    font-size: 24px;
  }
  
  .answer-info {
    padding: 15px 12px;
  }
  
  .answer-info p {
    font-size: 16px;
  }
  
  .mini-leaderboard-section {
    padding: 15px 12px;
  }
  
  .btn-next {
    padding: 14px 30px;
    font-size: 16px;
  }
}

/* Landscape Mode Adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  .feedback-content {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  .result-display {
    margin-bottom: 15px;
  }
  
  .result-icon {
    width: 60px;
    height: 60px;
    font-size: 36px;
    margin-bottom: 10px;
  }
  
  .result-text {
    font-size: 24px;
    margin-bottom: 8px;
  }
  
  .result-points {
    font-size: 18px;
    margin-bottom: 8px;
  }
  
  .streak-display {
    padding: 6px 14px;
    font-size: 16px;
  }
  
  .answer-info {
    padding: 12px 15px;
    margin-bottom: 15px;
  }
  
  .answer-info h3 {
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .answer-info p {
    font-size: 14px;
  }
  
  .mini-leaderboard-section {
    padding: 12px 15px;
    margin-bottom: 15px;
  }
  
  .mini-leaderboard-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .btn-next {
    padding: 12px 30px;
    font-size: 16px;
  }
}

#miniLeaderboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-player {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg);
  border-radius: 12px;
  font-weight: 700;
}

.mini-player.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
}

.mini-player.rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
  color: white;
}

.mini-player.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  color: white;
}

.mini-rank {
  width: 36px;
  height: 36px;
  background: white;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.mini-player.rank-1 .mini-rank {
  color: var(--gold);
}

.mini-player.rank-2 .mini-rank {
  color: var(--silver);
}

.mini-player.rank-3 .mini-rank {
  color: var(--bronze);
}

.mini-name {
  flex: 1;
  font-size: 18px;
}

.mini-score {
  font-size: 20px;
  font-weight: 900;
}

.btn-next {
  padding: 18px 50px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-next:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.results-content {
  max-width: 1000px;
  width: 100%;
  margin: auto;
  padding: 40px;
  text-align: center;
}

.results-content h1 {
  font-size: 56px;
  font-weight: 900;
  margin-bottom: 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-box {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 6px 20px var(--shadow);
  transition: all 0.2s ease;
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-lg);
}

.stat-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.stat-value {
  font-size: 48px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 700;
}

.final-leaderboard {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 6px 20px var(--shadow);
  margin-bottom: 40px;
}

.final-leaderboard h2 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 25px;
}

#finalLeaderboard {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.final-player {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.final-player:hover {
  transform: translateX(10px);
}

.final-player.rank-1 {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
}

.final-player.rank-2 {
  background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
  color: white;
}

.final-player.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  color: white;
}

.final-rank {
  width: 50px;
  height: 50px;
  background: white;
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  flex-shrink: 0;
}

.final-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.final-info {
  flex: 1;
  text-align: left;
}

.final-name {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 5px;
}

.final-stats {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.final-score {
  font-size: 28px;
  font-weight: 900;
}

.results-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Add these styles to the CSS file */

/* Loading Screen - Updated */
.loading-content {
  text-align: center;
  max-width: 500px;
  margin: auto;
  padding: 50px 40px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

.loading-spinner {
  width: 80px;
  height: 80px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 30px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--text);
}

.loading-subtitle {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 30px;
  font-weight: 600;
}

.loading-progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  margin-bottom: 40px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.loading-step {
  padding: 15px 20px;
  background: white;
  border-radius: 12px;
  font-weight: 700;
  opacity: 0.5;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px var(--shadow);
  border-left: 4px solid transparent;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.loading-step.active {
  opacity: 1;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-left-color: var(--primary);
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.step-icon {
  font-size: 24px;
}

.step-text {
  flex: 1;
  text-align: left;
}

.step-indicator {
  font-size: 20px;
  opacity: 0;
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-step.active .step-indicator {
  opacity: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stepPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

/* Fix for button hover effects */
.btn-start-learning:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(67, 233, 123, 0.5);
}

/* Fix for power-up notification positioning */
.powerup-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(-10deg);
  /* ... rest of the styles remain the same */
}

/* Fix for achievement card responsiveness */
.achievement-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.achievement-desc {
  flex: 1;
}

/* Fix for skill tree grid on mobile */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 42px;
  }
  
  .hero-subtitle {
    font-size: 18px;
  }
  
/* File Info Mobile Fix */
  .file-info-content {
    flex-direction: column;
    align-items: stretch;
  }

  .file-details {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .btn-remove {
    width: 100%;
    padding: 12px 20px;
  }

  .btn-hero {
    padding: 16px 40px;
    font-size: 18px;
  }
  
  .section-title {
    font-size: 36px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .step-arrow {
    display: none;
  }
  
  .cta-title {
    font-size: 36px;
  }
  
  .main-nav {
    padding: 15px 20px;
  }
  
  .nav-title {
    font-size: 20px;
  }
  
  .nav-buttons {
    gap: 5px;
  }
  
  .nav-btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .formats-grid {
    grid-template-columns: 1fr;
  }
  
  .config-grid {
    grid-template-columns: 1fr;
  }
  
  .difficulty-btns {
    flex-direction: column;
  }
  
  .question-types {
    flex-direction: column;
  }
  
  .answers-container {
    grid-template-columns: 1fr;
  }
  
  .answers-container.truefalse-layout {
    grid-template-columns: 1fr;
  }
  
  .question-text {
    font-size: 24px;
  }
  
  .answer-option {
    min-height: 80px;
    padding: 20px;
    font-size: 18px;
  }
  
  .power-ups {
    bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90vw;
  }
  
  .power-up {
    width: 65px;
    height: 65px;
    font-size: 28px;
  }
  
  .game-exit-btn {
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .powerup-notification {
    padding: 30px 40px;
    max-width: 85vw;
  }
  
  .powerup-icon {
    font-size: 60px;
  }
  
  .powerup-text {
    font-size: 20px;
  }
  
  .podium {
    flex-direction: column;
    align-items: center;
  }
  
  .podium-place {
    width: 100%;
    max-width: 300px;
  }
  
  .podium-place.first,
  .podium-place.second,
  .podium-place.third {
    order: unset;
  }
  
  .results-content h1 {
    font-size: 36px;
  }
  
  .leaderboard-header h1 {
    font-size: 36px;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  
  .skill-tree-header h1 {
    font-size: 36px;
  }
}

.btn-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-hero:hover::before {
  left: 100%;
}

.btn-hero:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.btn-hero-icon {
  font-size: 28px;
  animation: rocketMove 2s ease-in-out infinite;
}

@keyframes rocketMove {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.btn-hero-arrow {
  font-size: 24px;
  transition: transform 0.3s ease;
}

.btn-hero:hover .btn-hero-arrow {
  transform: translateX(10px);
}

.scroll-indicator {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.8;
  animation: fadeInUp 0.8s ease 0.6s backwards;
}

.scroll-indicator span {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.scroll-arrow {
  font-size: 32px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

.features-section {
  padding: 100px 20px;
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 48px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 15px;
}

.section-subtitle {
  font-size: 20px;
  color: var(--text-light);
  font-weight: 600;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border: 2px solid #e2e8f0;
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.feature-card:hover::before {
  transform: scale(1);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px var(--shadow-lg);
  border-color: var(--primary);
}

.feature-icon-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto 25px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.feature-icon {
  font-size: 48px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.feature-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--text);
}

.feature-description {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
  font-weight: 600;
}

.powerup-showcase {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.mini-powerup {
  width: 50px;
  height: 50px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.2s ease;
}

.mini-powerup:hover {
  transform: translateY(-5px) scale(1.1);
}

.how-it-works-section {
  padding: 100px 20px;
  background: var(--bg);
}

.steps-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.step-card {
  flex: 1;
  min-width: 250px;
  background: white;
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 8px 30px var(--shadow);
  position: relative;
  transition: all 0.3s ease;
}

.step-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 50px var(--shadow-lg);
}

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: white;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.step-icon {
  font-size: 64px;
  margin: 20px 0;
}

.step-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--text);
}

.step-description {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
  font-weight: 600;
}

.step-arrow {
  font-size: 48px;
  color: var(--primary);
  font-weight: 900;
}

.cta-section {
  padding: 100px 20px;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: moveBackground 15s linear infinite;
}

.cta-content {
  text-align: center;
  color: white;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.cta-title {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-subtitle {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.95;
}

.btn-cta {
  padding: 20px 50px;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 50px;
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 15px;
}

.btn-cta:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.btn-cta-icon {
  font-size: 28px;
}

.main-nav {
  background: white;
  padding: 15px 40px;
  display: none;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-nav.visible {
  display: flex;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 45px;
  height: 45px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: white;
}

.nav-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
}

.nav-buttons {
  display: flex;
  gap: 10px;
}

.nav-btn {
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  color: var(--text);
}

.nav-btn:hover {
  background: var(--bg-dark);
  transform: translateY(-2px);
}

.nav-btn.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section {
  display: none;
  padding: 40px 20px;
  min-height: calc(100vh - 75px);
}

.section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.learn-container {
  max-width: 900px;
  margin: 0 auto;
}

.upload-card, .learning-formats-card, .quiz-config-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 4px 20px var(--shadow);
  margin-bottom: 30px;
}

.card-header {
  text-align: center;
  margin-bottom: 30px;
}

.card-header h2 {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}

.card-header p {
  font-size: 16px;
  color: var(--text-light);
  font-weight: 600;
}

.upload-area {
  position: relative;
  border: 3px dashed #cbd5e1;
  border-radius: 16px;
  padding: 50px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.upload-area:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  transform: scale(1.01);
}

.upload-area.dragover {
  border-color: var(--secondary);
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}
/* ========== ENHANCED IMAGE GENERATION ========== */
.image-placeholder-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: all 0.5s ease;
}

.placeholder-icon {
  font-size: 100px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.1); }
}

.placeholder-status {
  font-size: 20px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 12px 30px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.image-placeholder-content.generated .placeholder-status {
  background: rgba(67, 233, 123, 0.9);
  border-color: rgba(67, 233, 123, 1);
  animation: none;
}

.image-placeholder-content.generated .placeholder-icon {
  animation: celebrationPop 0.6s ease;
}

@keyframes celebrationPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.btn-view-image {
  width: 100%;
  padding: 12px 20px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-view-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-view-image:active {
  transform: translateY(0);
}

/* Update existing image-info styles */
.image-info {
  padding: 25px;
}

.image-title {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--text);
}

.image-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  font-weight: 600;
}

/* Enhanced animation for image cards */
.image-gallery .image-card {
  animation: slideUpFade 0.6s ease;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.upload-area.has-file {
  border-color: var(--correct);
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.upload-area input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.upload-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.upload-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.file-types {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-type {
  padding: 8px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.file-info {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #f0fdf4;
  border: 2px solid var(--correct);
  border-radius: 12px;
}

.file-info.active {
  display: block;
}

.file-info-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.file-details {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.file-name-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.btn-remove {
  padding: 10px 20px;
  background: white;
  border: 2px solid var(--wrong);
  color: var(--wrong);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-remove:hover {
  background: var(--wrong);
  color: white;
}

.learning-formats-card {
  display: none;
}

.learning-formats-card.active {
  display: block;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.format-card {
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.format-card:hover:not(.disabled) {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-lg);
  border-color: var(--primary);
}

.format-card.active-format {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.format-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.format-card.selected {
  border-color: var(--primary);
  border-width: 4px;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.format-icon {
  font-size: 48px;
  margin-bottom: 15px;
  display: block;
}

.format-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.format-desc {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
  line-height: 1.4;
}

.format-badge {
  display: inline-block;
  padding: 5px 12px;
  background: var(--accent);
  color: white;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.format-badge.active {
  background: var(--correct);
}

.quiz-config-card {
  display: none;
}

.quiz-config-card.active {
  display: block;
  animation: slideUp 0.3s ease;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.config-group {
  display: flex;
  flex-direction: column;
}

.config-group.full-width {
  grid-column: 1 / -1;
}

.config-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.difficulty-btns {
  display: flex;
  gap: 10px;
}

.difficulty-btn {
  flex: 1;
  padding: 15px;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.difficulty-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow);
}

.difficulty-btn.selected {
  border-width: 4px;
}

.difficulty-btn.easy { border-color: #10B981; }
.difficulty-btn.easy.selected { background: linear-gradient(135deg, #10B981, #059669); color: white; }

.difficulty-btn.medium { border-color: #F59E0B; }
.difficulty-btn.medium.selected { background: linear-gradient(135deg, #F59E0B, #D97706); color: white; }

.difficulty-btn.hard { border-color: #EF4444; }
.difficulty-btn.hard.selected { background: linear-gradient(135deg, #EF4444, #DC2626); color: white; }

.diff-icon {
  font-size: 24px;
}

.config-select, .config-input {
  padding: 15px;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
}

.config-select:focus, .config-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.question-types {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.type-checkbox {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.type-checkbox input {
  display: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.2s ease;
  width: 100%;
}

.type-checkbox:hover .checkbox-label {
  border-color: var(--primary);
}

.type-checkbox input:checked + .checkbox-label {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
}

.check-icon {
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.type-checkbox input:checked + .checkbox-label .check-icon {
  background: white;
  color: var(--primary);
}

.btn-start-learning {
  width: 100%;
  padding: 18px;
  background: var(--gradient-success);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(67, 233, 123, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-start-learning:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 40px rgba(67, 233, 123, 0.8);
  background: var(--gradient-success);
  color: white;
  filter: brightness(1.1);
}

.btn-start-learning:active {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(67, 233, 123, 0.6);
}

.skill-tree-header h1 {
    font-size: 36px;
  }

/* AI Content Screens */
.ai-content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
}

.ai-header {
  text-align: center;
  margin-bottom: 40px;
}

.ai-header h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 10px;
}

.ai-header p {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 600;
}

/* Image Generation */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.image-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow);
  transition: all 0.3s ease;
  animation: slideUp 0.5s ease;
}

.image-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 50px var(--shadow-lg);
}

.image-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  position: relative;
  overflow: hidden;
}

.image-placeholder::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: moveBackground 10s linear infinite;
}

.image-info {
  padding: 20px;
}

.image-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.image-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.5;
}

/* Smart Summary */
.summary-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 30px var(--shadow);
  animation: slideUp 0.5s ease;
}

.summary-section {
  margin-bottom: 30px;
}

.summary-section h2 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 15px;
}

.highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  border-left: 4px solid var(--accent);
}

.key-points {
  background: var(--bg);
  border-radius: 16px;
  padding: 25px;
  margin-top: 20px;
}

.key-points h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--text);
}

.key-points ul {
  list-style: none;
  padding: 0;
}

.key-points li {
  padding: 12px 0;
  padding-left: 30px;
  position: relative;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  border-bottom: 1px solid #e5e7eb;
}

.key-points li:last-child {
  border-bottom: none;
}

.key-points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 900;
  font-size: 18px;
}

/* AI Tutor Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1000px;
  margin: 0 auto;
}

.chat-header {
  background: white;
  padding: 20px 30px;
  box-shadow: 0 2px 10px var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}

.chat-header-info {
  flex: 1;
}

.chat-header h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 5px;
}

.chat-header p {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background: var(--bg);
}

.chat-message {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  animation: slideUp 0.3s ease;
}

.chat-message.user-message {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  background: white;
  box-shadow: 0 2px 10px var(--shadow);
}

.user-message .message-avatar {
  background: var(--gradient-primary);
}

.message-content {
  background: white;
  padding: 15px 20px;
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--shadow);
  max-width: 70%;
}

.user-message .message-content {
  background: var(--gradient-primary);
  color: white;
}

.message-content p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.user-message .message-content code {
  background: rgba(255, 255, 255, 0.2);
}

.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 10px 0;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--text-light);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}



@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-10px); }
}

.chat-input-area {
  background: white;
  padding: 20px 30px;
  box-shadow: 0 -2px 10px var(--shadow);
  display: flex;
  gap: 15px;
}

#chatInput {
  flex: 1;
  padding: 15px 20px;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;  
  background: white;
  color: var(--text);
  resize: none;
  max-height: 120px;
  overflow-y: auto;
}

#chatInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

#chatInput::placeholder {
  color: var(--text-lighter);
  opacity: 0.7;
}

.btn-send {
  padding: 15px 35px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-send:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .skill-tree-header h1 {
    font-size: 36px;
  }
  
  .message-content {
    max-width: 85%;
  }
  
  .image-gallery {
    grid-template-columns: 1fr;
  }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px 12px;
  border-radius: 12px;
}

.nav-brand:hover {
  background: var(--bg);
  transform: translateX(-3px);
}

/* ========== QUESTION CREATION ========== */
.question-creation-section {
  background: var(--bg);
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 30px;
  margin-top: 30px;
}

.question-creation-section h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: center;
}

.section-hint {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 25px;
  font-weight: 600;
}

.question-form {
  background: white;
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px var(--shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#answersInputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-input {
  width: 100%;
}

.correct-answer-btns {
  display: flex;
  gap: 12px;
}

.correct-btn {
  flex: 1;
  padding: 15px;
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  color: var(--text);
}

.correct-btn:hover {
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.correct-btn.selected {
  background: var(--gradient-secondary);
  color: white;
  border-color: var(--secondary);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-add-question {
  width: 100%;
  padding: 18px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-add-question:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-add-question span {
  font-size: 24px;
}

.created-questions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding: 5px;
}

.no-questions {
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  padding: 40px 20px;
  font-weight: 600;
}

.question-card {
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s ease;
  animation: slideUp 0.3s ease;
}

.question-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px var(--shadow);
}

.question-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.question-type-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-delete-question {
  padding: 8px 12px;
  background: white;
  border: 2px solid var(--wrong);
  color: var(--wrong);
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-question:hover {
  background: var(--wrong);
  color: white;
  transform: scale(1.1);
}

.question-card-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 15px;
  line-height: 1.5;
}

.question-card-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-answer {
  padding: 10px 15px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-left: 4px solid #e5e7eb;
}

.question-answer.correct-answer {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-left-color: var(--correct);
  font-weight: 700;
}

@media (max-width: 768px) {
  .correct-answer-btns {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .question-form {
    padding: 20px;
  }
}

.achievement-difficulty-section {
  margin-bottom: 50px;
}

.achievement-difficulty-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 4px solid currentColor;
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievements-difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.achievement-difficulty-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.achievement-difficulty-badge.easy {
  background: linear-gradient(135deg, #10B981, #059669);
}

.achievement-difficulty-badge.hard {
  background: linear-gradient(135deg, #F59E0B, #D97706);
}

.achievement-difficulty-badge.impossible {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  animation: impossibleGlow 2s ease-in-out infinite;
}

@keyframes impossibleGlow {
  0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.8), 0 0 30px rgba(239, 68, 68, 0.4); }
}

/* ========== LEADERBOARD ENHANCEMENTS ========== */
.leaderboard-empty {
  text-align: center;
  padding: 80px 40px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 40px var(--shadow);
}

.empty-icon {
  font-size: 100px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.leaderboard-empty h3 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 15px;
  color: var(--text);
}

.leaderboard-empty p {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 30px;
  font-weight: 600;
}

.leaderboard-category {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  margin-top: 4px;
}

.leaderboard-score-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.view-profile-hint {
  font-size: 11px;
  color: var(--text-lighter);
  font-weight: 600;
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.leaderboard-item:hover .view-profile-hint {
  opacity: 1;
}

.category-selector {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 4px 20px var(--shadow);
  margin-bottom: 30px;
  animation: slideUp 0.3s ease;
}

.category-selector h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
}

.category-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.category-pill {
  padding: 12px 24px;
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
}

.category-pill:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-pill.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ========== PLAYER PROFILE MODAL ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 300;
  overflow-y: auto;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.profile-modal {
  background: white;
  border-radius: 24px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profile-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.profile-close:hover {
  background: var(--wrong);
  color: white;
  border-color: var(--wrong);
  transform: rotate(90deg);
}

.profile-header {
  background: var(--gradient-primary);
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 25px;
  border-radius: 24px 24px 0 0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.profile-info {
  flex: 1;
  color: white;
}

.profile-info h2 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 10px;
}

.profile-rank-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  padding: 30px 40px;
  background: var(--bg);
}

.profile-stat-card {
  background: white;
  padding: 25px 20px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.2s ease;
}

.profile-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-lg);
}

.profile-stat-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.profile-stat-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 8px;
}

.profile-stat-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
}

.profile-section {
  padding: 30px 40px;
}

.profile-section h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 20px;
  color: var(--text);
}

.category-performance {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.category-perf-item {
  background: var(--bg);
  padding: 15px 20px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.category-perf-item:hover {
  background: white;
  box-shadow: 0 4px 15px var(--shadow);
}

.category-perf-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.category-perf-bar-container {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.category-perf-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.category-perf-stats {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

.recent-achievements {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recent-achievement-badge {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 3px solid var(--gold);
  border-radius: 16px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s ease;
}

.recent-achievement-badge:hover {
  transform: translateX(10px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.recent-achievement-badge .achievement-icon {
  font-size: 36px;
  filter: none;
  margin: 0;
}

.recent-achievement-badge .achievement-name {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.recent-achievement-badge .achievement-reward {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 700;
}

.performance-trend {
  background: var(--bg);
  padding: 30px;
  border-radius: 16px;
}

.trend-chart {
  width: 100%;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  gap: 10px;
}

.trend-bar {
  flex: 1;
  background: var(--gradient-primary);
  border-radius: 8px 8px 0 0;
  min-height: 30px;
  position: relative;
  transition: all 0.3s ease;
  animation: trendBarGrow 0.6s ease;
}

@keyframes trendBarGrow {
  from { height: 0; }
}

.trend-bar:hover {
  opacity: 0.8;
  transform: scaleY(1.05);
}

.trend-bar span {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
    color: var(--text-light);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .profile-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .profile-header {
    padding: 30px 20px;
    flex-direction: column;
    text-align: center;
  }
  
  .profile-info h2 {
    font-size: 28px;
  }
  
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }
  
  .profile-section {
    padding: 20px;
  }
  
  .category-pills {
    gap: 8px;
  }
  
  .category-pill {
    padding: 10px 18px;
    font-size: 14px;
  }
  
  .leaderboard-empty {
    padding: 60px 20px;
  }
  
  .empty-icon {
    font-size: 80px;
  }
  
  .leaderboard-empty h3 {
    font-size: 24px;
  }
  
  .leaderboard-empty p {
    font-size: 16px;
  }
}


/* ========== DASHBOARD ========== */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 40px;
}

.dashboard-header h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 10px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard-header p {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 600;
}

/* Quick Stats Grid */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-overview-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 6px 25px var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.stat-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px var(--shadow-lg);
}

.stat-overview-card.primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
}

.stat-overview-card.success {
  border-color: var(--secondary);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.stat-overview-card.accent {
  border-color: var(--accent);
  background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.stat-overview-card.gold {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.stat-overview-icon {
  font-size: 56px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.stat-overview-content {
  flex: 1;
}

.stat-overview-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 5px;
}

.stat-overview-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Two Column Layout */
.dashboard-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.dashboard-left-column,
.dashboard-right-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Dashboard Cards */
.dashboard-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 6px 25px var(--shadow);
}

.card-header-dash {
  margin-bottom: 25px;
}

.card-header-dash h2 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 5px;
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
}

/* Streak Card */
.streak-card {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  color: white;
  border: none;
}

.streak-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.streak-display-large {
  text-align: center;
}

.streak-number {
  font-size: 80px;
  font-weight: 900;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  line-height: 1;
}

.streak-label {
  font-size: 20px;
  font-weight: 700;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.streak-calendar {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.streak-day {
  flex: 1;
  max-width: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.streak-day.active {
  background: rgba(255, 255, 255, 0.9);
  color: #FF6B6B;
  border-color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.streak-day.today {
  border-color: #FFD700;
  border-width: 3px;
}

.streak-day-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.9;
}

.streak-day-indicator {
  font-size: 24px;
}

.streak-message {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 15px 20px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  width: 100%;
}

/* Today's Activity */
.today-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.today-stat {
  text-align: center;
  padding: 20px 15px;
  background: var(--bg);
  border-radius: 16px;
  transition: all 0.2s ease;
}

.today-stat:hover {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  transform: translateY(-3px);
}

.today-stat-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.today-stat-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 5px;
}

.today-stat-label {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
}

/* Weak Areas */
.weak-areas-card {
  border: 3px solid var(--accent);
}

.weak-areas-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.weak-area-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background: var(--bg);
  border-radius: 16px;
  border-left: 4px solid var(--accent);
  transition: all 0.2s ease;
  }

  .weak-area-item:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  transform: translateX(5px);
  box-shadow: 0 4px 15px var(--shadow);
}

.weak-area-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.weak-area-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--shadow);
}

.weak-area-topic {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.weak-area-stats {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

.btn-practice-weak {
  padding: 10px 20px;
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-practice-weak:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Recent Activities */
.activities-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: var(--bg);
  border-radius: 16px;
  transition: all 0.2s ease;
  animation: slideUp 0.3s ease;
}

.activity-item:hover {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  transform: translateX(5px);
}

.activity-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--shadow);
}

.activity-icon.quiz-activity {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.activity-icon.upload-activity {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.activity-icon.achievement-activity {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.activity-details {
  flex: 1;
}

.activity-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.activity-meta {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--text-lighter);
  font-weight: 600;
}

/* File Learning Progress */
.files-progress-card {
  border: 3px solid var(--secondary);
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.file-progress-item {
  padding: 20px;
  background: var(--bg);
  border-radius: 16px;
  border-left: 4px solid var(--secondary);
  transition: all 0.3s ease;
}

.file-progress-item:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  transform: scale(1.02);
  box-shadow: 0 6px 20px var(--shadow);
}

.file-progress-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.file-icon {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 2px 8px var(--shadow);
  flex-shrink: 0;
}

.file-info {
  flex: 1;
}

.file-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  word-break: break-all;
}

.file-meta {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

.file-progress-bar-container {
  width: 100%;
  height: 10px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.file-progress-bar {
  height: 100%;
  background: var(--gradient-secondary);
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.file-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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%); }
}

.file-progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 12px;
}

.file-insights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.insight-tag {
  display: inline-block;
  padding: 6px 12px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 4px var(--shadow);
}

.insight-tag:last-child {
  background: var(--gradient-success);
  color: white;
  border-color: var(--secondary);
}

.btn-view-all-files {
  width: 100%;
  padding: 15px;
  background: var(--gradient-secondary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-view-all-files:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Performance Chart */
.performance-chart {
  padding: 20px 0;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  gap: 10px;
}

.chart-bar {
  flex: 1;
  background: var(--gradient-primary);
  border-radius: 8px 8px 0 0;
  min-height: 30px;
  position: relative;
  transition: all 0.3s ease;
  animation: chartBarGrow 0.8s ease;
}

@keyframes chartBarGrow {
  from { height: 0; }
}

.chart-bar:hover {
  opacity: 0.8;
  transform: scaleY(1.05);
}

.chart-bar.active {
  background: var(--gradient-secondary);
  box-shadow: 0 -4px 20px rgba(16, 185, 129, 0.4);
}

.chart-bar span {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  white-space: nowrap;
}

.bar-value {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  background: white;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px var(--shadow);
  white-space: nowrap;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .dashboard-two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-header h1 {
    font-size: 36px;
  }

  .stats-overview-grid {
    grid-template-columns: 1fr;
  }

  .stat-overview-card {
    padding: 20px;
  }

  .stat-overview-icon {
    font-size: 42px;
  }

  .stat-overview-value {
    font-size: 28px;
  }

  .streak-number {
    font-size: 60px;
  }

  .streak-calendar {
    gap: 6px;
  }

  .streak-day {
    padding: 8px 4px;
    max-width: 45px;
  }

  .streak-day-name {
    font-size: 9px;
  }

  .streak-day-indicator {
    font-size: 18px;
  }

  .today-stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card {
    padding: 20px;
  }

  .card-header-dash h2 {
    font-size: 20px;
  }

  .weak-area-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .btn-practice-weak {
    width: 100%;
  }

  .chart-bars {
    height: 150px;
  }

  .bar-value {
    font-size: 11px;
    padding: 3px 6px;
  }
}
  
.btn-dashboard-info {
  margin-top: 15px;
  padding: 10px 24px;
  background: white;
  border: 3px solid var(--primary);
  color: var(--primary);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px var(--shadow);
}

.btn-dashboard-info:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.btn-close-modal {
  margin-top: 20px;
  padding: 10px 20px;
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.btn-close-modal:hover {
  background: #1d4ed8;
}


/* ========== MOBILE RESPONSIVE DESIGN ========== */

/* Tablets and Small Laptops (768px - 1024px) */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 48px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .nav-buttons {
    gap: 8px;
  }
  
  .nav-btn {
    padding: 10px 18px;
    font-size: 14px;
  }
  
  .dashboard-two-column {
    grid-template-columns: 1fr;
  }
  
  .achievements-difficulty-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  /* Hero Section */
  .hero-title {
    font-size: 36px;
    padding: 0 15px;
  }
  
  .hero-subtitle {
    font-size: 16px;
    padding: 0 15px;
  }
  
  .btn-hero {
    padding: 16px 35px;
    font-size: 18px;
    white-space: nowrap;
  }
  
  .hero-logo-large {
    width: 120px;
    height: 120px;
  }
  
  .logo-center {
    width: 80px;
    height: 80px;
    font-size: 48px;
  }
  
  .scroll-indicator {
    margin-top: 40px;
  }
  
  /* Sections */
  .section-title {
    font-size: 32px;
    padding: 0 15px;
  }
  
  .section-subtitle {
    font-size: 16px;
    padding: 0 15px;
  }
  
  .features-section,
  .how-it-works-section,
  .cta-section {
    padding: 60px 15px;
  }
  
  /* Features Grid */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .feature-card {
    padding: 30px 20px;
  }
  
  .feature-icon-wrapper {
    width: 80px;
    height: 80px;
  }
  
  .feature-icon {
    font-size: 40px;
  }
  
  /* Steps */
  .steps-container {
    flex-direction: column;
  }
  
  .step-arrow {
    display: none;
  }
  
  .step-card {
    min-width: 100%;
  }
  
  /* CTA */
  .cta-title {
    font-size: 32px;
    padding: 0 15px;
  }
  
  .cta-subtitle {
    font-size: 18px;
    padding: 0 15px;
  }
  
  /* Navigation */
  .main-nav {
    padding: 12px 15px;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .nav-brand {
    flex: 1 1 100%;
    justify-content: center;
    margin-bottom: 10px;
  }
  
  .nav-title {
    font-size: 18px;
  }
  
  .nav-logo {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .nav-buttons {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  
  .nav-btn {
    padding: 10px 14px;
    font-size: 13px;
    flex: 1 1 auto;
    min-width: calc(50% - 6px);
    text-align: center;
  }
  
  /* Learn Section */
  .learn-container {
    padding: 0 15px;
  }
  
  .upload-card,
  .learning-formats-card,
  .quiz-config-card {
    padding: 25px 20px;
    margin-bottom: 20px;
  }
  
  .card-header h2 {
    font-size: 24px;
  }
  
  .upload-area {
    padding: 40px 20px;
  }
  
  .upload-icon {
    font-size: 48px;
  }
  
  .upload-title {
    font-size: 18px;
  }
  
  .file-types {
    flex-direction: column;
    align-items: center;
  }
  
  /* Learning Formats */
  .formats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .format-card {
    padding: 25px 15px;
  }
  
  /* Quiz Config */
  .config-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .difficulty-btns {
    flex-direction: column;
    gap: 12px;
  }
  
  .difficulty-btn {
    width: 100%;
  }
  
  .question-types {
    flex-direction: column;
    gap: 12px;
  }
  
  .type-checkbox {
    min-width: 100%;
  }
  
  /* Quiz Game */
  .quiz-home-content {
    padding: 40px 20px;
  }
  
  .quiz-logo {
    font-size: 60px;
  }
  
  .quiz-home-content h1 {
    font-size: 28px;
  }
  
  .quiz-home-options {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-large {
    width: 100%;
    min-width: 100%;
  }
  
  /* Game Screen - CRITICAL MOBILE FIXES */
  .game-header {
    padding: 10px 15px;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: space-between;
    min-height: auto;
  }
  
  .question-counter {
    font-size: 16px;
    font-weight: 800;
    min-width: auto;
    flex-shrink: 0;
  }

  .timer-container {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .timer-ring {
    width: 50px;
    height: 50px;
  }

  .timer-text {
    font-size: 16px;
  }

  .score-display {
    min-width: auto;
    align-items: flex-end;
    flex-shrink: 0;
  }

  .score-label {
    font-size: 10px;
  }

  .score-value {
    font-size: 20px;
  }
  
  .question-text {
    font-size: 20px;
    padding: 0 10px;
    line-height: 1.4;
  }
  
  .question-badge {
    font-size: 11px;
    padding: 6px 14px;
    margin-bottom: 15px;
  }
  
  .game-content {
    padding: 20px 10px 120px 10px; /* Extra bottom padding for power-ups */
  }

  .question-area {
    margin-bottom: 25px;
  }
  
  /* Answers */
  .answers-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .answers-container.truefalse-layout {
    grid-template-columns: 1fr;
  }
  
  .answer-option {
    min-height: 80px;
    padding: 18px 12px;
    font-size: 15px;
  }
  
  /* Power-ups - CRITICAL MOBILE FIXES */
  .power-ups {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    flex-wrap: nowrap;
    justify-content: center;
    max-width: calc(100vw - 20px);
    padding: 10px 12px;
    gap: 8px;
    border-radius: 16px;
  }
  
  .power-up {
    width: 55px;
    height: 55px;
    font-size: 24px;
    border-width: 3px;
    border-radius: 12px;
  }
  
  .power-count {
    width: 24px;
    height: 24px;
    font-size: 12px;
    top: -6px;
    right: -6px;
    border-width: 2px;
  }

  .power-icon {
    font-size: 24px;
  }
  
  .game-exit-btn {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 45px;
    height: 45px;
    font-size: 18px;
    z-index: 151;
  }
  
  /* Powerup Notification */
  .powerup-notification {
    padding: 25px 30px;
    max-width: 85vw;
    border-radius: 20px;
  }
  
  .powerup-icon {
    font-size: 50px;
  }
  
  .powerup-text {
    font-size: 16px;
  }
  
  /* Feedback Screen */
  .feedback-content {
    padding: 30px 20px;
  }
  
  .result-icon {
    width: 100px;
    height: 100px;
    font-size: 56px;
  }
  
  .result-text {
    font-size: 36px;
  }
  
  .result-points {
    font-size: 28px;
  }
  
  .answer-info {
    padding: 20px;
  }
  
  .answer-info p {
    font-size: 18px;
  }
  
  /* Results Screen */
  .results-content {
    padding: 30px 15px;
  }
  
  .results-content h1 {
    font-size: 32px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .stat-box {
    padding: 20px 15px;
  }
  
  .stat-icon {
    font-size: 36px;
  }
  
  .stat-value {
    font-size: 36px;
  }
  
  .results-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .results-actions button {
    width: 100%;
  }
  
  /* Leaderboard */
  .leaderboard-container {
    padding: 0 15px;
  }
  
  .leaderboard-header h1 {
    font-size: 32px;
  }
  
  .leaderboard-filters {
    gap: 8px;
    padding: 0 10px;
  }
  
  .filter-btn {
    padding: 10px 18px;
    font-size: 14px;
    flex: 1 1 auto;
  }
  
  .leaderboard-content {
    padding: 25px 15px;
  }
  
  .podium {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .podium-place {
    width: 100%;
    max-width: 280px;
  }
  
  .podium-place.first,
  .podium-place.second,
  .podium-place.third {
    order: unset;
  }
  
  .leaderboard-item {
    padding: 15px;
    gap: 12px;
  }
  
  .leaderboard-rank,
  .leaderboard-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .leaderboard-name {
    font-size: 16px;
  }
  
  .leaderboard-stats {
    font-size: 12px;
  }
  
  .leaderboard-score {
    font-size: 20px;
  }
  
  /* Skill Tree */
  .skill-tree-container {
    padding: 0 15px;
  }
  
  .skill-tree-header h1 {
    font-size: 32px;
  }
  
  .skill-tree-header p {
    font-size: 16px;
  }
  
  .skill-points-display {
    padding: 12px 25px;
  }
  
  .sp-value {
    font-size: 28px;
  }
  
  .skill-branch {
    padding: 25px 15px;
  }
  
  .branch-title {
    font-size: 24px;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .skill-node {
    padding: 25px 15px;
  }
  
  /* Achievements */
  .achievements-section {
    padding: 25px 15px;
  }
  
  .section-title-small {
    font-size: 28px;
  }
  
  .achievements-difficulty-grid {
    grid-template-columns: 1fr;
  }
  
  .achievement-difficulty-title {
    font-size: 24px;
  }
  
  /* AI Content Screens */
  .ai-content-container {
    padding: 30px 15px;
  }
  
  .ai-header h1 {
    font-size: 32px;
  }
  
  .image-gallery {
    grid-template-columns: 1fr;
  }
  
  .summary-content {
    padding: 25px 20px;
  }
  
  .summary-section h2 {
    font-size: 24px;
  }
  
  /* Chat */
 /* Chat */
  .chat-header {
    padding: 15px 20px;
  }
  
  .chat-header h2 {
    font-size: 20px;
  }
  
  .chat-messages {
    padding: 20px 15px;
    margin-bottom: 80px; /* Space for fixed input */
  }
  
  .message-content {
    max-width: 80%;
    padding: 12px 16px;
  }
  
  .message-content p {
    font-size: 15px;
  }
  
  .chat-input-area {
    padding: 15px;
    gap: 10px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px var(--shadow);
    z-index: 100;
  }
  
  #chatInput {
    padding: 14px 16px;
    font-size: 15px;
    border-width: 2px;
    min-height: 48px;
    color: var(--text);
    background: white;
    font-weight: 600;
  }
  
  #chatInput::placeholder {
    color: var(--text-light);
    font-size: 14px;
  }
  
  .btn-send {
    padding: 12px 25px;
    font-size: 15px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* Game Lobby */
  .lobby-content {
    padding: 25px 20px;
  }
  
  .lobby-content h2 {
    font-size: 28px;
  }
  
  .game-pin-display {
    padding: 15px 30px;
    font-size: 16px;
  }
  
  .pin-code {
    font-size: 32px;
  }
  
  .players-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    padding: 30px 20px;
    max-width: 90vw;
  }
  
  .pin-input {
    font-size: 28px;
    letter-spacing: 6px;
  }
  
  /* Question Creation */
  .question-creation-section {
    padding: 20px 15px;
  }
  
  .question-form {
    padding: 20px 15px;
  }
  
  .correct-answer-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  /* Dashboard */
  .dashboard-container {
    padding: 0 15px;
  }
  
  .dashboard-header h1 {
    font-size: 32px;
  }
  
  .stats-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-overview-card {
    padding: 20px;
  }
  
  .stat-overview-icon {
    font-size: 42px;
  }
  
  .stat-overview-value {
    font-size: 28px;
  }
  
  .dashboard-two-column {
    grid-template-columns: 1fr;
  }
  
  .dashboard-card {
    padding: 20px;
  }
  
  .streak-number {
    font-size: 60px;
  }
  
  .streak-calendar {
    gap: 6px;
  }
  
  .streak-day {
    padding: 8px 4px;
    max-width: 45px;
  }
  
  .today-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .weak-area-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .btn-practice-weak {
    width: 100%;
  }
  
  .chart-bars {
    height: 150px;
  }
  
  /* Profile Modal */
  .profile-modal {
    width: 95vw;
    max-height: 90vh;
  }
  
  .profile-header {
    padding: 25px 15px;
    flex-direction: column;
    text-align: center;
  }
  
  .profile-info h2 {
    font-size: 28px;
  }
  
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px 15px;
  }
  
  .profile-section {
    padding: 20px 15px;
  }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
  
  .btn-hero {
    padding: 14px 30px;
    font-size: 16px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .nav-btn {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .question-text {
    font-size: 18px;
  }
  
  .answer-option {
    font-size: 15px;
    padding: 15px 12px;
  }
  
  .power-ups {
    gap: 8px;
    padding: 12px 15px;
  }
  
  .power-up {
    width: 55px;
    height: 55px;
    font-size: 24px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== MOBILE LANDSCAPE MODE ========== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 40px 20px;
  }
  
  .hero-logo-large {
    width: 80px;
    height: 80px;
  }
  
  .logo-center {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }
  
  .hero-title {
    font-size: 32px;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .game-header {
    padding: 6px 10px;
  }
  
  .question-counter {
    font-size: 14px;
  }
  
  .score-label {
    font-size: 9px;
  }
  
  .score-value {
    font-size: 16px;
  }
  
  .timer-container {
    width: 40px;
    height: 40px;
  }
  
  .timer-text {
    font-size: 14px;
  }
  
  .game-content {
    padding: 8px 10px 70px 10px;
  }
  
  .question-badge {
    font-size: 10px;
    padding: 4px 12px;
    margin-bottom: 8px;
  }
  
  .question-text {
    font-size: 15px;
    line-height: 1.3;
  }
  
  .answers-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .answers-container.enumeration-layout {
    grid-template-columns: 1fr;
  }
  
  .answer-option {
    min-height: 45px;
    padding: 10px 8px;
    font-size: 13px;
  }
  
  .power-ups {
    bottom: 5px;
    padding: 6px 10px;
    gap: 6px;
  }
  
  .power-up {
    width: 45px;
    height: 45px;
    font-size: 22px;
    border-width: 2px;
  }
  
  .power-count {
    width: 20px;
    height: 20px;
    font-size: 11px;
    top: -5px;
    right: -5px;
  }
  
  .game-exit-btn {
    bottom: 5px;
    left: 5px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .powerup-notification {
    padding: 20px 30px;
    max-width: 75vw;
  }
  
  .powerup-icon {
    font-size: 45px;
  }
  
  .powerup-text {
    font-size: 16px;
  }
}

/* Medium height landscape */
@media (min-height: 501px) and (max-height: 700px) and (orientation: landscape) {
  .game-header {
    padding: 8px 15px;
  }
  
  .question-text {
    font-size: 18px;
  }
  
  .answer-option {
    min-height: 55px;
    font-size: 14px;
  }
  
  .power-ups {
    bottom: 8px;
  }
  
  .power-up {
    width: 50px;
    height: 50px;
  }
}

@media (min-width: 768px) {
  .game-header {
    padding: 20px 40px;
  }
  
  .question-counter {
    font-size: 24px;
    min-width: 80px;
  }
  
  .timer-container {
    width: 60px;
    height: 60px;
  }
  
  .timer-text {
    font-size: 20px;
  }
  
  .score-label {
    font-size: 12px;
  }
  
  .score-value {
    font-size: 28px;
  }
  
  .score-display {
    min-width: 120px;
  }
  
  .game-content {
    padding: 40px 20px 120px 20px;
  }
  
  .question-badge {
    padding: 8px 20px;
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .question-text {
    font-size: 32px;
  }
  
  .answers-container {
    max-width: 1000px;
    gap: 20px;
  }
  
  .answer-option {
    min-height: 120px;
    padding: 30px;
    font-size: 20px;
  }
  
  .power-ups {
    bottom: 40px;
    gap: 20px;
    padding: 20px 30px;
  }
  
  .power-up {
    width: 80px;
    height: 80px;
    font-size: 36px;
  }
  
  .power-count {
    width: 32px;
    height: 32px;
    font-size: 16px;
    top: -10px;
    right: -10px;
  }
  
  .game-exit-btn {
    bottom: 40px;
    left: 40px;
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
  
  .powerup-notification {
    padding: 40px 60px;
  }
  
  .powerup-icon {
    font-size: 80px;
  }
  
  .powerup-text {
    font-size: 28px;
  }
}

/* Additional landscape improvements for taller screens */
@media (max-height: 700px) and (orientation: landscape) {
  .game-header {
    padding: 8px 12px;
  }
  
  .question-counter {
    font-size: 16px;
  }
  
  .score-value {
    font-size: 18px;
  }
  
  .timer-container {
    width: 45px;
    height: 45px;
  }
  
  .timer-ring {
    width: 45px;
    height: 45px;
  }
  
  .question-text {
    font-size: 18px;
  }
  
  .answer-option {
    min-height: 60px;
    padding: 12px 10px;
    font-size: 14px;
  }
  
  .power-ups {
    bottom: 8px;
    padding: 8px 12px;
    gap: 8px;
  }
  
  .power-up {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  
  .game-exit-btn {
    bottom: 8px;
    left: 8px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}


/* ========== VIDEO GENERATION - SINGLE VIDEO ========== */
.video-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 400px;
}

.video-card-single {
  max-width: 800px;
  width: 100%;
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow-lg);
  transition: all 0.3s ease;
  animation: slideUpFade 0.6s ease;
}

.video-card-single:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px var(--shadow-lg);
}

.video-placeholder {
  width: 100%;
  height: 400px;
  position: relative;
  overflow: hidden;
}

.video-placeholder-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  transition: all 0.5s ease;
}

.video-placeholder-icon {
  font-size: 120px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  animation: iconFloat 3s ease-in-out infinite;
  margin-bottom: 20px;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.video-card-single:hover .video-play-overlay {
  opacity: 1;
}

.video-play-button {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--primary);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  padding-left: 8px;
}

.video-play-button:hover {
  transform: scale(1.15);
  background: white;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

.video-duration {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-status {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 16px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 10px 20px;
  background: rgba(67, 233, 123, 0.95);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(67, 233, 123, 0.4);
}

.video-info {
  padding: 40px;
}

.video-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 15px;
  color: var(--text);
  line-height: 1.3;
}

.video-desc {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: 30px;
}

.video-learning-tips {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 3px solid var(--primary);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
}

.video-learning-tips h4 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-learning-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.video-learning-tips li {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
  border-bottom: 2px solid rgba(102, 126, 234, 0.1);
}

.video-learning-tips li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.video-learning-tips li strong {
  color: var(--primary);
}

.video-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.btn-play-video,
.btn-download-video {
  flex: 1;
  padding: 18px 30px;
  border: none;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-play-video {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-play-video:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.btn-download-video {
  background: white;
  color: var(--primary);
  border: 3px solid var(--primary);
  box-shadow: 0 4px 15px var(--shadow);
}

.btn-download-video:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-icon {
  font-size: 20px;
}

.video-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.video-feature {
  display: inline-block;
  padding: 10px 18px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.2s ease;
}

.video-feature:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .video-placeholder {
    height: 280px;
  }
  
  .video-placeholder-icon {
    font-size: 80px;
  }
  
  .video-play-button {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
  
  .video-info {
    padding: 25px 20px;
  }
  
  .video-title {
    font-size: 22px;
  }
  
  .video-desc {
    font-size: 15px;
  }
  
  .video-learning-tips {
    padding: 20px;
  }
  
  .video-learning-tips h4 {
    font-size: 18px;
  }
  
  .video-learning-tips li {
    font-size: 14px;
  }
  
  .video-actions {
    flex-direction: column;
  }
  
  .btn-play-video,
  .btn-download-video {
    width: 100%;
    padding: 16px 25px;
    font-size: 16px;
  }
  
  .video-duration {
    padding: 8px 14px;
    font-size: 14px;
    bottom: 15px;
    right: 15px;
  }
  
  .video-status {
    padding: 8px 16px;
    font-size: 13px;
    top: 15px;
    left: 15px;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .chat-input-area {
    padding: 12px;
    gap: 8px;
  }
  
  #chatInput {
    padding: 12px 14px;
    font-size: 14px;
    min-height: 44px;
  }
  
  #chatInput::placeholder {
    font-size: 13px;
  }
  
  .btn-send {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Landscape Mode */
@media (max-height: 600px) and (orientation: landscape) {
  .chat-messages {
    margin-bottom: 70px;
  }
  
  .chat-input-area {
    padding: 10px 15px;
  }
  
  #chatInput {
    padding: 10px 14px;
    font-size: 14px;
    min-height: 40px;
  }
  
  .btn-send {
    padding: 10px 20px;
    font-size: 14px;
  }
}



/* ========== QUESTION SOURCE SELECTION ========== */
.question-source-section {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 3px solid var(--primary);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
}

.source-section-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.source-section-subtitle {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 25px;
}

.source-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.source-option-card {
  background: white;
  border: 4px solid #e5e7eb;
  border-radius: 20px;
  padding: 30px 25px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.source-option-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-lg);
  border-color: var(--primary);
}

.source-option-card.selected {
  border-color: var(--primary);
  border-width: 5px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.source-option-card.selected::before {
  content: '✓';
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.source-icon {
  font-size: 64px;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.source-name {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}

.source-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.6;
  font-weight: 600;
  margin-bottom: 15px;
  min-height: 48px;
}

.source-badge {
  display: inline-block;
  padding: 8px 18px;
  background: var(--gradient-secondary);
  color: white;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.source-badge.ai-badge {
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Category Selection */
.category-selection-section {
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
}

.config-section-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-section-subtitle {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 20px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.category-checkbox {
  display: block;
  cursor: pointer;
}

.category-checkbox input {
  display: none;
}

.category-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  background: white;
  border: 3px solid #e5e7eb;
  border-radius: 16px;
  font-weight: 700;
  transition: all 0.2s ease;
  color: var(--text);
}

.category-checkbox:hover .category-label {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow);
}

.category-checkbox input:checked + .category-label {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.category-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.category-text {
  flex: 1;
  font-size: 15px;
}

.category-count {
  font-size: 12px;
  opacity: 0.8;
  font-weight: 600;
}

/* AI Generation Section */
.ai-generation-section {
  margin-bottom: 30px;
}

.ai-info-card {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 3px solid var(--primary);
  border-radius: 20px;
  padding: 35px;
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.ai-info-icon {
  font-size: 80px;
  flex-shrink: 0;
  animation: float 3s ease-in-out infinite;
}

.ai-info-content h3 {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 15px;
}

.ai-info-content p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  font-weight: 600;
  margin-bottom: 20px;
}

.ai-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.ai-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 8px var(--shadow);
}

.ai-feature-icon {
  font-size: 18px;
  color: var(--secondary);
}

.ai-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 16px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.ai-file-icon {
  font-size: 28px;
}

.ai-file-name {
  font-size: 16px;
  color: var(--primary);
  word-break: break-all;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .question-source-section {
    padding: 20px;
  }
  
  .source-options {
    grid-template-columns: 1fr;
  }
  
  .source-icon {
    font-size: 48px;
  }
  
  .source-name {
    font-size: 20px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .ai-info-card {
    flex-direction: column;
    padding: 25px 20px;
    text-align: center;
  }
  
  .ai-info-icon {
    font-size: 60px;
  }
  
  .ai-features {
    grid-template-columns: 1fr;
  }
}

/* ========== AI PODCAST PLAYER ========== */
.podcast-player-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 500px;
}

.podcast-player-card {
  max-width: 700px;
  width: 100%;
  background: white;
  border-radius: 32px;
  padding: 40px;
  box-shadow: 0 20px 60px var(--shadow-lg);
  animation: slideUpFade 0.6s ease;
}

.podcast-cover {
  width: 200px;
  height: 200px;
  margin: 0 auto 30px;
  background: var(--gradient-primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.podcast-cover-icon {
  font-size: 100px;
  z-index: 10;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
  animation: float 3s ease-in-out infinite;
}

.podcast-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.podcast-info {
  text-align: center;
  margin-bottom: 35px;
  padding: 0 20px;
}

.podcast-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}

.podcast-episode {
  font-size: 16px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
}

.podcast-episode span {
  font-weight: 900;
}

.podcast-description {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  font-weight: 600;
}

.podcast-controls {
  background: var(--bg);
  border-radius: 24px;
  padding: 30px;
  margin-bottom: 30px;
}

.podcast-timeline {
  margin-bottom: 25px;
}

.podcast-progress-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  margin-bottom: 12px;
}

.podcast-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 10px;
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.podcast-progress-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: white;
  border: 4px solid var(--primary);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transition: transform 0.2s ease;
}

.podcast-progress-handle:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.podcast-progress-handle:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1);
}

.podcast-time {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}

.podcast-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.podcast-btn {
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: white;
  box-shadow: 0 6px 20px var(--shadow);
}

.podcast-btn-primary {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.podcast-btn-primary:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.podcast-btn-primary:active {
  transform: scale(1.05);
}

.play-icon {
  font-size: 32px;
}

.podcast-btn-secondary {
  width: 60px;
  height: 60px;
  font-size: 24px;
}

.podcast-btn-secondary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px var(--shadow-lg);
}

.podcast-btn-secondary:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
}

.podcast-features {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.podcast-feature-btn {
  padding: 12px 20px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 16px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--shadow);
}

.podcast-feature-btn:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.feature-icon {
  font-size: 18px;
}

.feature-text {
  font-size: 14px;
  font-weight: 700;
}

.podcast-topics {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 3px solid var(--primary);
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 25px;
}

.podcast-topics h3 {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 20px;
}

.topics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: white;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  border-left: 4px solid var(--primary);
}

.topic-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 15px var(--shadow);
}

.topic-time {
  font-size: 13px;
  font-weight: 900;
  color: var(--primary);
  min-width: 50px;
}

.topic-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.podcast-benefits {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 3px solid var(--secondary);
  border-radius: 20px;
  padding: 25px;
}

.podcast-benefits h3 {
  font-size: 20px;
  font-weight: 900;
  color: var(--secondary);
  margin-bottom: 20px;
  text-align: center;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px;
  background: white;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all 0.2s ease;
}

.benefit-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px var(--shadow-lg);
}

.benefit-icon {
  font-size: 28px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .podcast-player-card {
    padding: 30px 20px;
  }
  
  .podcast-cover {
    width: 160px;
    height: 160px;
  }
  
  .podcast-cover-icon {
    font-size: 80px;
  }
  
  .podcast-title {
    font-size: 24px;
  }
  
  .podcast-episode {
    font-size: 14px;
  }
  
  .podcast-description {
    font-size: 14px;
  }
  
  .podcast-controls {
    padding: 20px;
  }
  
  .podcast-btn-primary {
    width: 70px;
    height: 70px;
  }
  
  .play-icon {
    font-size: 28px;
  }
  
  .podcast-btn-secondary {
    width: 55px;
    height: 55px;
    font-size: 20px;
  }
  
  .podcast-features {
    flex-direction: column;
  }
  
  .podcast-feature-btn {
    width: 100%;
    justify-content: center;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .podcast-cover {
    width: 140px;
    height: 140px;
  }
  
  .podcast-cover-icon {
    font-size: 70px;
  }
  
  .podcast-title {
    font-size: 20px;
  }
  
  .podcast-buttons {
    gap: 15px;
  }
  
  .podcast-btn-primary {
    width: 65px;
    height: 65px;
  }
  
  .play-icon {
    font-size: 24px;
  }
  
  .podcast-btn-secondary {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}

/* ========== LOADING SCREEN MOBILE FIXES ========== */

/* Tablets and Small Devices */
@media (max-width: 768px) {
  .loading-content {
    padding: 30px 20px;
    max-width: 90vw;
  }
  
  .loading-spinner {
    width: 60px;
    height: 60px;
    border-width: 5px;
    margin-bottom: 20px;
  }
  
  .loading-title {
    font-size: 22px;
    margin-bottom: 12px;
  }
  
  .loading-subtitle {
    font-size: 14px;
    margin-bottom: 25px;
  }
  
  .loading-progress {
    margin-bottom: 30px;
  }
  
  .loading-steps {
    gap: 12px;
  }
  
  .loading-step {
    padding: 12px 15px;
    font-size: 14px;
    gap: 10px;
  }
  
  .step-icon {
    font-size: 20px;
  }
  
  .step-indicator {
    font-size: 18px;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .loading-content {
    padding: 25px 15px;
    max-width: 95vw;
    border-radius: 20px;
  }
  
  .loading-spinner {
    width: 50px;
    height: 50px;
    border-width: 4px;
    margin-bottom: 15px;
  }
  
  .loading-title {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.3;
  }
  
  .loading-subtitle {
    font-size: 12px;
    margin-bottom: 20px;
  }
  
  .loading-progress {
    height: 6px;
    margin-bottom: 25px;
  }
  
  .loading-steps {
    gap: 10px;
  }
  
  .loading-step {
    padding: 10px 12px;
    font-size: 13px;
    gap: 8px;
    border-left-width: 3px;
  }
  
  .loading-step.active {
    transform: translateX(3px);
  }
  
  .step-icon {
    font-size: 18px;
  }
  
  .step-text {
    font-size: 12px;
  }
  
  .step-indicator {
    font-size: 16px;
  }
}

/* Landscape Mode on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
  .loading-content {
    padding: 20px 15px;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    margin-bottom: 12px;
  }
  
  .loading-title {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .loading-subtitle {
    font-size: 11px;
    margin-bottom: 15px;
  }
  
  .loading-progress {
    height: 5px;
    margin-bottom: 20px;
  }
  
  .loading-steps {
    gap: 8px;
  }
  
  .loading-step {
    padding: 8px 10px;
    font-size: 12px;
  }
  
  .step-icon {
    font-size: 16px;
  }
  
  .step-indicator {
    font-size: 14px;
  }
}