/* ============================================================
   小微支付测试台 · 前台样式
   ============================================================ */
:root {
  --bg: #070b14;
  --bg-2: #0b1220;
  --panel: rgba(17, 25, 40, 0.72);
  --panel-solid: #111928;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #e9eefb;
  --text-dim: #9aa8c2;
  --text-mute: #64748b;
  --brand: #4f8cff;
  --brand-2: #6ee7ff;
  --accent: #22d3ee;
  --green: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.85);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------------- 背景光效 ---------------- */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(79, 140, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(34, 211, 238, 0.12), transparent 55%),
    linear-gradient(180deg, #070b14 0%, #080d18 40%, #060a11 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 460px; height: 460px; background: rgba(79, 140, 255, 0.55); top: -160px; left: -100px; }
.orb-2 { width: 380px; height: 380px; background: rgba(34, 211, 238, 0.4); top: 120px; right: -140px; animation-delay: -6s; }
.orb-3 { width: 320px; height: 320px; background: rgba(139, 92, 246, 0.35); bottom: -140px; left: 35%; animation-delay: -12s; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(20px, -26px, 0) scale(1.06); }
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ---------------- 头部 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), #2f6fe0);
  color: #fff;
  box-shadow: 0 8px 22px -8px rgba(79, 140, 255, 0.9);
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; letter-spacing: 0.2px; }
.brand-text small { font-size: 9.5px; letter-spacing: 1.6px; color: var(--text-mute); }

.site-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.nav-link:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
.nav-admin { border-color: var(--line-strong); color: var(--text); }
.nav-admin:hover { border-color: rgba(79, 140, 255, 0.6); color: var(--brand-2); }

/* ---------------- Hero ---------------- */
.main-home { padding: 56px 0 80px; }

.hero { text-align: center; max-width: 760px; margin: 0 auto 44px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--brand-2);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.24);
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-title {
  margin: 22px 0 16px;
  font-size: clamp(32px, 5.2vw, 52px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.8px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--brand-2), var(--brand) 55%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub { margin: 0 auto; max-width: 560px; color: var(--text-dim); font-size: 15px; }

.hero-metrics {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.metric { display: flex; flex-direction: column; gap: 2px; }
.metric-num { font-size: 24px; font-weight: 700; font-family: var(--mono); color: var(--text); }
.metric-label { font-size: 12px; color: var(--text-mute); letter-spacing: 0.6px; }

/* ---------------- 订单卡片 ---------------- */
.order-card {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 30px 34px 26px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
}
.card-glow {
  position: absolute;
  top: -1px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 255, 0.85), transparent);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.card-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.card-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--text-mute);
  border: 1px solid var(--line-strong);
  padding: 3px 9px;
  border-radius: 6px;
}

.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0; }
.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 9px;
  letter-spacing: 0.3px;
}
.field-hint { font-size: 11px; color: var(--text-mute); }

/* 商户选择 */
.merchant-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }

.merchant-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(148, 163, 184, 0.04);
  transition: all 0.18s ease;
  cursor: pointer;
  text-align: left;
}
.merchant-item:hover { border-color: var(--line-strong); background: rgba(148, 163, 184, 0.08); }
.merchant-item.active {
  border-color: rgba(79, 140, 255, 0.7);
  background: rgba(79, 140, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.25);
}
.merchant-dot {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.merchant-info { min-width: 0; flex: 1; }
.merchant-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.merchant-meta { display: block; font-size: 11px; color: var(--text-mute); }
.merchant-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
}
.merchant-item.active .merchant-check { border-color: var(--brand); background: var(--brand); }
.merchant-item.active .merchant-check::after {
  content: "";
  width: 5px; height: 3px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

/* 金额 */
.amount-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.amount-box:focus-within { border-color: rgba(79, 140, 255, 0.65); background: rgba(79, 140, 255, 0.06); }
.amount-symbol { font-size: 20px; color: var(--text-dim); }
.amount-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 30px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: 0.5px;
  padding: 4px 0;
}
.amount-unit { font-size: 11px; color: var(--text-mute); letter-spacing: 1px; }

.amount-presets {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.amount-presets button {
  flex: 1;
  min-width: 56px;
  padding: 7px 0;
  font-size: 12.5px;
  font-family: var(--mono);
  color: var(--text-dim);
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: all 0.16s ease;
}
.amount-presets button:hover { color: var(--text); border-color: var(--line-strong); }
.amount-presets button.active {
  color: var(--brand-2);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(34, 211, 238, 0.1);
}

/* 普通输入 */
.input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease;
}
.input::placeholder { color: var(--text-mute); }
.input:focus { border-color: rgba(79, 140, 255, 0.65); background: rgba(79, 140, 255, 0.06); }

.notice-line {
  font-size: 12px;
  color: var(--text-mute);
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.18);
  margin-bottom: 18px;
  line-height: 1.5;
}
.notice-line:empty { display: none; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #3f74e0);
  color: #fff;
  box-shadow: 0 10px 26px -12px rgba(79, 140, 255, 0.95);
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-submit {
  width: 100%;
  padding: 15px 22px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(120deg, #2b6ef5, #4f8cff 45%, #22d3ee);
  background-size: 180% 100%;
  box-shadow: 0 16px 36px -16px rgba(79, 140, 255, 0.95);
  transition: all 0.25s ease;
}
.btn-submit:hover { background-position: 100% 0; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-amount { font-family: var(--mono); font-size: 15px; opacity: 0.92; }

.form-foot {
  margin: 14px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-mute);
}
.form-foot span { color: var(--text-dim); }

/* 空状态 */
.empty-state { text-align: center; padding: 24px 10px 10px; }
.empty-icon {
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--brand-2);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.empty-icon svg { width: 30px; height: 30px; }
.empty-state h3 { margin: 0 0 8px; font-size: 16px; }
.empty-state p { margin: 0 auto 20px; max-width: 380px; font-size: 13px; color: var(--text-dim); }

/* 特性 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 980px;
  margin: 56px auto 0;
}
.feature {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(17, 25, 40, 0.5);
  transition: all 0.25s ease;
}
.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature-icon {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.feature-icon.c1 { color: #6ee7ff; background: rgba(34, 211, 238, 0.12); }
.feature-icon.c2 { color: #93b4ff; background: rgba(79, 140, 255, 0.12); }
.feature-icon.c3 { color: #c4b5fd; background: rgba(139, 92, 246, 0.14); }
.feature h3 { margin: 0 0 8px; font-size: 15px; }
.feature p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.65; }

/* ---------------- 页脚 ---------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  background: rgba(7, 11, 20, 0.6);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-mute);
}
.footer-inner p { margin: 0; }
.footer-meta { font-family: var(--mono); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 24px);
  padding: 12px 22px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: 0 20px 44px -20px #000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  z-index: 999;
  max-width: min(520px, calc(100% - 40px));
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(239, 68, 68, 0.5); }
.toast.success { border-color: rgba(16, 185, 129, 0.5); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero-metrics { gap: 32px; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .main-home { padding: 36px 0 56px; }
  .order-card { padding: 24px 20px 22px; border-radius: 20px; }
  .header-inner { height: 60px; }
  .brand-text small { display: none; }
  .nav-link { padding: 7px 12px; font-size: 12.5px; }
  .hero-metrics { gap: 24px; }
  .metric-num { font-size: 20px; }
  .amount-input { font-size: 26px; }
  .footer-inner { justify-content: center; text-align: center; }
}
