:root {
  --primary: #ff4d6d;
  --primary-dark: #e13156;
  --primary-soft: #ffe9ee;
  --ink: #241e45;
  --ink-soft: #3a335c;
  --muted: #8a8299;
  --bg: #fff7f4;
  --card: #ffffff;
  --gold: #f2b84b;
  --line: #f1e7e9;
  --success: #22b07d;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(36, 30, 69, 0.10);
  --shadow-sm: 0 4px 14px rgba(36, 30, 69, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* 通用容器（移动优先） */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #ff7a93);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 77, 109, 0.35);
}
.btn-primary:hover {
  box-shadow: 0 14px 30px rgba(255, 77, 109, 0.45);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-block {
  width: 100%;
}
.btn-lg {
  font-size: 17px;
  padding: 16px 32px;
}

/* 顶部导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 247, 244, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #ff9a3d);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.nav-links {
  display: none;
  gap: 26px;
  font-size: 15px;
  color: var(--ink-soft);
}
.nav-links a:hover {
  color: var(--primary);
}
@media (min-width: 720px) {
  .nav-links {
    display: flex;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 77, 109, 0.28), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(242, 184, 75, 0.25), transparent 55%),
    linear-gradient(160deg, #2a2248 0%, #241e45 55%, #1a1633 100%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero .wrap {
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 1px;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 20px 0 14px;
  font-weight: 800;
}
.hero h1 span {
  background: linear-gradient(90deg, #ffb27a, #ff6f8f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-metrics {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-metrics .m b {
  display: block;
  font-size: 24px;
  font-weight: 800;
}
.hero-metrics .m span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

/* 区块标题 */
.section {
  padding: 52px 0;
}
.section-head {
  text-align: center;
  margin-bottom: 30px;
}
.section-head .eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
}
.section-head h2 {
  font-size: 26px;
  font-weight: 800;
  margin-top: 6px;
}
.section-head p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 15px;
}

/* 课程卡片 */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.course-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.course-card .ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 14px;
}
.course-card h3 {
  font-size: 17px;
  font-weight: 700;
}
.course-card p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

/* 优势 */
.why {
  background: #fff;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 600px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}
.why-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.why-item .ico {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.why-item h3 {
  font-size: 16px;
  font-weight: 700;
}
.why-item p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}

/* 流程 */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.step .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
}
.step h3 {
  font-size: 16px;
  font-weight: 700;
}
.step p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* CTA 横幅 */
.cta {
  background: linear-gradient(135deg, var(--primary), #ff7a93);
  color: #fff;
  text-align: center;
  border-radius: 24px;
  padding: 40px 24px;
  margin: 0 20px;
}
.cta h2 {
  font-size: 24px;
  font-weight: 800;
}
.cta p {
  opacity: 0.9;
  margin: 8px 0 22px;
}
.cta .btn {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

/* 页脚 */
.footer {
  background: #1a1633;
  color: rgba(255, 255, 255, 0.66);
  padding: 40px 0 32px;
  margin-top: 52px;
}
.footer .brand {
  color: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
}
.footer p,
.footer a {
  font-size: 14px;
  line-height: 2;
}
.footer a:hover {
  color: #fff;
}
.footer-bottom {
  text-align: center;
  font-size: 13px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 表单（注册页） */
.form-page {
  padding: 36px 0 60px;
}
.auth-card {
  max-width: 480px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.auth-card .head {
  background: linear-gradient(160deg, #2a2248, #241e45);
  color: #fff;
  padding: 26px 24px;
  text-align: center;
}
.auth-card .head h1 {
  font-size: 22px;
  font-weight: 800;
}
.auth-card .head p {
  font-size: 14px;
  opacity: 0.78;
  margin-top: 4px;
}
.auth-user {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
}
.auth-user img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  background: #fff;
}
.auth-user .nm {
  text-align: left;
}
.auth-user .nm b {
  font-size: 15px;
}
.auth-user .nm span {
  display: block;
  font-size: 12px;
  opacity: 0.65;
}
.auth-body {
  padding: 24px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink-soft);
}
.field label .req {
  color: var(--primary);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.12);
}
.field textarea {
  resize: vertical;
  min-height: 76px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.form-error {
  background: #fff0f0;
  color: #d63447;
  border: 1px solid #ffd3d9;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 14px;
  display: none;
}
.form-error.show {
  display: block;
}

/* 成功页 */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.success-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 40px 28px;
}
.success-ico {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: #e7f8f0;
  display: grid;
  place-items: center;
  font-size: 40px;
}
.success-card h1 {
  font-size: 24px;
  font-weight: 800;
}
.success-card p {
  color: var(--muted);
  margin: 10px 0 24px;
  font-size: 15px;
}
.success-tip {
  background: var(--bg);
  border-radius: 14px;
  padding: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: left;
  margin-bottom: 24px;
}

/* 加载遮罩 */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner.dark {
  border-color: rgba(36, 30, 69, 0.2);
  border-top-color: var(--primary);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
