:root {
  --gradient-start: #6e8efb;
  --gradient-end: #a777e3;
  --neon-accent: #ff7de9;
  --neon-accent-2: #8be9fd;
  --dark-bg: #0e0e17;
  --dark-bg-alt: #1c1c2e;
  --panel-bg: #1f2130;
  --text-primary: #e2e6f0;
  --text-dim: #9aa2b4;
}

body.theme-neon {
  background: linear-gradient(180deg, var(--dark-bg) 0%, var(--dark-bg-alt) 100%);
  color: var(--text-primary);
  font-family: 'Roboto', var(--font-family, 'Inter', sans-serif);
}

/* Shared hero styling adopting sample gradient */
.hero, .neon-hero, .hero-section {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
}

.hero:before, .neon-hero:before, .hero-section:before {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 180%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), rgba(255,255,255,0) 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Feature cards neon adaptation */
body.theme-neon .feature-card {
  background: var(--panel-bg);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-primary);
}
body.theme-neon .feature-card:hover {
  box-shadow: 0 6px 24px -4px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
}

/* CTA section */
body.theme-neon .cta {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
}
body.theme-neon .cta button {
  background: var(--panel-bg);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
}
body.theme-neon .cta button:hover {
  background: #2b2f44;
}

/* Navigation tweaks */
body.theme-neon .main-header {
  background: rgba(20,22,34,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.theme-neon .nav-menu a {
  color: var(--text-primary);
}
body.theme-neon .nav-menu a:hover { color: var(--neon-accent-2); }

/* Category tabs & module list (AfterTimeFault) */
body.theme-neon .category-tabs { padding-top: 4px; }

/* Ensure mobile menu button is accessible */
body.theme-neon .open-nav-btn {
  position: fixed !important;
  top: 70px !important;
  left: 20px !important;
  z-index: 1003 !important;
  background-color: rgba(20,22,34,0.9) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: var(--text-primary) !important;
}

/* Mobile sidebar styling */
body.theme-neon .sidenav {
  background-color: rgba(20,22,34,0.98) !important;
  z-index: 1002 !important;
  backdrop-filter: blur(15px);
}

body.theme-neon .sidenav a {
  color: var(--text-primary) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.theme-neon .sidenav a:hover {
  color: var(--neon-accent-2) !important;
  background: rgba(255,255,255,0.05);
  border: 1px solid #333a55;
}
body.theme-neon .sidenav .closebtn { color: var(--text-primary) !important; z-index: 1200 !important; }

/* Category tab styling */
body.theme-neon .category-tab:hover { color: #fff; border-color: #465072; }
body.theme-neon .category-tab.active {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  box-shadow: 0 0 8px rgba(174,144,255,0.8), 0 0 16px rgba(110,142,251,0.4);
  border-color: transparent;
}

/* Module list and button styles */
body.theme-neon .modules-list { padding-right: 4px; }
body.theme-neon .module-button {
  background: #24273a;
  color: var(--text-dim);
  border: 1px solid #333a55;
  font-size: 0.85rem;
}
body.theme-neon .module-button:hover {
  color: #fff;
  border-color: #4c567c;
  transform: translateX(6px) translateY(-2px);
  box-shadow: 0 6px 18px -2px rgba(0,0,0,0.55);
}
body.theme-neon .module-button.active {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 0 10px rgba(110,142,251,0.9), 0 0 24px rgba(167,119,227,0.5);
}

/* Module detail styling */
body.theme-neon .module-detail {
  background: var(--panel-bg);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
body.theme-neon .module-detail:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.04);
  mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  mask-composite: exclude;
  padding: 1px;
  border-radius: 12px;
}
body.theme-neon #module-title { color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.4); }

/* Links inside content */
body.theme-neon a { color: var(--gradient-end); }
body.theme-neon a:hover { color: var(--neon-accent); }

/* Video thumbnail styling alignment */
body.theme-neon .video-thumb { position: relative; }
body.theme-neon .video-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  text-shadow: 0 0 12px rgba(0,0,0,0.8);
  pointer-events: none;
}

/* Footer */
body.theme-neon footer { background: #141626; color: #7d8597; border-top: 1px solid rgba(255,255,255,0.08); }
body.theme-neon footer a { color: var(--neon-accent-2); }

/* Scrollbars (webkit) */
body.theme-neon ::-webkit-scrollbar { width: 10px; }
body.theme-neon ::-webkit-scrollbar-track { background: #1b1e2c; }
body.theme-neon ::-webkit-scrollbar-thumb { background: #31364b; border-radius: 6px; }
body.theme-neon ::-webkit-scrollbar-thumb:hover { background: #3f4661; }

/* NEW: Override default light main background & generic white panels */
body.theme-neon main { background: transparent !important; }
body.theme-neon .modules-column, body.theme-neon .details-column { background: transparent; }
body.theme-neon .feature-card, body.theme-neon .module-detail { box-shadow: 0 4px 20px -4px rgba(0,0,0,0.6); }
body.theme-neon .sidebar { background: #181a27; border-right: 1px solid rgba(255,255,255,0.06); }
body.theme-neon .sidebar a.active { background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)); color:#fff; }

/* Global neon purple-blue heading styles for theme-neon */
body.theme-neon h1 {
  color: #6C5CE7; /* primary neon purple */
  text-shadow: 0 0 12px rgba(108,92,231,0.65), 0 0 28px rgba(77,166,255,0.18);
}

body.theme-neon h2 {
  color: #7F93FF; /* lighter purple-blue */
  text-shadow: 0 0 10px rgba(127,147,255,0.55), 0 0 20px rgba(77,166,255,0.12);
}

body.theme-neon h3 {
  color: #9FB7FF; /* subtle neon blue for smaller headings */
  text-shadow: 0 0 8px rgba(159,183,255,0.5), 0 0 14px rgba(77,166,255,0.10);
}
