:root {
  /* 取自 logo 的金橙 + 海报的暗红黑 + 米白 */
  --gold: #f0c078;
  --gold-hot: #ffae1a;
  --gold-deep: #c07830;
  --gold-dark: #a86030;
  --red: #c01f1f;
  --red-deep: #781818;
  --red-ink: #300000;
  --ink: #140404;
  --ink-2: #1d0808;
  --ink-3: #2a0f0f;
  --cream: #f0d8c0;
  --cream-dim: #d8c0a8;
  --muted: rgba(240, 216, 192, 0.56);
  --muted-2: rgba(240, 216, 192, 0.34);
  --line: rgba(240, 192, 120, 0.18);
  --line-strong: rgba(240, 192, 120, 0.42);
  --ok: #4ade80;
  --warn: #fbbf24;
  --bad: #f87171;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --glow: 0 0 28px rgba(240, 174, 26, 0.3);
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* 长页面滚到底时露出的底色，防止页脚出现白边 */
  background: #120303;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(192, 31, 31, 0.34), transparent 62%),
    radial-gradient(820px 520px at 8% 4%, rgba(240, 174, 26, 0.14), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, #190606 46%, #120303 100%);
  background-attachment: fixed;
  background-color: #120303;
  color: var(--cream);
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 水泥墙噪点，对应海报的斑驳质感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px 20px 64px;
}

/* ───────────── 顶栏 ───────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 22px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: var(--glow);
  background: var(--ink-2);
}

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

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--gold-hot), var(--gold), #fff0d0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

/* ───────────── 按钮 ───────────── */

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s, background 0.2s;
  white-space: nowrap;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--gold-hot), var(--gold-deep));
  color: #2a1400;
  box-shadow: 0 8px 26px rgba(240, 174, 26, 0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 10px 34px rgba(240, 174, 26, 0.46);
}

.btn-ghost {
  background: rgba(240, 216, 192, 0.07);
  color: var(--cream);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(240, 216, 192, 0.13);
}

.btn-block {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  letter-spacing: 1px;
}

.btn-wallet {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

/* ───────────── 主视觉 ───────────── */

.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 26px;
  box-shadow: var(--shadow);
  background: var(--ink-2);
}

.hero-banner {
  display: block;
  width: 100%;
  height: clamp(130px, 22vw, 210px);
  object-fit: cover;
  object-position: center 42%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(20, 4, 4, 0.9) 0%,
    rgba(20, 4, 4, 0.45) 42%,
    rgba(20, 4, 4, 0.14) 70%,
    rgba(20, 4, 4, 0.72) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(18px, 4vw, 40px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  background: rgba(192, 31, 31, 0.3);
  border: 1px solid rgba(240, 192, 120, 0.4);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 10px;
  backdrop-filter: blur(6px);
}

.hero-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-hot);
  box-shadow: 0 0 10px var(--gold-hot);
  animation: blink 1.9s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hero-title {
  font-size: clamp(27px, 5.6vw, 46px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.85);
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-hot), var(--gold), #fff2d8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  margin-top: 7px;
  font-size: clamp(12.5px, 2.2vw, 14.5px);
  color: var(--cream-dim);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  max-width: 30em;
}

/* ───────────── 通用卡片 ───────────── */

.card {
  background: linear-gradient(170deg, rgba(42, 15, 15, 0.86), rgba(20, 4, 4, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 0.4px;
}

.card-title::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-hot), var(--red));
}

/* ───────────── 数据条 ───────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.stat {
  background: linear-gradient(165deg, rgba(42, 15, 15, 0.8), rgba(20, 4, 4, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 15px;
  min-width: 0;
}

.stat-label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.6px;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  font-size: clamp(16px, 2.6vw, 21px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  line-height: 1.25;
  word-break: break-all;
}

.stat-value small {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}

/* ───────────── 主体两栏 ───────────── */

.main {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 18px;
  align-items: start;
}

/* ───────────── 兑换区 ───────────── */

.swap-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  padding: 15px;
}

.swap-box + .swap-box {
  margin-top: 8px;
}

.swap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 9px;
}

.swap-bal {
  cursor: pointer;
  transition: color 0.15s;
  font-variant-numeric: tabular-nums;
}

.swap-bal:hover {
  color: var(--gold);
}

.swap-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.swap-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--cream);
  font-size: clamp(21px, 4vw, 27px);
  font-weight: 700;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  width: 100%;
}

.swap-input::placeholder {
  color: var(--muted-2);
}

.swap-input:disabled {
  color: var(--muted);
}

.swap-input::-webkit-outer-spin-button,
.swap-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.swap-token {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(240, 192, 120, 0.09);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 13px 6px 7px;
  flex: 0 0 auto;
}

.swap-token img {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
}

.swap-token-dot {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-hot), var(--red));
  display: grid;
  place-items: center;
  font-size: 13px;
}

.swap-token span {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.swap-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -10px auto;
  position: relative;
  z-index: 2;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-hot), var(--gold-deep));
  color: #2a1400;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.6);
}

.pcts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 13px 0;
}

.pct {
  background: rgba(240, 216, 192, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--cream-dim);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 9px 0;
  cursor: pointer;
  transition: all 0.15s;
}

.pct:hover {
  border-color: var(--line-strong);
  color: var(--gold);
}

.pct.on {
  background: rgba(240, 174, 26, 0.17);
  border-color: var(--gold);
  color: var(--gold);
}

/* ───────────── 状态提示 ───────────── */

.note {
  display: none;
  gap: 9px;
  align-items: flex-start;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
  word-break: break-word;
}

.note.show {
  display: flex;
}

.note-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.45;
}

.note.info {
  background: rgba(240, 174, 26, 0.1);
  border: 1px solid rgba(240, 174, 26, 0.3);
  color: var(--gold);
}

.note.ok {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--ok);
}

.note.bad {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--bad);
}

.note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ───────────── 规则清单 ───────────── */

.rules {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(240, 192, 120, 0.09);
}

.rule:last-child {
  border-bottom: 0;
}

.rule-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: rgba(240, 174, 26, 0.14);
  border: 1px solid rgba(240, 174, 26, 0.26);
  margin-top: 1px;
}

.rule-icon.pass {
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.32);
}

.rule-icon.fail {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.32);
}

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

.rule-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}

.rule-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
  word-break: break-word;
}

/* ───────────── 迁移步骤 ───────────── */

.steps {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(240, 192, 120, 0.09);
}

.step:last-child {
  border-bottom: 0;
}

.step-no {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 800;
  background: rgba(240, 174, 26, 0.13);
  border: 1px solid rgba(240, 174, 26, 0.3);
  color: var(--gold);
  margin-top: 1px;
}

.step.done .step-no {
  background: linear-gradient(135deg, var(--gold-hot), var(--gold-deep));
  border-color: transparent;
  color: #2a1400;
  font-size: 14px;
}

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

.step-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}

.step-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
  word-break: break-word;
}

.step-desc a {
  color: var(--gold);
  text-decoration: none;
}

.step-desc a:hover {
  text-decoration: underline;
}

/* ───────────── 额度进度条 ───────────── */

.quota + .quota {
  margin-top: 15px;
}

.quota-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  margin-bottom: 7px;
}

.quota-head b {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.quota-head span {
  color: var(--muted);
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(240, 216, 192, 0.1);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-hot), var(--red));
  transition: width 0.5s ease;
  width: 0;
}

.quota-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted-2);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

/* ───────────── 合约信息 ───────────── */

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(240, 192, 120, 0.09);
  font-size: 12.5px;
}

.kv:last-child {
  border-bottom: 0;
}

.kv-k {
  color: var(--muted);
  flex: 0 0 auto;
}

.kv-v {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--cream-dim);
  text-align: right;
  word-break: break-all;
}

.kv-v a {
  color: var(--gold);
  text-decoration: none;
}

.kv-v a:hover {
  text-decoration: underline;
}

/* ───────────── 页脚 ───────────── */

.footer {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.socials {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(240, 216, 192, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  color: var(--cream-dim);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.social:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.copyright {
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ───────────── 弹窗 ───────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 2, 2, 0.84);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
}

.modal-box {
  width: min(420px, 100%);
  background: linear-gradient(170deg, #2a0f0f, #140404);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--gold);
}

.modal-text {
  font-size: 13.5px;
  color: var(--cream-dim);
  line-height: 1.65;
  margin-bottom: 18px;
  word-break: break-word;
}

.modal-text a {
  color: var(--gold);
  word-break: break-all;
}

.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border: 3px solid rgba(240, 192, 120, 0.2);
  border-top-color: var(--gold-hot);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ───────────── 响应式 ───────────── */

@media (max-width: 900px) {
  .main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .page {
    padding: 14px 14px 46px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .header {
    padding: 10px 0 16px;
  }
  .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
  .brand-name {
    font-size: 17px;
  }
  .brand-sub {
    font-size: 10.5px;
  }
  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  .card {
    padding: 16px;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .pcts {
    grid-template-columns: repeat(2, 1fr);
  }
}
