
/* ============================================
   LEARN EARN — PREMIUM UI v3
   10 Fitur: dark mode, sound, haptic, dll
   ============================================ */

:root {
  --grad-hero: linear-gradient(135deg, #58cc02 0%, #89e219 50%, #a3e635 100%);
  --grad-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #fbbf24 100%);
  --grad-blue: linear-gradient(135deg, #1cb0f6 0%, #3b82f6 100%);
  --grad-purple: linear-gradient(135deg, #ce82ff 0%, #a855f7 100%);
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.14);
  --shadow-glow: 0 8px 32px rgba(88,204,2,0.35);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-theme: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-theme="dark"] {
  --text: #e5e7eb;
  --text-light: #9ca3af;
  --text-muted: #6b7280;
  --bg: #1a1a1a;
  --bg-alt: #0f0f0f;
  --border: #2d2d2d;
  --gray: #2d2d2d;
}
[data-theme="dark"] body {
  background: #0a0a0a;
  color: #e5e7eb;
}
[data-theme="dark"] body::before {
  opacity: 0.4;
}
[data-theme="dark"] .app-header,
[data-theme="dark"] .bottom-nav {
  background: rgba(20,20,20,0.85) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .lesson-card,
[data-theme="dark"] .game-card,
[data-theme="dark"] .achievement-card,
[data-theme="dark"] .order-card,
[data-theme="dark"] .help-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .reward-missions,
[data-theme="dark"] .reward-ads-section,
[data-theme="dark"] .reward-history,
[data-theme="dark"] .reward-withdraw-section,
[data-theme="dark"] .modal-content {
  background: rgba(30,30,30,0.9) !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: #e5e7eb;
}
[data-theme="dark"] .page-header h1 {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="dark"] .order-summary,
[data-theme="dark"] .wd-info-box,
[data-theme="dark"] .payment-notice {
  background: rgba(255,255,255,0.05) !important;
  color: #e5e7eb;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1f1f1f !important;
  color: #e5e7eb !important;
  border-color: #333 !important;
}
[data-theme="dark"] .wa-app {
  filter: brightness(0.85) contrast(1.05);
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 9997;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s var(--ease-bounce);
}
.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}
.theme-toggle:active {
  transform: scale(0.95);
}
[data-theme="dark"] .theme-toggle {
  background: rgba(30,30,30,0.95);
  border-color: rgba(255,255,255,0.1);
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
body::before {
  animation: bgShift 20s ease-in-out infinite;
}
@keyframes bgShift {
  0%, 100% {
    background:
      radial-gradient(at 20% 20%, rgba(88,204,2,0.15) 0%, transparent 50%),
      radial-gradient(at 80% 40%, rgba(28,176,246,0.12) 0%, transparent 50%),
      radial-gradient(at 40% 80%, rgba(206,130,255,0.10) 0%, transparent 50%);
  }
  33% {
    background:
      radial-gradient(at 80% 20%, rgba(88,204,2,0.15) 0%, transparent 50%),
      radial-gradient(at 20% 60%, rgba(28,176,246,0.12) 0%, transparent 50%),
      radial-gradient(at 60% 30%, rgba(206,130,255,0.10) 0%, transparent 50%);
  }
  66% {
    background:
      radial-gradient(at 50% 80%, rgba(88,204,2,0.15) 0%, transparent 50%),
      radial-gradient(at 70% 20%, rgba(28,176,246,0.12) 0%, transparent 50%),
      radial-gradient(at 10% 50%, rgba(206,130,255,0.10) 0%, transparent 50%);
  }
}

/* ============================================
   HEADER GLASSMORPHISM
   ============================================ */
.app-header {
  background: rgba(255,255,255,0.75) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.6) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04) !important;
}
.brand-logo {
  animation: logoFloat 3s ease-in-out infinite;
  transition: transform 0.3s var(--ease-bounce);
}
.brand-logo:hover {
  transform: rotate(-8deg) scale(1.1);
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-3px) rotate(-2deg); }
}
.stat {
  transition: all 0.25s var(--ease-bounce);
  cursor: pointer;
}
.stat:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stat:active {
  transform: translateY(0) scale(0.98);
}
#stat-streak {
  display: inline-block;
  animation: streakFire 1.5s ease-in-out infinite;
}
@keyframes streakFire {
  0%, 100% { transform: scale(1) rotate(-3deg); filter: brightness(1); }
  50% { transform: scale(1.15) rotate(3deg); filter: brightness(1.3); }
}
.level-progress {
  background: var(--grad-hero) !important;
  position: relative;
  overflow: hidden;
}
.level-progress::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shineMove 2s infinite;
}
@keyframes shineMove {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================================
   BOTTOM NAV FLOATING
   ============================================ */
.bottom-nav {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(28px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
  border-top: 1px solid rgba(255,255,255,0.7) !important;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.06) !important;
}
.nav-btn {
  transition: all 0.25s var(--ease-bounce);
  position: relative;
}
.nav-btn.active {
  color: var(--green) !important;
}
.nav-btn.active .nav-icon {
  transform: scale(1.25) translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(88,204,2,0.4));
  animation: navBounce 0.4s var(--ease-bounce);
}
.nav-btn:active {
  transform: scale(0.92);
}
@keyframes navBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.35) translateY(-4px); }
  100% { transform: scale(1.25) translateY(-2px); }
}
.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: navPulse 2s infinite;
}
@keyframes navPulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateX(-50%) scale(1.5); }
}

/* ============================================
   CARDS GLASS + HOVER LIFT
   ============================================ */
.lesson-card,
.game-card,
.achievement-card,
.order-card,
.help-card,
.reward-missions,
.reward-ads-section,
.reward-history,
.reward-withdraw-section {
  background: rgba(255,255,255,0.85) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.9) !important;
  transition: all 0.3s var(--ease-smooth);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.lesson-card:hover,
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green) !important;
}
.lesson-card::before,
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transition: left 0.6s;
  pointer-events: none;
}
.lesson-card:hover::before,
.game-card:hover::before {
  left: 100%;
}
.lesson-card,
.game-card,
.achievement-card {
  animation: cardFadeIn 0.4s var(--ease-smooth) backwards;
}
.lesson-card:nth-child(1) { animation-delay: 0.02s; }
.lesson-card:nth-child(2) { animation-delay: 0.04s; }
.lesson-card:nth-child(3) { animation-delay: 0.06s; }
.lesson-card:nth-child(4) { animation-delay: 0.08s; }
.lesson-card:nth-child(5) { animation-delay: 0.10s; }
.lesson-card:nth-child(6) { animation-delay: 0.12s; }
.lesson-card:nth-child(7) { animation-delay: 0.14s; }
.lesson-card:nth-child(8) { animation-delay: 0.16s; }
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   BUTTONS GRADIENT + PRESS
   ============================================ */
.btn-primary {
  background: var(--grad-hero) !important;
  box-shadow: 0 4px 0 var(--green-dark), 0 8px 24px rgba(88,204,2,0.3) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.2s var(--ease-smooth);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--green-dark), 0 12px 32px rgba(88,204,2,0.4) !important;
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-dark) !important;
}
.btn-google {
  background: linear-gradient(135deg, #4285f4, #34a853) !important;
  box-shadow: 0 4px 0 #2c5aa0, 0 8px 24px rgba(66,133,244,0.3) !important;
}

/* ============================================
   PAGE HEADER GRADIENT
   ============================================ */
.page-header h1 {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
  letter-spacing: -1px;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  padding: 14px 22px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast-success {
  background: linear-gradient(135deg, #58cc02, #89e219) !important;
}
.toast-error {
  background: linear-gradient(135deg, #ff4b4b, #ea2b2b) !important;
}

/* ============================================
   MODAL SLIDE-UP
   ============================================ */
.modal-content {
  animation: modalSlideUp 0.35s var(--ease-smooth) !important;
}
@keyframes modalSlideUp {
  from { transform: translateY(100%); opacity: 0.8; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-header {
  background-size: 200% 100% !important;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ============================================
   PROFILE CARD PREMIUM
   ============================================ */
.profile-card {
  background: var(--grad-hero) !important;
  background-size: 200% 200% !important;
  animation: gradientShift 8s ease infinite;
  box-shadow: var(--shadow-glow) !important;
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 60%);
  animation: rotate 15s linear infinite;
}
@keyframes rotate {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.profile-avatar {
  animation: avatarFloat 3s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-msg {
  text-align: center;
  padding: 60px 20px !important;
  color: var(--text-light) !important;
  font-size: 14px;
  font-weight: 600;
}
.empty-msg::before {
  content: '📭';
  display: block;
  font-size: 60px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
  filter: grayscale(0.3);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
  transition: all 0.3s var(--ease-bounce);
  background: rgba(255,255,255,0.9) !important;
  backdrop-filter: blur(10px);
}
.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-md);
}
.stat-card-icon {
  font-size: 24px !important;
  transition: transform 0.3s var(--ease-bounce);
}
.stat-card:hover .stat-card-icon {
  transform: scale(1.2) rotate(-8deg);
}

/* ============================================
   ACHIEVEMENT POPUP SHIMMER
   ============================================ */
.achievement-popup {
  background: var(--grad-gold) !important;
  background-size: 200% 200%;
  animation: shimmerGold 2s infinite, popIn 0.5s var(--ease-bounce);
  box-shadow: 0 8px 32px rgba(251,191,36,0.5), 0 0 0 4px rgba(255,255,255,0.2) !important;
}
@keyframes shimmerGold {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes popIn {
  0% { transform: translateX(-50%) translateY(-20px) scale(0.5); opacity: 0; }
  60% { transform: translateX(-50%) translateY(0) scale(1.05); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}

/* ============================================
   PROGRESS RING (Profile)
   ============================================ */
.progress-ring-wrap {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  position: relative;
}
.progress-ring {
  transform: rotate(-90deg);
  filter: drop-shadow(0 4px 16px rgba(88,204,2,0.3));
}
.progress-ring circle {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
}
.progress-ring .ring-bg {
  stroke: rgba(0,0,0,0.08);
}
.progress-ring .ring-fill {
  stroke: url(#ringGradient);
  stroke-dasharray: 439.8;
  stroke-dashoffset: 439.8;
  transition: stroke-dashoffset 1.5s var(--ease-smooth);
}
.progress-ring-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.progress-ring-label .num {
  font-size: 32px;
  font-weight: 900;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.progress-ring-label .txt {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   LEADERBOARD
   ============================================ */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.9);
  border-radius: 14px;
  transition: all 0.3s var(--ease-smooth);
  border: 1px solid rgba(0,0,0,0.04);
}
.lb-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}
.lb-item.top-1 {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
}
.lb-item.top-2 {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-color: #9ca3af;
}
.lb-item.top-3 {
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  border-color: #ea580c;
}
.lb-rank {
  font-size: 20px;
  font-weight: 900;
  min-width: 32px;
  text-align: center;
}
.lb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.lb-info {
  flex: 1;
  min-width: 0;
}
.lb-name {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-xp {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
}
.lb-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--green);
  flex-shrink: 0;
}

/* ============================================
   DAILY REWARDS CALENDAR
   ============================================ */
.daily-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 16px 0;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  background: rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.3s var(--ease-bounce);
  position: relative;
  cursor: pointer;
}
.cal-day:hover {
  transform: scale(1.1);
}
.cal-day.claimed {
  background: var(--grad-hero);
  color: white;
  box-shadow: 0 4px 12px rgba(88,204,2,0.3);
}
.cal-day.today {
  background: var(--grad-gold);
  color: white;
  animation: calPulse 1.5s infinite;
  box-shadow: 0 4px 12px rgba(251,191,36,0.4);
}
.cal-day.missed {
  background: rgba(255,75,75,0.15);
  color: #ff4b4b;
}
.cal-day .num {
  font-size: 14px;
  font-weight: 900;
}
.cal-day .icon {
  font-size: 14px;
}
@keyframes calPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ============================================
   LOADING SCREEN
   ============================================ */
#premium-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #58cc02, #89e219);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999998;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#premium-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#premium-loader .logo {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 900;
  color: #58cc02;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: loaderPulse 1.5s ease-in-out infinite;
}
#premium-loader .progress-bar {
  width: 200px;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 999px;
  margin-top: 24px;
  overflow: hidden;
}
#premium-loader .progress-fill {
  height: 100%;
  background: white;
  border-radius: 999px;
  width: 0%;
  transition: width 0.3s ease;
}
#premium-loader .txt {
  color: white;
  font-size: 13px;
  font-weight: 700;
  margin-top: 12px;
  opacity: 0.9;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ============================================
   PULL TO REFRESH
   ============================================ */
.pull-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--grad-hero);
  color: white;
  padding: 10px 20px;
  border-radius: 0 0 20px 20px;
  font-size: 13px;
  font-weight: 800;
  z-index: 9999;
  transition: transform 0.3s var(--ease-smooth);
  box-shadow: 0 4px 16px rgba(88,204,2,0.4);
}
.pull-indicator.show {
  transform: translateX(-50%) translateY(0);
}
.pull-indicator.loading .icon {
  animation: spin 1s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar-wrap {
  position: sticky;
  top: 120px;
  z-index: 50;
  margin-bottom: 16px;
  padding: 0 4px;
}
.search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s var(--ease-smooth);
}
.search-bar:focus-within {
  border-color: var(--green);
  box-shadow: 0 8px 32px rgba(88,204,2,0.2);
  transform: scale(1.02);
}
.search-bar .icon {
  font-size: 18px;
  color: var(--text-muted);
}
.search-bar input {
  flex: 1;
  border: none !important;
  outline: none;
  background: transparent !important;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  padding: 0 !important;
}
.search-bar input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}
.search-bar .clear {
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
}
.search-bar .clear:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text);
}
[data-theme="dark"] .search-bar {
  background: rgba(30,30,30,0.95);
  border-color: rgba(255,255,255,0.08);
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 8px;
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
  background-size: 200% 100%;
}
@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   HAPTIC FEEDBACK (visual hint saat getar)
   ============================================ */
.haptic-flash {
  animation: hapticFlash 0.15s ease;
}
@keyframes hapticFlash {
  0% { transform: scale(1); }
  50% { transform: scale(0.97); filter: brightness(0.95); }
  100% { transform: scale(1); }
}

/* ============================================
   MOBILE POLISH
   ============================================ */
@media (max-width: 480px) {
  .page-header h1 {
    font-size: 24px !important;
  }
  .bottom-nav {
    padding: 8px 4px max(8px, env(safe-area-inset-bottom)) !important;
  }
  .nav-icon {
    font-size: 22px !important;
  }
  .lesson-card {
    padding: 12px !important;
  }
  .theme-toggle {
    top: 70px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

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