* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #050508;
  color: #f0f0ff;
  overflow-x: hidden;
}
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: rgba(5,5,8,0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: 1px; }
.nav-logo strong { font-weight: 700; }
.logo-icon-sm {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #06F, #7C3AED, #FF1493);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #050508;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }

.course-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
  position: relative;
}
.course-hero-content { max-width: 700px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  background: rgba(0,102,255,0.08);
  border: 1px solid rgba(0,102,255,0.15);
  color: #60A5FA;
}
.course-hero h1 { font-size: clamp(40px, 8vw, 72px); font-weight: 900; line-height: 1.05; margin-bottom: 16px; }
.gradient-text {
  background: linear-gradient(135deg, #06F, #7C3AED, #FF1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradShift 4s ease-in-out infinite;
}
@keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.course-hero p { font-size: 18px; color: rgba(255,255,255,0.4); line-height: 1.7; max-width: 500px; margin: 0 auto 32px; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, #06F, #7C3AED, #FF1493);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  animation: gradShift 4s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(0,102,255,0.2);
  transition: transform 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(0,102,255,0.35); }
.course-switcher { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.cs-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.4);
  transition: all 0.2s;
}
.cs-btn:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); transform: translateY(-1px); }
.cs-btn.active {
  background: rgba(124,58,237,0.16);
  border-color: rgba(124,58,237,0.35);
  color: #c4b5fd;
  box-shadow: 0 0 24px rgba(124,58,237,0.12);
  font-weight: 700;
}
.course-stats { display: flex; justify-content: center; gap: 40px; margin-top: 32px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, #60A5FA, #A78BFA); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.25); text-transform: uppercase; letter-spacing: 1px; }

.section { padding: 80px 24px 100px; position: relative; z-index: 1; }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 48px; }
.section-header h2 { font-size: 36px; font-weight: 800; margin-bottom: 12px; background: linear-gradient(135deg, #06F, #7C3AED, #FF1493); background-size: 200% 200%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: gradShift 4s ease-in-out infinite; }
.section-header p { color: rgba(255,255,255,0.35); font-size: 16px; }

.module-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.module-card {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.module-card:hover { border-color: rgba(124,58,237,0.15); }
.module-card.open { border-color: rgba(124,58,237,0.2); }
.module-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  position: relative;
}
.module-num {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #06F, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 48px;
}
.module-info { flex: 1; }
.module-info h3 { font-size: 18px; font-weight: 700; }
.module-info p { font-size: 13px; color: rgba(255,255,255,0.3); margin-top: 2px; }
.module-arrow { font-size: 20px; color: rgba(255,255,255,0.15); transition: transform 0.3s; }
.module-card.open .module-arrow { transform: rotate(90deg); color: rgba(168,85,247,0.5); }
.module-body { display: none; border-top: 1px solid rgba(255,255,255,0.03); }
.module-body.open { display: block; }
.lesson {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px 14px 40px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}
.lesson:last-child { border-bottom: none; }
.lesson:hover { background: rgba(124,58,237,0.04); }
.lesson-num { font-size: 13px; font-weight: 600; color: rgba(168,85,247,0.5); min-width: 32px; }
.lesson div { flex: 1; }
.lesson strong { font-size: 14px; font-weight: 600; display: block; }
.lesson span:not(.lesson-num):not(.lesson-read) { font-size: 12px; color: rgba(255,255,255,0.25); }
.lesson-read { font-size: 12px; color: rgba(168,85,247,0.4); font-weight: 600; }
.lesson.coming-soon { cursor: default; opacity: 0.4; justify-content: center; padding-left: 24px; }

/* Lesson Modal */
.lesson-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,4,12,0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lesson-overlay.active { display: flex; }
.lesson-modal {
  background: linear-gradient(160deg, rgba(12,12,30,0.98), rgba(4,4,12,0.98));
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 44px 36px;
  position: relative;
  animation: modalIn 0.3s ease-out;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.lesson-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none;
  color: rgba(255,255,255,0.2);
  font-size: 24px;
  cursor: pointer;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.lesson-close:hover { background: rgba(255,255,255,0.04); color: #fff; }
#lesson-content h2 { font-size: 28px; font-weight: 800; margin-bottom: 24px; background: linear-gradient(135deg, #60A5FA, #A78BFA); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
#lesson-content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 12px; color: rgba(255,255,255,0.8); }
#lesson-content p { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
#lesson-content ul, #lesson-content ol { margin: 12px 0 16px 20px; }
#lesson-content li { font-size: 15px; line-height: 1.8; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
#lesson-content li strong { color: rgba(255,255,255,0.7); }
.lesson-modal::-webkit-scrollbar { width: 4px; }
.lesson-modal::-webkit-scrollbar-track { background: transparent; }
.lesson-modal::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.15); border-radius: 4px; }

.footer {
  padding: 40px 24px;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.02);
}
.footer-content { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-logo { font-size: 14px; letter-spacing: 1px; font-weight: 700; background: linear-gradient(135deg, #60A5FA, #A78BFA); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.2); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: rgba(255,255,255,0.5); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.1); }

.chart-img {
  width: 100%;
  max-width: 640px;
  border-radius: 12px;
  margin: 20px 0 8px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s, transform 0.2s;
}
.chart-img:hover { border-color: rgba(124,58,237,0.2); }
.chart-img.expanded {
  max-width: 100%;
  cursor: zoom-out;
}
.chart-caption {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  text-align: center;
  margin-bottom: 20px;
  font-style: italic;
}

@media (max-width: 600px) {
  .nav { padding: 12px 16px; }
  .module-header { padding: 16px 18px; }
  .lesson { padding: 12px 18px 12px 24px; }
  .lesson-modal { padding: 32px 20px; }
  .course-stats { gap: 24px; }
}
