:root {
  --bg: #0b1016;
  --panel: #131a23;
  --panel-2: #182230;
  --line: #23303f;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #23c08a;
  --accent-2: #2b8cff;
  --warn: #ffb648;
  --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.7 -apple-system, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
.wrap { width: min(980px, 92vw); margin: 0 auto; }
.top { border-bottom: 1px solid var(--line); background: rgba(11,16,22,.92); position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 9; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
.brand small { color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.top nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 14px; }
.top nav a:hover { color: var(--text); }

h1 { font-size: 30px; margin: 34px 0 8px; letter-spacing: .01em; }
.lead { color: var(--muted); margin: 0 0 26px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 18px; }
h2 { font-size: 17px; margin: 0 0 16px; font-weight: 600; }

.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.pkg { position: relative; display: block; cursor: pointer; }
.pkg input { position: absolute; opacity: 0; }
.pkg .box { border: 1px solid var(--line); background: var(--panel-2); border-radius: 12px; padding: 18px; transition: .15s; height: 100%; }
.pkg input:checked + .box { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(35,192,138,.18); }
.pkg .m { font-size: 13px; color: var(--muted); }
.pkg .price { font-size: 26px; font-weight: 700; margin: 8px 0 2px; }
.pkg .price span { font-size: 13px; color: var(--muted); font-weight: 400; }
.pkg .alt { font-size: 12.5px; color: var(--muted); }

.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.method { position: relative; cursor: pointer; }
.method input { position: absolute; opacity: 0; }
.method .box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel-2); }
.method input:checked + .box { border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(43,140,255,.18); }
.method .t { font-weight: 600; }
.method .s { color: var(--muted); font-size: 12.5px; }
.method.disabled { opacity: .45; cursor: not-allowed; }

label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=number], textarea, select {
  width: 100%; background: #0e151d; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 13px; font: inherit; outline: none;
}
input:focus, textarea:focus { border-color: var(--accent-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-block; border: 0; border-radius: 10px; padding: 12px 22px; font: inherit; font-weight: 600;
  background: var(--accent); color: #04220f; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.block { width: 100%; text-align: center; }

.hint { color: var(--muted); font-size: 13px; }
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.alert.err { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.4); color: #ffb3b3; }
.alert.ok { background: rgba(35,192,138,.12); border: 1px solid rgba(35,192,138,.4); color: #7ff0c4; }
.alert.warn { background: rgba(255,182,72,.12); border: 1px solid rgba(255,182,72,.4); color: #ffd79a; }

.orderno { font-family: ui-monospace, Consolas, monospace; font-size: 22px; letter-spacing: .04em; color: var(--accent); }
.qr { background: #fff; padding: 10px; border-radius: 12px; display: inline-block; }
.qr img { display: block; width: 220px; height: 220px; }
.addr { font-family: ui-monospace, Consolas, monospace; word-break: break-all; background: #0e151d; border: 1px dashed var(--line);
  border-radius: 10px; padding: 12px; margin-top: 10px; font-size: 13.5px; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; border: 1px solid; }
.badge.PENDING { color: var(--muted); border-color: var(--line); }
.badge.SUBMITTED { color: var(--warn); border-color: rgba(255,182,72,.5); }
.badge.PAID, .badge.ISSUED { color: var(--accent); border-color: rgba(35,192,138,.5); }
.badge.MISMATCH { color: var(--danger); border-color: rgba(255,107,107,.5); }
.badge.CANCELLED { color: var(--muted); border-color: var(--line); }

.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 20px 0 40px; color: var(--muted); font-size: 13px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@keyframes pageIn { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }
main.wrap { animation: pageIn .22s ease-out; }

/* ---- 开屏：逐字书写，总时长 5 秒 ---- */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: #050608; display: grid; place-items: center;
  animation: splashOut .55s ease 5.2s forwards;
}
.splash-wrap { position: relative; display: inline-block; }


.splash-word {
  display: inline-block;
  font-family: "Segoe Script", "Brush Script MT", "Snell Roundhand", "Apple Chancery", cursive;
  font-size: min(20vw, 168px);
  font-weight: 700; font-style: italic; letter-spacing: -.02em;
  transform: rotate(-4deg);
  filter: drop-shadow(0 0 24px rgba(236,72,153,.16));
  white-space: nowrap;
}


/* 每个字母单独擦出来 */
.splash-word i {
  font-style: inherit; display: inline-block;
  padding: .12em .1em .16em;
  margin: -.12em -.05em -.16em;
  overflow: visible;
  background-image: linear-gradient(94deg, #22d3ee 0%, #facc15 20%, #f97316 38%, #ec4899 57%, #6366f1 76%, #38bdf8 100%);
  background-size: 700% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  clip-path: inset(-100% 100% -100% 0);
  animation: letterWrite .95s cubic-bezier(.45,.05,.3,1) forwards;
}
.splash-word i:nth-child(1) { background-position: 0% 0; }
.splash-word i:nth-child(2) { background-position: 16.6% 0; }
.splash-word i:nth-child(3) { background-position: 33.3% 0; }
.splash-word i:nth-child(4) { background-position: 50% 0; }
.splash-word i:nth-child(5) { background-position: 66.6% 0; }
.splash-word i:nth-child(6) { background-position: 83.3% 0; }
.splash-word i:nth-child(7) { background-position: 100% 0; }
.splash-word i:nth-child(1) { animation-delay: 0s;    transform: translateY(0)    rotate(-1deg); }
.splash-word i:nth-child(2) { animation-delay: .62s;  transform: translateY(-2px) rotate(1deg); }
.splash-word i:nth-child(3) { animation-delay: 1.24s; transform: translateY(1px)  rotate(-1.5deg); }
.splash-word i:nth-child(4) { animation-delay: 1.86s; transform: translateY(-1px) rotate(1deg); }
.splash-word i:nth-child(5) { animation-delay: 2.48s; transform: translateY(2px)  rotate(-1deg); }
.splash-word i:nth-child(6) { animation-delay: 3.10s; transform: translateY(-2px) rotate(1.5deg); }
.splash-word i:nth-child(7) { animation-delay: 3.72s; transform: translateY(0)    rotate(-1deg); }

@keyframes letterWrite {
  0%   { clip-path: inset(-100% 100% -100% 0) }
  100% { clip-path: inset(-100% 0% -100% 0) }
}

/* 笔尖：跟着每个字母的位置走 */
.splash-pen {
  position: absolute; top: 52%; left: 0;
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #fff; opacity: 0;
  box-shadow: 0 0 9px 3px rgba(255,255,255,.95),
              0 0 24px 9px rgba(236,72,153,.5),
              0 0 40px 16px rgba(99,102,241,.25);
  animation: penTravel 5s linear forwards;
}
@keyframes penTravel {
  0%    { left: 3%;  opacity: 0 }
  5%    { opacity: 1 }
  13%   { left: 15% }
  26%   { left: 30% }
  38%   { left: 44% }
  51%   { left: 57% }
  64%   { left: 70% }
  77%   { left: 84% }
  90%   { left: 95%; opacity: 1 }
  100%  { left: 98%; opacity: 0 }
}

@keyframes splashOut { to { opacity: 0; visibility: hidden } }

@media (prefers-reduced-motion: reduce) {
  .splash-word i { animation: none; clip-path: inset(-100% 0 -100% 0); }
  .splash-pen { display: none; }
  .splash { animation: splashOut .25s ease .3s forwards; }
}

/* ---- 手机端适配 v1 ---- */
.kv dd, .kv dt { word-break: break-all; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .topbar .brand { font-size: 14px; }
  .topbar nav { display: flex; gap: 10px; font-size: 13px; width: 100%; overflow-x: auto; }
  .topbar nav a { white-space: nowrap; }
  h1 { font-size: 22px; line-height: 1.3; margin: 14px 0 6px; }
  .lead { font-size: 13px; }
  .card { padding: 16px 14px; border-radius: 14px; }
  .packages { gap: 10px; }
  .pkg { padding: 14px; }
  .pkg .t { font-size: 13px; }
  .pkg .price { font-size: 26px; }
  .pkg .s { font-size: 12px; }
  .methods { gap: 8px; }
  .grid2 { grid-template-columns: 1fr; gap: 10px; }
  .price { font-size: 34px; }
  .orderno { font-size: 14px !important; word-break: break-all; }
  .kv { font-size: 13px; }
}


/* ---- 首页战绩 ---- */
.hero { padding: 26px 4px 10px; }
.hero h1 { font-size: 30px; margin: 0 0 10px; }
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 8px; }
.stat { background: #0f141c; border: 1px solid #1b2430; border-radius: 14px; padding: 16px; text-align: center; }
.stat-v { font-size: 26px; font-weight: 800; color: #3ddc97; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 12.5px; color: #8b98a5; margin-top: 6px; }
@media (max-width: 640px) {
  .hero h1 { font-size: 22px; }
  .stat-v { font-size: 20px; }
}


/* ---- 交易明细 ---- */
.trades { margin-top: 6px; }
.trade { display: flex; align-items: center; justify-content: space-between;
         padding: 12px 0; border-bottom: 1px solid #1b2430; }
.trade:last-child { border-bottom: 0; }
.trade-l { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.trade-l .buy { color: #3ddc97; font-weight: 700; }
.trade-l .sell { color: #ff7b72; font-weight: 700; }
.trade-r { font-weight: 800; font-variant-numeric: tabular-nums; }
.trade-r.up { color: #3ddc97; }
.trade-r.down { color: #ff7b72; }
