:root {
  --bg: #0a0e1a;
  --card: #1a1f2e;
  --muted: #9aa4bf;
  --text: #e9ecf5;
  --primary: #f4b942;
  --primary-600: #e5a832;
  --accent: #8b5cf6;
  --warning: #ffd700;
  --danger: #ff4757;
  --shadow: 0 20px 40px rgba(0,0,0,.4);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1140px;
}

/* Light mode variables */
.light-mode {
  --bg: #fffdf8;
  --card: #fff7e3d6;
  --muted: #495057;
  --text: #212529;
  --primary: #f4b942;
  --primary-600: #e5a832;
  --accent: #8b5cf6;
  --warning: #ffd700;
  --danger: #ff4757;
  --shadow: 0 20px 40px rgba(0,0,0,.15);
}

/* Dark mode only */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; font-family: 'Cairo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #c393ff; background: radial-gradient(1200px 600px at 80% -10%, #2d1b47 0%, rgba(45,27,71,0) 60%), radial-gradient(900px 500px at -10% 20%, #1a2d5a 0%, rgba(26,45,90,0) 60%), var(--bg); animation: background-float 20s ease-in-out infinite; }
@keyframes background-float {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
header { position: sticky; padding: 7px; top: 0; z-index: 100; backdrop-filter: saturate(1.2) blur(10px); background: rgba(10,14,26,.7); border-bottom: 1px solid rgba(255,255,255,.08); }
.nav { display:flex; align-items:center; justify-content:space-between; gap:20px; padding: 14px 0; }
.brand { display:flex; align-items:center; gap:12px; font-weight:800; letter-spacing:.2px; font-size: 1.05rem; }
.brand .logo { width:40px; height:40px; display:grid; place-items:center; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: var(--shadow); }
nav ul { display:flex; gap:14px; list-style:none; margin:0; padding:0; align-items:center; }
nav a { padding:10px 14px; border-radius: 10px; color:#ffcb7a; font-weight:600; }
nav a:hover { background: rgba(255,255,255,.08); color: var(--text); }
.cta { background: linear-gradient(135deg,var(--primary),#f4c542); color:#000; padding:10px 16px; border-radius: 12px; font-weight:800; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.12); }
.cta:hover { transform: translateY(-1px); }


/* Scroll to Top Button */
.scroll-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.scroll-btn.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-btn:hover {
  transform: translateY(-2px) scale(1.1);
}

/* Hero */
.hero { padding: 64px 0 36px; position: relative; overflow:hidden; }
.hero-grid { display:grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.badge { display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius: 999px; background: rgba(244,185,66,.15); border:1px solid rgba(244,185,66,.4); color:#f4d794; font-weight:700; font-size:.9rem; }
.title { font-size: clamp(28px, 4.2vw, 56px); line-height: 1.12; margin: 14px 0 10px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 30px rgba(244,185,66,0.3); }
.section-title { font-size: clamp(22px, 2.4vw, 34px); margin: 0 0 10px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; position: relative; }
.section-title::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 60px; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; }
.subtitle { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display:flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.btn { display:inline-flex; align-items:center; gap:10px; padding:14px 18px; border-radius: 14px; font-weight:800; border:1px solid rgba(255,255,255,.12); transition: all 0.3s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 10px 20px rgba(244,185,66,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color:#000; }
.btn-ghost { background: rgba(255,255,255,.08); color:#fff; }
.hero-card { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)); border:1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.hero-stats { display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.stat { background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 12px; text-align:center; }
.stat b { font-size: 1.2rem; color: var(--primary); }

/* Crown Animation */
.crown { color: var(--primary); animation: crown-glow 2s ease-in-out infinite alternate; }
@keyframes crown-glow {
  from { text-shadow: 0 0 10px rgba(244,185,66,0.5); }
  to { text-shadow: 0 0 20px rgba(244,185,66,0.8), 0 0 30px rgba(244,185,66,0.4); }
}

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.float { animation: float 3s ease-in-out infinite; }

/* Pulse Animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.pulse:hover { animation: pulse 0.6s ease-in-out; }

/* Gradient Animation */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animated-gradient {
  background: linear-gradient(-45deg, var(--primary), var(--accent), var(--warning), var(--primary));
  background-size: 400% 400%;
  animation: gradient-shift 4s ease infinite;
}

/* Sections */
section { padding: 48px 0; }
.section-title { font-size: clamp(22px, 2.4vw, 34px); margin: 0 0 10px; font-weight: 900; }
.section-sub { color: var(--muted); margin-bottom: 22px; }

/* Course Cards */
.course-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.card { background: var(--card); border:1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding:20px; box-shadow: var(--shadow); position: relative; transition: all 0.3s ease; }
.card:hover { transform: translateY(-4px); border-color: rgba(244,185,66,.3); }
.card h3 { margin: 8px 0 6px; font-size: 1.15rem; color: var(--primary); }
.card p { color: var(--muted); font-size: .98rem; line-height: 1.6; }
.course-duration { position: absolute; top: 16px; left: 16px; background: var(--accent); color: white; padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; }

/* Timeline */
.timeline { position: relative; }
.timeline::before { content: ''; position: absolute; right: 20px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--primary), var(--accent)); }
.timeline-item { position: relative; margin-bottom: 24px; padding-right: 60px; }
.timeline-item::before { content: ''; position: absolute; right: 12px; top: 12px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid var(--bg); box-shadow: 0 0 0 3px var(--primary); }

/* Modules Overview */
.modules-overview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.module-card { background: linear-gradient(135deg, rgba(244,185,66,0.1), rgba(139,92,246,0.1)); border: 1px solid rgba(244,185,66,0.3); border-radius: var(--radius); padding: 24px; }
.module-number { font-size: 2rem; font-weight: 900; color: var(--primary); }
.module-topics { list-style: none; margin: 16px 0 0; padding: 0; }
.module-topics li { padding: 6px 0; color: var(--muted); position: relative; padding-right: 20px; }
.module-topics li::before { content: '✓'; position: absolute; right: 0; color: var(--accent); font-weight: bold; }

/* Instructor */
.instructor { display:grid; grid-template-columns: 140px 1fr; gap: 18px; align-items:center; }
.avatar { width: 140px; height: 140px; border-radius: 18px; background: linear-gradient(135deg, #2a3142, #1f2332); display:grid; place-items:center; font-size: 42px; font-weight: 900; }

/* Pricing */
.pricing { display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: stretch; }
.price-card { position: relative; }
.price-card .ribbon { position:absolute; top:12px; left:12px; background: var(--accent); color:white; padding:6px 10px; border-radius: 999px; font-weight: 800; font-size:.85rem; }
.price { font-size: 2rem; font-weight: 900; margin: 8px 0; color: var(--primary); }
.price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.price-features { margin: 10px 0 0; padding: 0; list-style: none; }
.price-features li { padding: 6px 0; color: var(--muted); }

/* Testimonials */
.testimonials { display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote { position: relative; }
.quote:before { content:"\201C"; position:absolute; top:-16px; right:10px; font-size:48px; color: rgba(255,255,255,.15); }
.stars { font-size: 1rem; color: var(--warning); letter-spacing: 2px; }

/* FAQ */
.faq { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details { background: var(--card); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 12px 16px; }
summary { cursor:pointer; font-weight:800; }
details p { color: var(--muted); margin: 8px 0 0; }

/* Form */
form { display:grid; gap: 12px; }
input, select, textarea { width:100%; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); color:#bb78e7; border-radius: 12px; padding: 12px 14px; }
input::placeholder, textarea::placeholder { color: #b4bdd6; }
label { font-weight: 700; font-size: .95rem; }
.note { color: var(--muted); font-size: .92rem; }

/* Footer */
footer { padding: 28px 0; color: var(--muted); border-top: 1px solid rgba(255,255,255,.08); }

/* Utilities */
.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.center { text-align:center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  color: var(--primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(255,255,255,.08);
  color: var(--text);
}

.light-mode .theme-toggle {
  color: var(--primary);
}

.light-mode .theme-toggle:hover {
  background: rgba(0,0,0,.08);
}

/* Light mode specific styles for better contrast */
.light-mode header {
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid rgba(0,0,0,.1);
}

.light-mode nav a:hover {
  background: rgba(0,0,0,.08);
  color: var(--text);
}

.light-mode .btn-ghost {
  background: rgba(0,0,0,.08);
  color: var(--text);
}

.light-mode .btn-ghost:hover {
  background: rgba(0,0,0,.15);
}

.light-mode .hero-card {
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.02));
  border: 1px solid rgba(0,0,0,.1);
}

.light-mode .stat {
  background: rgb(255 255 255 / 63%);
  border: 1px solid rgba(0,0,0,.08);
}

.light-mode .card {
  border: 1px solid rgba(0,0,0,.1);
  box-shadow: var(--shadow);
}

.light-mode .badge {
  background: rgb(63 61 68);
  border: 1px solid rgba(244,185,66,.3);
}

.light-mode input, .light-mode select, .light-mode textarea {
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.2);
  color: var(--text);
}

.light-mode input::placeholder, .light-mode textarea::placeholder {
  color: #6c757d;
}

.light-mode details {
  background: var(--card);
  border: 1px solid rgba(0,0,0,.1);
}

.light-mode footer {
  border-top: 1px solid rgba(0,0,0,.1);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
@media (max-width: 990px) {
  .hero-grid, .modules-overview, .pricing, .faq, .course-grid, .testimonials, .grid-2, .grid-3, .instructor { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .hamburger { display: flex; }
  nav { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(10,14,26,0.95); backdrop-filter: blur(10px); z-index: 1000; display: flex; align-items: center; justify-content: center; transform: translateX(100%); transition: transform 0.3s ease; }
  nav.active { transform: translateX(0); }
  nav ul { flex-direction: column; gap: 20px; text-align: center; }
  nav a { font-size: 1.2rem; padding: 15px 20px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .timeline::before { display: none; }
  .timeline-item { padding-right: 0; }
  .timeline-item::before { display: none; }
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: 1fr; }
}