/* ========== 表单页样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg-grad-1: #0a1844;
  --bg-grad-2: #1d3b8a;
  --bg-grad-3: #4a6cf7;
  --accent: #5b8cff;
  --accent-2: #7bd3ff;
  --i-color: #ff8c5a;   /* I - 暖橙 */
  --m-color: #b48aff;   /* M - 紫 */
  --a-color: #2bd9a0;   /* A - 青 */
  --text: #1a2238;
  --text-soft: #6b7591;
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: #e6ecf5;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 40px;
  position: relative;
}

/* ===== Hero 主视觉 ===== */
.hero {
  position: relative;
  padding: 0 0 64px;
  overflow: hidden;
}

.hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 1080 / 600; /* 与原图比例一致 */
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 16px 40px rgba(10, 24, 68, 0.25);
}

.hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 底部柔光过渡，避免图片与背景生硬切割 */
.hero-banner::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, rgba(244, 247, 251, 0.95));
  pointer-events: none;
}

.hero-caption {
  position: relative;
  text-align: center;
  margin-top: 22px;
  padding: 0 24px;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.85;
  color: #4a5777;
  font-weight: 500;
}
.hero-desc em {
  font-style: normal;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(90deg, #4a6cf7, #6b5aff, #b48aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 19px;
  margin: 0 2px;
}

/* ===== 表单卡片 ===== */
.form {
  padding: 0 16px;
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 22px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(20, 50, 120, 0.08);
  border: 1px solid var(--border);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.card-index {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 4px 10px;
  border-radius: 8px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.card-tip {
  font-size: 13px;
  color: var(--text-soft);
  margin: -4px 0 14px;
  line-height: 1.6;
}

/* IMA 卡片 */
.ima-card .ima-letter {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800;
  color: #fff;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.ima-i .ima-letter { background: linear-gradient(135deg, #ff8c5a, #ff5e7a); box-shadow: 0 6px 18px rgba(255,140,90,0.35); }
.ima-m .ima-letter { background: linear-gradient(135deg, #b48aff, #6b5aff); box-shadow: 0 6px 18px rgba(180,138,255,0.35); }
.ima-a .ima-letter { background: linear-gradient(135deg, #2bd9a0, #2ba6d9); box-shadow: 0 6px 18px rgba(43,217,160,0.35); }

.ima-meta { display: flex; flex-direction: column; }
.ima-en { font-size: 12px; letter-spacing: 2px; color: var(--text-soft); font-weight: 600; }
.ima-cn { font-size: 17px; font-weight: 700; color: var(--text); margin-top: 1px; }

/* ===== 输入控件 ===== */
.field { margin-bottom: 14px; position: relative; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fafbfd;
  color: var(--text);
  transition: all .2s;
  resize: none;
  -webkit-appearance: none;
}

.field textarea { line-height: 1.7; min-height: 110px; }

.field input:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}

.field input::placeholder,
.field textarea::placeholder { color: #b8c1d4; }

/* 下拉选择 */
.select-wrap {
  position: relative;
}
.select-wrap select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 12px 40px 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: #fafbfd;
  color: var(--text);
  transition: all .2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
.select-wrap select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(91, 140, 255, 0.12);
}
.select-wrap select:invalid { color: #b8c1d4; }
.select-arrow {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--accent);
  pointer-events: none;
}

.counter {
  position: absolute;
  right: 12px; bottom: 8px;
  font-size: 11px;
  color: #b8c1d4;
  pointer-events: none;
  background: rgba(255,255,255,0.85);
  padding: 1px 6px;
  border-radius: 6px;
}

/* ===== 提交按钮 ===== */
.submit-btn {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  cursor: pointer;
  position: relative;
  background: linear-gradient(135deg, #4a6cf7 0%, #6b5aff 50%, #b48aff 100%);
  box-shadow: 0 8px 24px rgba(74, 108, 247, 0.35);
  transition: all .25s;
  overflow: hidden;
}
.submit-btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform .6s;
}
.submit-btn:hover::before { transform: translateX(100%); }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-loading { display: inline-flex; gap: 6px; }
.btn-loading[hidden] { display: none !important; }
.btn-loading .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  animation: dot 1.2s infinite ease-in-out;
}
.btn-loading .dot:nth-child(2) { animation-delay: .15s; }
.btn-loading .dot:nth-child(3) { animation-delay: .3s; }
@keyframes dot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.7); }
  40% { opacity: 1; transform: scale(1); }
}

.footer-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 20px;
}

/* ===== 成功提示 ===== */
.toast {
  position: fixed; inset: 0;
  background: rgba(10,24,68,0.6);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 99;
  animation: fadeIn .3s ease;
  padding: 24px;
}
/* 必须显式声明，否则会覆盖 [hidden] 默认的 display:none */
.toast[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.toast-card {
  background: #fff;
  border-radius: 24px;
  padding: 32px 28px 24px;
  width: 100%; max-width: 360px;
  text-align: center;
  animation: pop .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
@keyframes pop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.toast-icon {
  color: #2bd9a0;
  margin-bottom: 14px;
  display: inline-block;
}
.toast-icon svg { animation: drawCheck .8s ease forwards; }
@keyframes drawCheck {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.toast-card h3 { font-size: 22px; margin-bottom: 24px; color: var(--text); }
.toast-card p { font-size: 14px; color: var(--text-soft); margin-bottom: 22px; }

.toast-actions { display: flex; gap: 10px; }
.toast-actions button {
  flex: 1; height: 44px;
  border-radius: 12px;
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  border: none;
}
.btn-ghost {
  background: #f1f4fa; color: var(--text);
}
.btn-ghost:active { background: #e5eaf3; }
.btn-primary {
  background: linear-gradient(135deg, #4a6cf7, #b48aff); color: #fff;
}
.btn-primary:active { transform: scale(0.97); }

/* 错误状态 */
.field.error input,
.field.error textarea {
  border-color: #ff5e7a;
  background: #fff5f7;
}

/* 移动端微调 */
@media (max-width: 380px) {
  .hero { padding-bottom: 48px; }
  .hero-desc { font-size: 15px; }
  .hero-desc em { font-size: 17px; }
}
