:root{
  --bg: #f4f6ff;
  --surface: #ffffff;
  --text: #1b1b1b;
  --muted: rgba(0,0,0,0.65);
  --cardShadow: 0 8px 25px rgba(0,0,0,0.06);
  --primary: #5B4BFF;
  --border: rgba(0,0,0,0.08);
}

.dark{
  --bg: #0b0f1a;
  --surface: #11182a;
  --text: #f2f4ff;
  --muted: rgba(255,255,255,0.72);
  --cardShadow: 0 8px 30px rgba(0,0,0,0.35);
  --primary: #7a6bff;
  --border: rgba(255,255,255,0.10);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:'Inter', sans-serif;
  background: linear-gradient(180deg, var(--bg), var(--surface));
  color: var(--text);
}

a{ color: inherit; }

.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 18px;
  position: sticky;
  top:0;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.dark .header{
  background: rgba(17,24,42,0.80);
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  font-size:18px;
  text-decoration:none;
}
.logo img{ height:30px; }

.header-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.icon-btn{
  border:1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  box-shadow: 0 3px 14px rgba(0,0,0,0.05);
}

.mobile-menu{
  display:none;
  flex-direction:column;
  background: var(--surface);
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a{
  text-decoration:none;
  padding: 12px 2px;
  color: var(--text);
}

.hero{
  text-align:center;
  padding: 56px 18px 30px;
}
.hero span{ color: var(--primary); }
.hero p{ color: var(--muted); margin: 10px auto 0; max-width: 560px; }

.hero-ctas{
  display:flex;
  justify-content:center;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}

.pwa-row{ margin-top: 12px; }

.primary-btn, .ghost-btn, .secondary-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight:700;
  text-decoration:none;
  border: none;
  cursor:pointer;
}

.primary-btn{
  background: var(--primary);
  color: #fff;
}
.ghost-btn{
  background: transparent;
  color: var(--text);
  border:1px solid var(--border);
}
.secondary-btn{
  background: var(--surface);
  color: var(--text);
  border:1px solid var(--border);
}

.stats{
  display:flex;
  justify-content:center;
  gap:12px;
  padding: 14px 18px 24px;
  flex-wrap:wrap;
}
.stat-card{
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 18px;
  box-shadow: var(--cardShadow);
  text-align:center;
  min-width: 110px;
}
.stat-card p{ margin: 4px 0 0; color: var(--muted); }

.categories, .page{
  padding: 26px 18px 30px;
  max-width: 980px;
  margin: 0 auto;
}
.categories h2{ margin: 0 0 14px; }

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 20px;
  box-shadow: var(--cardShadow);
  margin-bottom: 14px;
}

.link{
  display:inline-block;
  margin-top: 10px;
  color: var(--primary);
  text-decoration:none;
  font-weight:700;
}

.mission{
  padding: 32px 18px;
  text-align:center;
  background: var(--primary);
  color: #fff;
  border-radius: 26px 26px 0 0;
}
.mission p{ opacity: 0.95; max-width: 900px; margin: 10px auto 0; }

footer{
  text-align:center;
  padding: 18px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.page-head h1{ margin:0; }
.page-head p{ margin: 8px 0 0; color: var(--muted); }

.filters{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
  margin: 16px 0 18px;
}

.label{ display:block; font-weight:700; margin: 12px 0 6px; }
.input{
  width:100%;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.grid{
  display:grid;
  grid-template-columns: repeat(1, minmax(0,1fr));
  gap: 14px;
}
@media (min-width: 760px){
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.course-card{
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 20px;
  box-shadow: var(--cardShadow);
}
.course-card h3{ margin: 10px 0 8px; }
.muted{ color: var(--muted); }
.small{ font-size: 13px; }

.course-top{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  align-items:center;
}

.pill{
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(91,75,255,0.12);
  border: 1px solid rgba(91,75,255,0.22);
  font-weight: 800;
  font-size: 12px;
}
.pill.outline{
  background: transparent;
  border: 1px solid var(--border);
}

.course-meta{
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.row{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.detail .card h1{ font-size: 28px; }

.list{
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-actions{
  display:flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap:wrap;
}

.dash-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.dash-item:last-child{ border-bottom: none; }

.dash-title{
  font-weight: 900;
}