/* ========= THEME TOGGLE BUTTON ========= */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: rgba(139, 92, 246, 0.06);
  color: var(--text-muted);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--accent-primary-light);
  transform: scale(1.05);
}

/* Sun & Moon icons */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode: show moon, hide sun */
.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* ========= LIGHT THEME OVERRIDES ========= */

/* Navbar */
[data-theme="light"] .navbar {
  background: rgba(248, 249, 252, 0.8);
  border-bottom-color: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 249, 252, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-bottom-color: rgba(139, 92, 246, 0.08);
}
[data-theme="light"] .navbar::after {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(139, 92, 246, 0.12) 20%,
    rgba(59, 130, 246, 0.08) 50%,
    rgba(6, 182, 212, 0.12) 80%,
    transparent 100%
  );
}
[data-theme="light"] .logo-icon {
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2);
}
[data-theme="light"] .logo-text {
  background: linear-gradient(135deg, #7c3aed, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Mobile menu */
[data-theme="light"] .nav-links.mobile-open {
  background: rgba(248, 249, 252, 0.98);
  border-bottom-color: rgba(15, 23, 42, 0.06);
}

/* Sync button */
[data-theme="light"] .sync-btn {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}
[data-theme="light"] .sync-btn:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
}

/* Hero section */
[data-theme="light"] .hero-bg::before {
  background:
    radial-gradient(ellipse 800px 600px at 20% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 80% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 500px 500px at 50% 80%, rgba(6, 182, 212, 0.04) 0%, transparent 70%);
}
[data-theme="light"] .hero-bg::after {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
}
[data-theme="light"] .hero-badge {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}
[data-theme="light"] .hero-title .gradient-text {
  background: linear-gradient(135deg, #7c3aed, #2563eb, #059669);
  -webkit-background-clip: text;
  background-clip: text;
}
[data-theme="light"] .particle {
  background: rgba(139, 92, 246, 0.2);
}

/* Stats */
[data-theme="light"] .stats-bar {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .stat-number {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Section tags */
[data-theme="light"] .section-tag {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

/* Search */
[data-theme="light"] .search-box input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .search-box input:focus {
  background: #ffffff;
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}
[data-theme="light"] .filter-btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .filter-btn:hover {
  background: rgba(139, 92, 246, 0.06);
}

/* Course cards */
[data-theme="light"] .course-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .course-card:hover {
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 0 40px rgba(139, 92, 246, 0.05);
}
[data-theme="light"] .card-footer {
  border-top-color: rgba(15, 23, 42, 0.06);
}

/* Feature cards */
[data-theme="light"] .feature-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(15, 23, 42, 0.05);
}
[data-theme="light"] .feature-card:hover {
  border-color: rgba(139, 92, 246, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .feature-card::before {
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
}

/* CTA */
[data-theme="light"] .cta-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(59, 130, 246, 0.04));
  border-color: rgba(139, 92, 246, 0.1);
}

/* Footer */
[data-theme="light"] .footer {
  background: #f0f2f8;
  border-top-color: rgba(15, 23, 42, 0.06);
}

/* Badges */
[data-theme="light"] .badge-beginner { background: rgba(16, 185, 129, 0.08); }
[data-theme="light"] .badge-intermediate { background: rgba(245, 158, 11, 0.08); }
[data-theme="light"] .badge-advanced { background: rgba(239, 68, 68, 0.08); }

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f2f8; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #cbd5e1; }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Selection */
[data-theme="light"] ::selection { background: rgba(139, 92, 246, 0.15); color: #0f172a; }

/* User dropdown */
[data-theme="light"] .user-dropdown {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .user-dropdown-item:hover {
  background: rgba(239, 68, 68, 0.06);
}

/* ========= Course Player Light Theme ========= */
[data-theme="light"] .course-page {
  background: var(--bg-primary);
}
[data-theme="light"] .player-area {
  background: var(--bg-primary);
}
[data-theme="light"] .video-wrapper {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .playlist-sidebar {
  background: var(--bg-secondary);
  border-left-color: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .playlist-header {
  border-bottom-color: rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .module-header {
  background: rgba(139, 92, 246, 0.04);
}
[data-theme="light"] .video-item:hover {
  background: rgba(139, 92, 246, 0.04);
}
[data-theme="light"] .video-item.active {
  background: rgba(139, 92, 246, 0.08);
}
