:root {
  --primary: #0f7cff;
  --primary-dark: #0758d8;
  --primary-soft: rgba(15, 124, 255, 0.12);
  --accent: #6c5cff;
  --cyan: #42d4ff;
  --green: #13c27c;
  --orange: #ff9f2e;
  --danger: #ef4444;
  --ink: #102033;
  --muted: #607087;
  --line: rgba(16, 32, 51, 0.1);
  --card: rgba(255, 255, 255, 0.86);
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(28, 82, 158, 0.16);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background: #f6f9ff;
  min-height: 100vh;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle at 5% 8%, rgba(66, 212, 255, .26), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(108, 92, 255, .18), transparent 30%),
    linear-gradient(180deg, #f5faff 0%, #ffffff 46%, #f4f7ff 100%);
}
.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15,124,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(15,124,255,.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 72%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 124, 255, 0.12);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
}
.brand img { width: 38px; height: 38px; }
.brand.mini img { width: 30px; height: 30px; }
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav a {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: #43546b;
  transition: .2s ease;
}
.nav a:hover { color: var(--primary); background: var(--primary-soft); }
.admin-link { border: 1px solid rgba(15,124,255,.18); }
.account-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(15, 124, 255, .12);
  padding: 9px 12px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 14px 30px rgba(15, 124, 255, .28); }
.btn.ghost { color: var(--primary); background: rgba(15, 124, 255, 0.09); }
.btn.glass { color: var(--ink); background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 14px 34px rgba(15, 124, 255, .12); }
.btn.danger { color: white; background: linear-gradient(135deg, #ef4444, #fb7185); }
.btn.large { padding: 14px 24px; font-size: 16px; }
.btn.full { width: 100%; }
.btn.small { padding: 7px 12px; font-size: 13px; }

.section {
  padding: clamp(58px, 8vw, 110px) clamp(18px, 5vw, 72px);
  max-width: 1360px;
  margin: 0 auto;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: center;
  gap: clamp(36px, 5vw, 76px);
  min-height: calc(100vh - 82px);
}
.eyebrow {
  display: inline-flex;
  color: var(--primary);
  background: rgba(15, 124, 255, .1);
  border: 1px solid rgba(15,124,255,.13);
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .02em;
}
.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: .96;
  letter-spacing: -.08em;
  background: linear-gradient(135deg, #071d3c 8%, var(--primary) 52%, var(--accent) 100%);
  -webkit-background-clip: text;
  color: transparent;
}
.hero p, .section-title p, .feature-card p, .panel p, .contact-card p {
  color: var(--muted);
  line-height: 1.8;
}
.hero p { max-width: 660px; font-size: 18px; }
.hero-actions { display: flex; gap: 14px; margin: 30px 0; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 620px;
}
.hero-stats div {
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(15,124,255,.12);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(15,124,255,.08);
}
.hero-stats strong { display: block; font-size: clamp(24px, 4vw, 36px); color: var(--primary); }
.hero-stats span { color: var(--muted); font-size: 14px; }
.hero-card { position: relative; min-height: 510px; display: grid; place-items: center; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .78; }
.orb-a { width: 220px; height: 220px; background: linear-gradient(135deg, var(--cyan), transparent); top: 20px; right: 30px; }
.orb-b { width: 320px; height: 320px; background: linear-gradient(135deg, rgba(108,92,255,.4), transparent); left: 10px; bottom: 30px; }
.learning-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  border-radius: 34px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(255,255,255,.62));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.learning-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: radial-gradient(circle at 10% 10%, rgba(66,212,255,.26), transparent 30%), radial-gradient(circle at 90% 5%, rgba(108,92,255,.16), transparent 35%);
  z-index: -1;
}
.card-head { display: flex; justify-content: space-between; align-items: center; font-weight: 900; }
.card-head b { color: white; background: var(--green); border-radius: 999px; padding: 5px 9px; font-size: 12px; }
.path-steps { display: flex; align-items: center; margin: 38px 0; }
.path-step { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.path-step i {
  font-style: normal;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: var(--primary);
}
.path-step.active i { color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 10px 24px rgba(15,124,255,.24); }
.path-line { flex: 1; height: 3px; border-radius: 10px; background: linear-gradient(90deg, rgba(15,124,255,.45), rgba(108,92,255,.18)); margin: 0 8px; }
.mini-chart {
  height: 150px;
  background: linear-gradient(180deg, rgba(15,124,255,.08), rgba(255,255,255,.42));
  border-radius: 24px;
  display: flex;
  align-items: end;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(15,124,255,.1);
}
.mini-chart span { flex: 1; min-height: 24px; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, var(--cyan), var(--primary)); box-shadow: inset 0 1px rgba(255,255,255,.4); }

.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; padding-top: 0; }
.feature-card, .panel, .course-card, .plan-card, .dashboard-panel, .contact-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.feature-card { padding: 24px; min-height: 210px; }
.feature-icon { width: 54px; height: 54px; border-radius: 18px; background: var(--primary-soft); display: grid; place-items: center; font-size: 26px; margin-bottom: 16px; }
.feature-card h3, .panel h3 { margin: 0 0 10px; font-size: 22px; }

.section-title { margin-bottom: 28px; max-width: 760px; }
.section-title h2 { margin: 14px 0 10px; font-size: clamp(32px, 5vw, 54px); letter-spacing: -.05em; }
.toolbar { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; }
.search-box {
  min-width: min(460px, 100%);
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid rgba(15,124,255,.12);
  border-radius: 999px;
  padding: 11px 18px;
  box-shadow: 0 18px 40px rgba(15,124,255,.08);
}
.search-box input { border: 0; outline: 0; width: 100%; background: transparent; color: var(--ink); }
.category-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.category-tabs button {
  border: 1px solid rgba(15,124,255,.14);
  background: rgba(255,255,255,.78);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
}
.category-tabs button.active { color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); box-shadow: 0 10px 26px rgba(15,124,255,.2); }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.course-card { overflow: hidden; display: flex; flex-direction: column; min-height: 430px; transition: transform .2s ease, box-shadow .2s ease; }
.course-card:hover { transform: translateY(-6px); box-shadow: 0 34px 80px rgba(15, 124, 255, .18); }
.course-cover { min-height: 154px; padding: 20px; color: white; position: relative; overflow: hidden; }
.course-cover::after { content:""; position:absolute; width:170px; height:170px; border-radius:50%; background:rgba(255,255,255,.16); right:-44px; bottom:-50px; }
.course-cover .tag-row { position: relative; z-index: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.tag, .status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 900;
}
.status-pill { background: rgba(15,124,255,.1); color: var(--primary); }
.status-pill.pending { color: #b7791f; background: rgba(245,158,11,.12); }
.status-pill.approved { color: #047857; background: rgba(16,185,129,.13); }
.status-pill.rejected, .status-pill.disabled { color: #b91c1c; background: rgba(239,68,68,.12); }
.course-cover h3 { margin: 18px 0 6px; font-size: 25px; letter-spacing: -.04em; position: relative; z-index: 1; }
.course-cover p { margin: 0; opacity: .88; line-height: 1.6; position: relative; z-index: 1; }
.course-body { padding: 20px; display: flex; flex: 1; flex-direction: column; }
.course-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.course-body h4 { font-size: 20px; margin: 0 0 8px; }
.course-body p { color: var(--muted); line-height: 1.7; margin: 0 0 18px; }
.course-actions { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.empty-state { grid-column: 1/-1; padding: 38px; text-align: center; color: var(--muted); background: white; border-radius: var(--radius-lg); border: 1px dashed rgba(15,124,255,.24); }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.plan-card { padding: 26px; position: relative; overflow: hidden; }
.plan-card.featured { border-color: rgba(15,124,255,.36); transform: translateY(-8px); }
.plan-card::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 88% 0%, rgba(15,124,255,.18), transparent 38%); pointer-events:none; }
.plan-badge { color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 900; }
.plan-card h3 { margin: 22px 0 10px; font-size: 26px; }
.plan-price { font-size: 48px; font-weight: 950; letter-spacing: -.06em; color: var(--ink); }
.plan-price small { font-size: 16px; color: var(--muted); }
.plan-card ul { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; color: var(--muted); }
.plan-card li::before { content:"✓"; color: var(--green); font-weight: 900; margin-right: 8px; }

.ai-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { padding: 24px; }
.stack-form, .contact-form { display: grid; gap: 14px; }
.stack-form label, .contact-form label, .auth-form label, .course-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #263b55;
}
input, textarea, select {
  border: 1px solid rgba(15,124,255,.14);
  background: rgba(255,255,255,.82);
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  outline: none;
  transition: border .18s ease, box-shadow .18s ease;
}
input:focus, textarea:focus, select:focus { border-color: rgba(15,124,255,.55); box-shadow: 0 0 0 4px rgba(15,124,255,.1); }
textarea { resize: vertical; }
.ai-answer, .practice-result {
  margin-top: 16px;
  border-radius: 18px;
  background: rgba(15,124,255,.07);
  border: 1px solid rgba(15,124,255,.12);
  padding: 16px;
  color: #263b55;
  display: none;
}
.ai-answer.active, .practice-result.active { display: block; }
.ai-answer h4, .practice-result h4 { margin: 0 0 10px; }
.ai-answer ul { margin: 10px 0 0; padding-left: 20px; }
.practice-picker { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.practice-picker select { flex: 1; }
.practice-form { display: grid; gap: 16px; }
.question-card { border: 1px solid rgba(15,124,255,.12); background: rgba(255,255,255,.7); border-radius: 18px; padding: 16px; }
.question-card h4 { margin: 0 0 10px; }
.option-line { display: flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--muted); font-weight: 700; }
.option-line input { width: auto; }

.dashboard-panel { min-height: 220px; padding: 24px; }
.dashboard-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 20px; }
.profile-card { padding: 22px; border-radius: 22px; background: linear-gradient(135deg, rgba(15,124,255,.12), rgba(108,92,255,.08)); border: 1px solid rgba(15,124,255,.14); }
.profile-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: white; font-weight: 950; font-size: 22px; }
.profile-card h3 { margin: 0; }
.profile-card p { color: var(--muted); line-height: 1.7; }
.progress-list, .favorite-list, .wrong-list { display: grid; gap: 12px; }
.progress-item, .favorite-item, .wrong-item { background: rgba(255,255,255,.72); border: 1px solid rgba(15,124,255,.1); border-radius: 18px; padding: 14px; }
.progress-bar { height: 10px; border-radius: 999px; overflow: hidden; background: #e8f1ff; margin-top: 10px; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; }

.contact-card { display: grid; grid-template-columns: .95fr 1.05fr; gap: 30px; padding: clamp(24px, 4vw, 42px); }
.contact-list { padding-left: 0; list-style: none; color: var(--muted); line-height: 2; }
.contact-list li::before { content:"◆"; color: var(--primary); margin-right: 8px; font-size: 12px; }

.footer { border-top: 1px solid rgba(15,124,255,.12); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px clamp(18px, 5vw, 72px); color: var(--muted); background: rgba(255,255,255,.72); }

.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 22px; }
.modal.active { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4, 16, 35, .52); backdrop-filter: blur(8px); }
.modal-card { position: relative; max-height: min(88vh, 900px); overflow: auto; width: min(560px, 100%); background: rgba(255,255,255,.96); border-radius: 28px; box-shadow: 0 34px 90px rgba(4, 16, 35, .28); border: 1px solid rgba(255,255,255,.86); padding: 26px; }
.course-modal-card { width: min(980px, 100%); }
.modal-close { position: sticky; top: 0; margin-left: auto; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(15,124,255,.1); color: var(--primary); font-size: 24px; cursor: pointer; z-index: 2; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #edf5ff; border-radius: 18px; padding: 6px; margin-bottom: 20px; }
.auth-tabs button { border: 0; padding: 12px; border-radius: 14px; background: transparent; color: var(--muted); font-weight: 900; cursor: pointer; }
.auth-tabs button.active { background: white; color: var(--primary); box-shadow: 0 8px 22px rgba(15,124,255,.12); }
.auth-form { display: none; gap: 14px; }
.auth-form.active { display: grid; }
.auth-form h3 { margin: 0 0 6px; font-size: 26px; }
.course-modal-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: stretch; }
.course-video { border-radius: 24px; overflow: hidden; background: #071d3c; box-shadow: 0 18px 50px rgba(15,124,255,.18); }
.course-video video { width: 100%; height: 100%; min-height: 280px; object-fit: cover; display: block; }
.course-detail-panel { padding: 18px; border-radius: 24px; background: rgba(15,124,255,.06); border: 1px solid rgba(15,124,255,.1); }
.course-detail-panel h2 { margin: 8px 0 8px; font-size: 34px; letter-spacing: -.04em; }
.lesson-list { margin-top: 20px; display: grid; gap: 12px; }
.lesson-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; background: rgba(255,255,255,.82); border: 1px solid rgba(15,124,255,.1); border-radius: 18px; padding: 12px; }
.lesson-num { width: 36px; height: 36px; border-radius: 14px; display: grid; place-items: center; color: white; background: linear-gradient(135deg, var(--primary), var(--accent)); font-weight: 900; }
.lesson-item h4 { margin: 0 0 4px; }
.lesson-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 10px; }
.toast { min-width: min(360px, calc(100vw - 36px)); background: rgba(16,32,51,.94); color: white; border-radius: 18px; padding: 14px 16px; box-shadow: 0 18px 50px rgba(4,16,35,.22); animation: toastIn .25s ease; }
.toast.success { background: linear-gradient(135deg, #047857, #10b981); }
.toast.error { background: linear-gradient(135deg, #b91c1c, #ef4444); }
@keyframes toastIn { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform: translateY(0);} }
.reveal { animation: reveal .7s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
@keyframes reveal { from { opacity:0; transform: translateY(18px);} to { opacity:1; transform: translateY(0);} }

.admin-body { background: #f5f8ff; }
.admin-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.admin-login-card { width: min(440px, 100%); background: rgba(255,255,255,.92); border: 1px solid rgba(15,124,255,.12); box-shadow: var(--shadow); border-radius: 30px; padding: 28px; }
.admin-login-card .brand { margin-bottom: 24px; }
.admin-layout { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar { background: #071d3c; color: white; padding: 22px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.sidebar .brand { color: white; margin-bottom: 28px; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-nav button { border: 0; border-radius: 16px; background: transparent; color: rgba(255,255,255,.72); padding: 13px 14px; text-align: left; font-weight: 900; cursor: pointer; }
.sidebar-nav button.active, .sidebar-nav button:hover { color: white; background: rgba(255,255,255,.12); }
.sidebar-footer { margin-top: 30px; display: grid; gap: 10px; }
.admin-main { padding: 24px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-top h1 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.admin-section { display: grid; gap: 18px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { background: white; border: 1px solid rgba(15,124,255,.1); border-radius: 22px; padding: 20px; box-shadow: 0 16px 40px rgba(15,124,255,.08); }
.metric-card span { color: var(--muted); font-size: 14px; }
.metric-card strong { display:block; margin-top: 8px; font-size: 34px; color: var(--primary); }
.admin-card { background: white; border: 1px solid rgba(15,124,255,.1); border-radius: 24px; padding: 20px; box-shadow: 0 16px 40px rgba(15,124,255,.08); overflow: auto; }
.admin-card h2 { margin: 0 0 16px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.admin-table th, .admin-table td { padding: 12px 10px; border-bottom: 1px solid rgba(16,32,51,.08); text-align: left; vertical-align: top; }
.admin-table th { color: #52647a; font-size: 13px; background: #f8fbff; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.course-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.course-form label.full-row { grid-column: 1/-1; }
.form-actions { grid-column: 1/-1; display: flex; gap: 10px; flex-wrap: wrap; }
.log-list { display: grid; gap: 10px; }
.log-item { border: 1px solid rgba(15,124,255,.1); background: #fbfdff; border-radius: 16px; padding: 12px; }
.log-item b { color: var(--primary); }
.log-item span { color: var(--muted); font-size: 13px; display:block; margin-top: 5px; }
.hidden { display: none !important; }

@media (max-width: 1120px) {
  .course-grid, .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-card { min-height: 360px; }
  .admin-layout { grid-template-columns: 220px 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; }
  .menu-toggle { display: block; }
  .nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; background: white; padding: 12px; border-radius: 20px; box-shadow: 0 14px 34px rgba(15,124,255,.12); }
  .nav.open { display: flex; }
  .account-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .hero-stats, .ai-layout, .dashboard-grid, .contact-card, .course-modal-hero { grid-template-columns: 1fr; }
  .course-grid, .plan-grid, .feature-grid { grid-template-columns: 1fr; }
  .plan-card.featured { transform: none; }
  .footer { flex-direction: column; align-items: flex-start; }
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-main { padding: 18px; }
  .course-form { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: 50px; }
  .hero-actions, .account-actions, .course-actions, .practice-picker { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .hero-stats { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .modal { padding: 10px; }
  .modal-card { border-radius: 22px; padding: 18px; }
  .lesson-item { grid-template-columns: auto 1fr; }
  .lesson-item .btn { grid-column: 1/-1; }
}
