/* /cx/redeem/ 专用样式：复用上级 styles.css 的设计 tokens（--blue/--ink/... 与按钮） */

body {
  background:
    radial-gradient(900px 460px at 100% 0%, rgba(14, 165, 233, 0.11), transparent 62%),
    radial-gradient(760px 520px at -8% 75%, rgba(37, 99, 235, 0.09), transparent 65%),
    linear-gradient(180deg, #f7faff 0%, #f3f6fc 54%, #f8faff 100%);
}

.site-header {
  border-bottom-color: rgba(215, 224, 238, 0.78);
  box-shadow: 0 1px 14px rgba(15, 30, 51, 0.035);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-deep);
  text-decoration: none;
  padding: 8px 13px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 10px;
  background: rgba(234, 241, 255, 0.66);
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease,
    border-color 0.15s ease;
}

.nav-link:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-1px);
}

.redeem-main {
  position: relative;
  padding-top: 22px;
  padding-bottom: 52px;
}

/* ---- 头部横幅 ---- */
.redeem-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 20px;
  padding: 27px 24px 23px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(60% 170% at 0% 0%, rgba(255, 255, 255, 0.94), transparent 62%),
    radial-gradient(55% 170% at 100% 100%, rgba(14, 165, 233, 0.22), transparent 65%),
    linear-gradient(135deg, #eef5ff 0%, #e0f2fe 52%, #ecfeff 100%);
  box-shadow:
    0 20px 40px rgba(37, 99, 235, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  text-align: center;
}

.redeem-hero::before,
.redeem-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.09);
}

.redeem-hero::before {
  width: 290px;
  height: 290px;
  top: -192px;
  right: -70px;
}

.redeem-hero::after {
  width: 180px;
  height: 180px;
  left: -92px;
  bottom: -125px;
}

.redeem-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.15;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: 0.025em;
}

.redeem-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  max-width: 590px;
  margin: 0 auto;
}

.redeem-step {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  backdrop-filter: blur(8px);
}

.redeem-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.26);
}

.redeem-step-sep {
  flex: none;
  color: rgba(37, 99, 235, 0.45);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

/* ---- 卡片 ---- */
.redeem-card {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(215, 224, 238, 0.9);
  border-radius: 20px;
  box-shadow:
    0 14px 36px rgba(36, 72, 125, 0.075),
    0 2px 6px rgba(15, 30, 51, 0.025);
  padding: 26px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
}

.panel-kicker {
  margin: 0 0 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.redeem-panel-head,
.redeem-aside-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.redeem-panel-icon,
.redeem-aside-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--blue);
  background: linear-gradient(135deg, #edf4ff, #dceaff);
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: inset 0 1px 0 #fff;
}

.redeem-aside-icon {
  width: 40px;
  height: 40px;
  color: #0369a1;
  background: linear-gradient(135deg, #ecfeff, #e0f2fe);
  border-color: rgba(14, 165, 233, 0.14);
}

.redeem-panel-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.redeem-panel-sub {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 11.5px;
}

.redeem-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, 0.88fr);
  gap: 32px;
}

/* ---- 表单 ---- */
.field-block {
  margin-bottom: 17px;
}

.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 750;
  color: var(--ink);
  margin-bottom: 8px;
}

.redeem-required {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 999px;
  padding: 1px 7px;
}

.field-input {
  width: 100%;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field-input:hover {
  border-color: #c3d2e8;
}

.field-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  background: #fff;
}

.redeem-input-shell {
  display: flex;
  align-items: center;
  min-height: 49px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fbfdff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.redeem-input-shell:hover {
  border-color: #b9c9e2;
  background: #fff;
}

.redeem-input-shell:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.redeem-input-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 48px;
  color: #7b8aa2;
}

.redeem-input-shell:focus-within .redeem-input-icon {
  color: var(--blue);
}

.redeem-input-shell .field-input {
  min-width: 0;
  padding: 13px 14px 13px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.redeem-input-shell .field-input:hover,
.redeem-input-shell .field-input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.field-input--mono {
  font-family: var(--mono);
  letter-spacing: 0.03em;
}

.redeem-code-input {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.field-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.6;
}

.field-hint-mark {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border-radius: 50%;
  color: #fff;
  background: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.field-status {
  margin: 7px 0 0;
  font-size: 12px;
  min-height: 17px;
  color: var(--faint);
}

.field-status.is-ok {
  padding-left: 19px;
  color: var(--ok);
  font-weight: 650;
  background:
    radial-gradient(circle at 6px 50%, var(--ok) 0 3px, transparent 3.5px);
}

.field-status.is-bad {
  padding-left: 19px;
  color: var(--danger);
  font-weight: 650;
  background:
    radial-gradient(circle at 6px 50%, var(--danger) 0 3px, transparent 3.5px);
}

.redeem-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  justify-content: center;
  min-height: 50px;
  margin-top: 2px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 15.5px;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.redeem-submit::after {
  content: "→";
  margin-left: 8px;
  font-size: 17px;
  transition: transform 0.16s ease;
}

.redeem-submit:hover::after {
  transform: translateX(3px);
}

.redeem-submit:disabled {
  color: #8b97ab;
  background: #eef2f7;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
  transform: none;
}

.redeem-submit:disabled::after {
  opacity: 0.45;
}

.form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--danger);
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 11px;
}

/* ---- 加固模式（邮箱验证码） ---- */
.redeem-guard-row {
  border: 1px dashed rgba(180, 83, 9, 0.4);
  border-radius: 12px;
  padding: 12px;
  background: var(--warn-soft);
}

.redeem-guard-note {
  font-size: 12px;
  color: var(--warn);
  margin-bottom: 8px;
  line-height: 1.6;
}

.redeem-guard-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--warn);
  border-radius: 999px;
  padding: 1px 8px;
  margin-right: 6px;
}

.redeem-guard-fields {
  display: flex;
  gap: 8px;
}

.redeem-guard-fields .field-input {
  flex: 1;
}

.redeem-guard-fields .btn-secondary {
  white-space: nowrap;
}

/* ---- 右侧须知 ---- */
.redeem-form-aside {
  align-self: start;
  padding: 21px 20px 18px;
  border: 1px solid #e2eaf5;
  border-radius: 16px;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(14, 165, 233, 0.06), transparent 65%),
    linear-gradient(180deg, #f9fbff, #f7faff);
}

.redeem-aside-head {
  margin-bottom: 14px;
}

.redeem-notes {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.redeem-notes li {
  position: relative;
  padding-left: 23px;
}

.redeem-notes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #047857;
  background: #d1fae5;
  font-size: 10px;
  font-weight: 900;
}

.redeem-notes strong {
  color: var(--ink);
}

.redeem-faq {
  overflow: hidden;
  border: 1px solid #e2eaf5;
  border-radius: 11px;
  padding: 0 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.82);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.redeem-faq:hover,
.redeem-faq[open] {
  border-color: #c7d8f3;
  background: #fff;
}

.redeem-faq summary {
  position: relative;
  cursor: pointer;
  padding: 11px 25px 11px 0;
  font-weight: 700;
  color: var(--ink);
  font-size: 12.5px;
  list-style: none;
}

.redeem-faq summary::-webkit-details-marker {
  display: none;
}

.redeem-faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  color: var(--blue);
  font-size: 18px;
  font-weight: 500;
  transform: translateY(-50%);
  transition: transform 0.15s ease;
}

.redeem-faq[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.redeem-faq p {
  margin: 0 0 12px;
  padding-top: 10px;
  border-top: 1px solid #edf1f7;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.redeem-faq code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--blue-soft);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ---- 官网商城引导 ---- */
.redeem-promo {
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.24);
  background:
    radial-gradient(60% 170% at 0% 0%, rgba(255, 255, 255, 0.96), transparent 64%),
    radial-gradient(55% 180% at 100% 100%, rgba(14, 165, 233, 0.18), transparent 65%),
    linear-gradient(135deg, #eef5ff 0%, #e0f2fe 52%, #ecfeff 100%);
  box-shadow:
    0 15px 32px rgba(37, 99, 235, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.redeem-promo::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -90px;
  top: -110px;
  border: 1px solid rgba(37, 99, 235, 0.09);
  border-radius: 50%;
}

.redeem-promo-inner {
  display: flex;
  gap: 20px;
  align-items: center;
}

.redeem-promo-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.24);
  backdrop-filter: blur(8px);
}

.redeem-promo-body {
  flex: 1;
  min-width: 0;
}

.redeem-promo-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 4px;
  color: #123260;
  font-size: 17px;
  font-weight: 800;
}

.redeem-hot-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.28);
}

.redeem-promo-kicker {
  color: #7dd3fc;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.redeem-promo-desc {
  margin: 0;
  font-size: 13.5px;
  color: #527096;
  line-height: 1.7;
}

.redeem-promo-desc strong {
  color: var(--blue-deep);
}

.redeem-promo-features {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.redeem-promo-features span {
  padding: 3px 8px;
  border: 1px solid rgba(191, 219, 254, 0.18);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.065);
  font-size: 10.5px;
  font-weight: 650;
}

.redeem-promo-btn {
  position: relative;
  z-index: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 10px;
  padding: 11px 18px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 9px 22px rgba(37, 99, 235, 0.28);
}

.redeem-promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 28px rgba(37, 99, 235, 0.36);
  filter: saturate(1.08);
}

/* ---- 处理中 / 挂起 / 结果 / 失败 ---- */
.redeem-processing,
.redeem-pending,
.redeem-maint {
  text-align: center;
  padding: 40px 24px;
}

.redeem-spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 16px;
  border: 3px solid var(--blue-soft);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: redeem-spin 0.9s linear infinite;
}

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

.redeem-processing-title,
.redeem-pending-title,
.redeem-maint-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.redeem-pending-title {
  color: var(--warn);
}

.redeem-processing-desc,
.redeem-pending-desc,
.redeem-maint-desc {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.redeem-pending {
  border-color: rgba(180, 83, 9, 0.3);
  background: linear-gradient(180deg, #fffdf8, #fff);
}

.redeem-pending .btn-secondary {
  margin-top: 8px;
}

.redeem-result-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.redeem-result {
  border-color: rgba(5, 150, 105, 0.24);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(16, 185, 129, 0.07), transparent 65%),
    #fff;
}

.redeem-result-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ok);
}

.redeem-result-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.redeem-result textarea {
  margin-top: 10px;
}

.redeem-result-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.copied-tip {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--ok);
}

.redeem-failed {
  border-color: rgba(220, 38, 38, 0.25);
}

.redeem-failed-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--danger);
}

.redeem-failed-desc {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.redeem-failed-orderno {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  display: inline-block;
}

.hidden {
  display: none !important;
}

/* ---- 响应式 ---- */
@media (max-width: 760px) {
  .redeem-main {
    padding-top: 16px;
  }

  .redeem-form-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .redeem-form-aside {
    padding: 21px 20px 18px;
  }

  .redeem-promo-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .redeem-promo-body {
    flex: 1 1 calc(100% - 82px);
  }

  .redeem-promo-btn {
    margin-left: 78px;
  }
}

@media (max-width: 520px) {
  .redeem-main {
    padding-right: 14px;
    padding-left: 14px;
    padding-bottom: 34px;
  }

  .brand-name {
    max-width: 190px;
    font-size: 13px;
  }

  .nav-link {
    padding: 7px 9px;
    font-size: 12px;
  }

  .redeem-hero {
    padding: 26px 15px 22px;
    border-radius: 18px;
  }

  .redeem-title {
    font-size: 29px;
  }

  .redeem-steps {
    gap: 6px;
    width: 100%;
  }

  .redeem-step {
    justify-content: center;
    gap: 5px;
    padding: 7px 6px;
    font-size: 10.5px;
    white-space: nowrap;
  }

  .redeem-step-sep {
    font-size: 13px;
  }

  .redeem-card {
    padding: 22px 18px;
    border-radius: 17px;
  }

  .redeem-panel-head {
    margin-bottom: 20px;
  }

  .redeem-panel-icon {
    width: 40px;
    height: 40px;
  }

  .redeem-panel-title {
    font-size: 16px;
  }

  .redeem-form-aside {
    margin-right: -4px;
    margin-left: -4px;
    padding: 19px 16px 15px;
  }

  .redeem-code-input {
    font-size: 13px;
    letter-spacing: 0.02em;
  }

  .redeem-input-icon {
    width: 40px;
  }

  .redeem-promo-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .redeem-promo-body {
    flex-basis: auto;
  }

  .redeem-promo-features {
    justify-content: center;
  }

  .redeem-promo-btn {
    justify-content: center;
    width: 100%;
    margin-left: 0;
  }

  .redeem-result-head {
    align-items: flex-start;
  }
}

/* ---------- 储值码结果视图（§44） ---------- */
.balance-amount {
  margin: 4px 0 14px;
  font-size: 26px;
  font-weight: 800;
  color: #059669;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
/* 「去商城」是 <a>：主按钮类是给 <button> 写的，锚点要压掉链接默认样式 */
a.btn-primary { text-decoration: none; }
a.btn-primary:visited { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
