/* ============================================================
   工控布道者 · 公开课报名页
   深色科技风（贴合海报）+ 白色表单卡，移动端优先
   ============================================================ */

:root {
  --bg: #050a18;
  --bg-2: #070e24;
  --ink: #0b1530;
  --ink-2: #33415c;
  --ink-3: #7b8aa8;
  --brand: #2f7bff;
  --brand-2: #35c8ff;
  --red: #e8263f;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --card-line: #e8edf6;
  --field-bg: #f6f8fc;
  --muted: #8fa2c4;
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue",
    Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: #e8efff;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[v-cloak] {
  display: none !important;
}

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

button {
  font-family: inherit;
}

/* ---------- 背景 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1000px 620px at 50% -12%, rgba(47, 123, 255, 0.30), transparent 62%),
    radial-gradient(680px 420px at 108% 8%, rgba(53, 200, 255, 0.14), transparent 60%),
    radial-gradient(620px 480px at -12% 30%, rgba(47, 123, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #071027 0%, #050a18 48%, #040814 100%);
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(122, 160, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 160, 255, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 4%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 90% 62% at 50% 4%, #000 0%, transparent 72%);
}

.bg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -220px;
  width: 620px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(53, 200, 255, 0.22), transparent);
  filter: blur(10px);
}

/* ---------- 页面骨架 ---------- */
.page {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 22px 18px calc(34px + var(--safe-bottom));
}

/* ---------- 品牌 ---------- */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 4px 0 26px;
}

.brand-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(63, 140, 255, 0.28));
}

.brand-mark-cv {
  width: 27px;
  height: 27px;
}

.brand-mark-sg {
  width: 30px;
  height: 25px;
  filter: drop-shadow(0 0 12px rgba(232, 38, 63, 0.25));
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  gap: 5px;
}

.brand-text b {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #fff;
}

.brand-text i {
  font-style: normal;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 2.1px;
  color: rgba(255, 255, 255, 0.52);
  transform: scale(0.96);
  transform-origin: left center;
  white-space: nowrap;
}

.brand-divider {
  width: 1px;
  height: 30px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.24), transparent);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
}

.hero-kicker {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3.4px;
  color: var(--brand-2);
  opacity: 0.92;
}

.hero-title {
  margin: 0;
  font-size: clamp(44px, 13.2vw, 62px);
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.08;
  background: linear-gradient(180deg, #ffffff 18%, #cfe6ff 58%, #8fc4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 26px rgba(53, 200, 255, 0.22));
}

.hero-course {
  margin: 20px 0 0;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: #f1f6ff;
  line-height: 1.6;
}

.hero-sub {
  margin: 7px 0 0;
  font-size: 13.5px;
  letter-spacing: 0.4px;
  color: var(--muted);
}

/* ---------- 关键信息条 ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 28px 0 0;
  padding: 16px 4px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 34, 66, 0.66), rgba(10, 18, 38, 0.5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 40px -24px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 6px;
  position: relative;
}

.fact + .fact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12%;
  height: 76%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.fact-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fact:first-child .fact-main {
  color: var(--brand-2);
}

.fact-sub {
  font-size: 10.5px;
  letter-spacing: 0.4px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- 简介 ---------- */
.intro {
  margin: 24px 2px 0;
  font-size: 13px;
  line-height: 1.85;
  color: #a7b8d6;
  text-align: left;
  padding-left: 13px;
  border-left: 2px solid rgba(53, 200, 255, 0.5);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.6px;
  color: #bcd4f4;
  border: 1px solid rgba(120, 170, 255, 0.22);
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.08);
}

/* ---------- 表单卡 ---------- */
.card {
  margin: 26px 0 0;
  padding: 24px 18px 20px;
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow:
    0 -1px 0 rgba(255, 255, 255, 0.6) inset,
    0 34px 70px -28px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(140, 180, 255, 0.07);
  animation: rise 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: 0.12s;
}

.card-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--ink);
}

.card-head p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink-3);
}

.form {
  margin-top: 20px;
}

.field {
  position: relative;
  margin-bottom: 18px;
}

.field > label,
.field > .label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.2px;
}

.field em {
  font-style: normal;
  color: var(--red);
  margin-left: 2px;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  border: 1.5px solid var(--card-line);
  background: var(--field-bg);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  -webkit-appearance: none;
  appearance: none;
}

.field input {
  height: 48px;
}

.field textarea {
  min-height: 84px;
  resize: none;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a9b5c9;
  font-size: 13.5px;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(47, 123, 255, 0.72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 123, 255, 0.1);
}

.field .counter {
  position: absolute;
  right: 4px;
  bottom: -18px;
  font-size: 10.5px;
  color: #a9b5c9;
}

/* ---------- 选项卡 ---------- */
.options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.option {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 13px;
  text-align: left;
  background: var(--field-bg);
  border: 1.5px solid var(--card-line);
  border-radius: 13px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.12s;
}

.option:active {
  transform: scale(0.988);
}

.option .radio {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.6px solid #c3cfe3;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.option-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.option-body strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.option-body small {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-3);
}

.option.active {
  border-color: rgba(47, 123, 255, 0.85);
  background: linear-gradient(180deg, rgba(47, 123, 255, 0.075), rgba(53, 200, 255, 0.05));
  box-shadow: 0 6px 18px -10px rgba(47, 123, 255, 0.55);
}

.option.active .radio {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 4.5px var(--brand);
}

.option.active .option-body strong {
  color: #164ea8;
}

/* ---------- 午餐开关 ---------- */
.switch-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  background: var(--field-bg);
  border: 1.5px solid var(--card-line);
  border-radius: 13px;
}

.switch-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.switch-text strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.switch-text small {
  font-size: 11px;
  color: var(--ink-3);
}

.switch {
  flex: none;
  position: relative;
  width: 47px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d5dded;
  cursor: pointer;
  transition: background 0.22s;
}

.switch-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(11, 21, 48, 0.24);
  transition: transform 0.22s cubic-bezier(0.3, 0.8, 0.4, 1);
}

.switch.on {
  background: linear-gradient(92deg, var(--brand), var(--brand-2));
}

.switch.on .switch-dot {
  transform: translateX(20px);
}

/* ---------- 提交按钮 ---------- */
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(96deg, #2568f5 0%, #2f7bff 48%, #35c8ff 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow:
    0 12px 26px -8px rgba(47, 123, 255, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.12s, box-shadow 0.18s, filter 0.18s;
}

.submit:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: 0 8px 18px -8px rgba(47, 123, 255, 0.5);
}

.submit:disabled {
  cursor: default;
  filter: saturate(0.7);
  opacity: 0.72;
}

.agree {
  margin: 12px 0 0;
  font-size: 10.5px;
  text-align: center;
  color: #9aa8bf;
  letter-spacing: 0.2px;
}

.submit-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 1px;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ---------- 成功页 ---------- */
.card-success {
  text-align: center;
  padding-top: 34px;
}

.success-icon {
  display: flex;
  justify-content: center;
  color: #16a05d;
  margin-bottom: 14px;
  filter: drop-shadow(0 6px 16px rgba(22, 160, 93, 0.28));
}

.success-title {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink);
}

.success-sub {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.code-chip {
  display: inline-block;
  margin: 18px 0 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(47, 123, 255, 0.08);
  border: 1px dashed rgba(47, 123, 255, 0.45);
  color: #1f5fc4;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.1px;
  font-variant-numeric: tabular-nums;
}

.success-rows {
  margin: 18px 0 0;
  padding: 6px 16px;
  background: #f7f9fd;
  border-radius: 14px;
  text-align: left;
}

.success-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  font-size: 13px;
}

.success-rows > div + div {
  border-top: 1px dashed #e6ebf5;
}

.success-rows dt {
  color: var(--ink-3);
  flex: none;
}

.success-rows dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.success-note {
  margin: 16px 0 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: #fffaf0;
  border: 1px solid #f6e6c8;
  text-align: left;
}

.success-note p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.75;
  color: #8a6a2f;
}

.success-note p + p {
  margin-top: 4px;
}

.ghost {
  width: 100%;
  height: 46px;
  margin-top: 20px;
  border: 1.5px solid #dbe3f2;
  border-radius: 13px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.ghost:active {
  background: #f3f6fc;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 30px;
  text-align: center;
  color: #7d8db0;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 12px;
  opacity: 0.8;
  font-size: 10.5px;
  letter-spacing: 0.6px;
}

.footer-logos img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.footer-logos i {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 5px;
}

.footer p {
  margin: 4px 0;
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.2px;
}

.footer-fine {
  margin-top: 8px !important;
  font-size: 9.5px !important;
  color: #61708f;
}

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 8, 20, 0.66);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.modal {
  width: 100%;
  max-width: 360px;
  padding: 22px 20px 18px;
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8);
  animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.modal h3 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
}

.confirm-rows {
  margin: 0;
  padding: 4px 0;
}

.confirm-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 2px;
  font-size: 13.5px;
}

.confirm-rows > div + div {
  border-top: 1px dashed #eef2f9;
}

.confirm-rows dt {
  color: var(--ink-3);
  flex: none;
}

.confirm-rows dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin-top: 18px;
}

.btn-ghost,
.btn-primary {
  height: 45px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.btn-ghost {
  border: 1.5px solid #e2e8f3;
  background: #fff;
  color: var(--ink-2);
}

.btn-primary {
  border: 0;
  background: linear-gradient(96deg, #2568f5, #35c8ff);
  color: #fff;
  box-shadow: 0 10px 20px -10px rgba(47, 123, 255, 0.6);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: default;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(9% + var(--safe-bottom));
  z-index: 60;
  transform: translateX(-50%);
  max-width: 78vw;
  padding: 11px 18px;
  border-radius: 12px;
  background: rgba(16, 27, 52, 0.94);
  border: 1px solid rgba(120, 170, 255, 0.22);
  color: #eaf2ff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ---------- 动效 ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.22s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.toast-enter-active,
.toast-leave-active {
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast-enter-from,
.toast-leave-to {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.hero-kicker,
.hero-title,
.hero-course,
.hero-sub,
.facts,
.intro,
.chips {
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.hero-kicker { animation-delay: 0.02s; }
.hero-title { animation-delay: 0.06s; }
.hero-course { animation-delay: 0.1s; }
.hero-sub { animation-delay: 0.14s; }
.facts { animation-delay: 0.18s; }
.intro { animation-delay: 0.22s; }
.chips { animation-delay: 0.26s; }

/* ---------- 大屏 ---------- */
@media (min-width: 640px) {
  .page {
    padding: 34px 22px 48px;
  }

  .hero-title {
    font-size: 62px;
  }

  .hero-course {
    font-size: 18px;
  }

  .card {
    padding: 30px 28px 24px;
    border-radius: 26px;
  }

  .card-head h2 {
    font-size: 21px;
  }

  .facts {
    padding: 18px 10px;
  }

  .fact-main {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .brand {
    gap: 12px;
  }

  .brand-text b {
    font-size: 15px;
  }

  .facts {
    padding: 14px 0;
  }

  .fact-main {
    font-size: 13.5px;
  }

  .fact-sub {
    font-size: 9.5px;
  }

  .hero-course {
    font-size: 15px;
  }

  .card {
    padding: 22px 15px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}
