/* ==========================================================================
   提交页 · 内容制作中心（紫罗兰）
   ========================================================================== */

.task-page {
  --violet-700: #5a3ad0;
  --violet-600: #6a49e0;
  --violet-500: #7b5cf0;
  --violet-100: #ece6ff;
  --violet-050: #f3efff;
  --ink-strong: #1c1633;
  --ink-soft: #3c3555;
  --muted: #767190;
  --muted-soft: #8b86a3;
  --line: #e7e1f7;

  min-height: 100vh;
  padding: 40px 20px 30px;
  background:
    radial-gradient(900px 480px at 50% -8%, #e4dcff 0%, rgba(228, 220, 255, 0) 62%),
    radial-gradient(600px 420px at 100% 100%, #efe9ff 0%, rgba(239, 233, 255, 0) 70%),
    linear-gradient(180deg, #f8f6ff 0%, #f1ecff 100%);
  color: var(--ink-strong);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.task-shell {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* 关掉 base.css 的纸感网点，换成本页的紫罗兰底 */
.task-page::before {
  content: none;
}

/* ---------- 外层卡片 ---------- */
.gate-card,
.form-card {
  padding: 22px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  background: #fff;
  box-shadow:
    0 30px 80px rgba(76, 58, 160, 0.13),
    0 2px 8px rgba(76, 58, 160, 0.05);
}

/* ---------- 顶部品牌 ---------- */
.app-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 15px;
  background: linear-gradient(145deg, #8566ff, #6a49e0);
  color: #fff;
  box-shadow: 0 8px 20px rgba(106, 73, 224, 0.32);
}

.app-icon svg {
  width: 24px;
  height: 24px;
}

.app-head-text h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-head-text p {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted-soft);
}

/* ---------- 提示条 ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--violet-050);
  color: #56508a;
}

.notice-icon {
  display: flex;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  color: #7b6ad4;
}

.notice-icon svg {
  width: 100%;
  height: 100%;
}

.notice p {
  font-size: 12.5px;
  line-height: 1.72;
}

.notice b {
  color: #4a35b8;
  font-weight: 700;
}

/* ---------- 主视觉 ---------- */
.hero {
  position: relative;
  margin-top: 16px;
  padding: 24px 22px 52px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #7f5ff5 0%, #6a49e0 58%, #5f3fd4 100%);
  color: #fff;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
}

.hero::before {
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
}

.hero::after {
  width: 160px;
  height: 160px;
  right: 40px;
  bottom: -110px;
}

.hero-kicker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.82);
}

.hero-kicker i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}

.hero h2 {
  position: relative;
  margin-top: 12px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -0.015em;
}

.hero-desc {
  position: relative;
  margin-top: 10px;
  max-width: 94%;
  font-size: 12.5px;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.86);
}

/* ---------- 白色内容区 ---------- */
.sheet {
  position: relative;
  margin: -30px 4px 0;
  padding: 22px 18px 16px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(76, 58, 160, 0.1);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--violet-100);
  color: var(--violet-600);
}

.sheet-icon svg {
  width: 22px;
  height: 22px;
}

.sheet-head h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sheet-head p {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted-soft);
}

/* ---------- 套餐 ---------- */
.package-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1.5px dashed #ded6f8;
  border-radius: 12px;
  background: #fdfcff;
}

.package-row span {
  font-size: 12.5px;
  color: var(--muted);
}

.package-row strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-strong);
}

/* ---------- 预计数据 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.stat-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #ece6ff;
  border-radius: 12px;
  background: var(--violet-050);
}

.stat-item span {
  font-size: 12px;
  color: #6f6a8c;
  white-space: nowrap;
}

.stat-item strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--violet-700);
  font-variant-numeric: tabular-nums;
}

/* ---------- 表单字段 ---------- */
.field {
  margin-top: 16px;
}

.field-label {
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #2b2545;
}

.req {
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #fff2df;
  color: #b26a00;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin-top: 8px;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  background: #fff;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.input-wrap:focus-within {
  border-color: var(--violet-500);
  box-shadow: 0 0 0 3px rgba(123, 92, 240, 0.15);
}

.input-wrap.is-invalid {
  border-color: #e0643c;
  box-shadow: 0 0 0 3px rgba(224, 100, 60, 0.12);
}

.input-icon {
  display: flex;
  width: 18px;
  height: 18px;
  flex: none;
  color: #a49dbd;
}

.input-icon svg {
  width: 100%;
  height: 100%;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink-strong);
  font-size: 15px;
}

.input-wrap input::placeholder {
  color: #aaa4bf;
}

.field-error {
  min-height: 15px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.5;
  color: #c2410c;
}

.field-hint {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted-soft);
}

/* ---------- 主按钮 ---------- */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  margin-top: 20px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #8266f7, #6a49e0 62%, #5f3fd4);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(106, 73, 224, 0.28);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(106, 73, 224, 0.34);
}

.submit-btn:active {
  transform: translateY(0) scale(0.995);
}

.submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.submit-arrow {
  display: flex;
  width: 18px;
  height: 18px;
}

.submit-arrow svg {
  width: 100%;
  height: 100%;
}

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

.submit-btn.is-loading .task-spinner {
  display: block;
}

.submit-btn.is-loading .submit-arrow {
  display: none;
}

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

/* ---------- 成功态 ---------- */
.success {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #ded6f8;
  border-radius: 16px;
  background: var(--violet-050);
}

.success-check {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, #8566ff, #6a49e0);
  color: #fff;
  vertical-align: top;
}

.success-check svg {
  width: 18px;
  height: 18px;
}

.success-text {
  display: inline-block;
  width: calc(100% - 48px);
}

.success-text h3 {
  font-size: 16px;
  font-weight: 700;
}

.success-text p {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.success-code {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0 44px;
  font-size: 11px;
  color: var(--muted-soft);
}

.success-code strong {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #4a35b8;
}

.success-again {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border: 1.5px solid #d8cffa;
  border-radius: 12px;
  background: #fff;
  color: #5a3ad0;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.success-again:hover {
  background: #f7f4ff;
  border-color: #c3b4f6;
}

/* ---------- 页脚 ---------- */
.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 600px;
  margin: 18px auto 0;
  font-size: 11px;
  color: var(--muted-soft);
}

.task-footer-links {
  display: flex;
  gap: 14px;
}

.task-footer-links a {
  color: #6a49e0;
  text-decoration: none;
}

.task-footer-links a:hover {
  text-decoration: underline;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 520px) {
  .task-page {
    padding: 18px 12px 26px;
  }

  .gate-card,
  .form-card {
    padding: 18px 14px 14px;
    border-radius: 24px;
  }

  .hero {
    padding: 22px 18px 48px;
  }

  .hero h2 {
    font-size: 26px;
  }

  .sheet {
    margin: -26px 0 0;
    padding: 20px 14px 14px;
  }
}
