:root {
  --bg: #f0f2f8;
  --surface: #fff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #5b1a8a;
  --accent: #9b4dff;
  --red: #ff2d55;
  --gold: #ffd700;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(30, 41, 59, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.app__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.app__desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.layout--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.panel__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.panel__title { font-size: 16px; font-weight: 700; }

.form {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 8px;
}

.form__input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.form__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(155, 77, 255, 0.15);
}

.form__hint {
  min-height: 20px;
  font-size: 13px;
  color: var(--red);
  margin-top: 4px;
}

.form__hint--ok { color: #059669; }

.btn {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 12px;
}

.btn--block { width: 100%; }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}

.btn--ghost {
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.output {
  padding: 20px;
  flex: 1;
}

.output__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.output__lan-tip {
  font-size: 12px;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.output__link-box {
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  word-break: break-all;
}

.output__link {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

.output__link:hover { text-decoration: underline; }

.output__summary {
  margin-top: 20px;
  font-size: 13px;
}

.output__summary dt {
  font-weight: 600;
  color: var(--muted);
  margin-top: 10px;
}

.output__summary dd {
  color: var(--text);
  word-break: break-all;
}

/* ========== 页面 B ========== */
.page-b {
  background: #1a0530;
}

.promo {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.promo__bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(155, 77, 255, 0.35), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255, 45, 85, 0.25), transparent),
    linear-gradient(160deg, #2d0a4e, #1a0530 50%, #3d0a20);
  z-index: 0;
}

.promo__header,
.promo__main,
.promo__footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
}

.promo__phase {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 20px;
}

.promo__hint {
  text-align: center;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 900;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(255, 45, 85, 0.45);
}

.promo__card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  margin-bottom: 28px;
}

.promo__card--glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.promo__glass-panel {
  padding: 28px 24px;
  text-align: center;
}

.promo__glass-panel--waiting {
  position: relative;
  padding: 0;
  min-height: 200px;
  overflow: hidden;
  border-radius: 16px;
}

.promo__price-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 0;
  user-select: none;
  pointer-events: none;
  filter: blur(16px);
  opacity: 0.28;
  transform: scale(1.12);
}

.promo__price-num {
  font-size: clamp(56px, 18vw, 88px);
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 210, 100, 0.35);
  -webkit-text-fill-color: rgba(255, 210, 100, 0.35);
  background: none;
  letter-spacing: 0.08em;
  filter: blur(6px);
}

.promo__price-unit {
  font-size: clamp(22px, 6vw, 32px);
  font-weight: 800;
  color: rgba(255, 200, 120, 0.28);
  align-self: flex-end;
  margin-bottom: 12px;
  filter: blur(5px);
  letter-spacing: 0.12em;
}

.promo__glass-frost {
  position: relative;
  z-index: 1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.18) 100%);
  backdrop-filter: blur(36px) saturate(1.6) brightness(1.15);
  -webkit-backdrop-filter: blur(36px) saturate(1.6) brightness(1.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 60px rgba(255, 255, 255, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.2);
}

.promo__glass-frost::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 2px,
    transparent 2px,
    transparent 6px
  );
  pointer-events: none;
}

.promo__glass-title {
  position: relative;
  z-index: 1;
  font-size: clamp(20px, 5.5vw, 28px);
  font-weight: 900;
  line-height: 1.45;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.06em;
}

.promo__card-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  text-align: left;
}

.promo__card-url {
  font-size: 13px;
  word-break: break-all;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 18px;
  line-height: 1.6;
  text-align: left;
  padding: 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.promo__cta {
  display: block;
  text-align: center;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  color: #2d0a4e;
  text-decoration: none;
  background: linear-gradient(135deg, var(--gold), #ff9f43);
  border-radius: 999px;
  transition: transform 0.2s, filter 0.2s;
  box-shadow: 0 6px 24px rgba(255, 215, 0, 0.35);
}

.promo__cta:hover {
  transform: scale(1.02);
  filter: brightness(1.06);
}

.promo__countdown {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.promo__countdown-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.promo__countdown-target {
  font-size: 15px;
  font-weight: 600;
  color: var(--gold);
  margin-top: 16px;
  line-height: 1.6;
}

.promo__countdown-digits {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.promo__countdown-digits span {
  min-width: 64px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.promo__countdown-digits b {
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.promo__countdown-digits small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.promo__footer {
  margin-top: auto;
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.promo--error {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  background: #1a0530;
  color: #fff;
}

.promo--error__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
}

.promo--error__desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  max-width: 360px;
}

@media (max-width: 768px) {
  .layout--two { grid-template-columns: 1fr; }
}
