/* ══════════════════════════════════════════
   Design Tokens — Light Clear Service UI
   目标：浅色背景、少卡片化、信息清楚、移动端友好
══════════════════════════════════════════ */
:root {
  --bg: #f6f8fc;
  --bg-soft: #eef4ff;
  --surface: rgba(255,255,255,0.92);
  --surface-solid: #ffffff;
  --surface-2: #f9fbff;
  --surface-3: #f1f5fb;

  --border: #e3e8f2;
  --border-strong: #cfd8e8;

  --accent: #4f67f5;
  --accent-hover: #3f53d9;
  --accent-bright: #6076ff;
  --accent-dim: rgba(79,103,245,0.11);
  --accent-glow: rgba(79,103,245,0.16);
  --accent-light: #eef2ff;

  --cyan: #0ea5c6;
  --ok: #13a874;
  --ok-dim: rgba(19,168,116,0.10);
  --warn: #d9901d;
  --warn-dim: rgba(217,144,29,0.12);
  --danger: #df4a4a;
  --danger-dim: rgba(223,74,74,0.10);

  --text: #172033;
  --text-2: #4e5c72;
  --text-3: #8793a7;

  --radius-s: 10px;
  --radius-m: 14px;
  --radius-l: 18px;
  --radius-xl: 22px;
  --radius-2xl: 28px;

  --shadow-s: 0 1px 2px rgba(23,32,51,0.04), 0 8px 24px rgba(23,32,51,0.05);
  --shadow-m: 0 2px 8px rgba(23,32,51,0.06), 0 16px 42px rgba(23,32,51,0.08);
  --shadow-xl: 0 18px 54px rgba(23,32,51,0.10);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv01','cv03','cv04','cv11';
  min-height: 100vh;
}

body {
  padding: 30px 16px 72px;
  background-image:
    radial-gradient(ellipse 82% 44% at 50% -12%, rgba(79,103,245,0.16) 0%, rgba(79,103,245,0.06) 38%, transparent 70%),
    radial-gradient(ellipse 46% 34% at 100% 18%, rgba(14,165,198,0.10) 0%, transparent 62%),
    linear-gradient(180deg, #f5f8ff 0%, #f7f8fb 48%, #f4f6fa 100%);
  background-attachment: fixed;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Hero：浅色品牌区，不再使用黑色大背景 ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 30px 28px 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96) 0%, rgba(245,248,255,0.96) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  margin-bottom: 12px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #7c6df2 50%, var(--cyan) 100%);
}
.hero::after {
  content: '';
  position: absolute;
  top: -86px;
  right: -88px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,103,245,0.14) 0%, rgba(14,165,198,0.08) 44%, transparent 70%);
  pointer-events: none;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-light);
  border: 1px solid rgba(79,103,245,0.16);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-hover);
  letter-spacing: .10em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(79,103,245,0.12);
}
.hero h1 {
  margin: 0 0 9px;
  font-size: 27px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.14;
  color: var(--text);
}
.hero p {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
}

/* ── Section Panel：保留层级，但弱化“到处都是卡片”的感觉 ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 21px 22px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(23,32,51,0.03);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-s);
  background: var(--surface-solid);
}

.title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 15px;
  background: linear-gradient(180deg, var(--accent), var(--cyan));
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── Form ── */
.query { display: flex; gap: 9px; align-items: stretch; }

.input, .textarea {
  width: 100%;
  padding: 12px 15px;
  background: #fbfcff;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  min-height: 48px;
  letter-spacing: -0.01em;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus {
  border-color: rgba(79,103,245,0.72);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.input:hover:not(:focus), .textarea:hover:not(:focus) {
  border-color: var(--border-strong);
  background: #fff;
}
.textarea { min-height: 118px; resize: vertical; }

/* ── Buttons ── */
.btn {
  border: none;
  border-radius: var(--radius-s);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  min-height: 48px;
  position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #6d5df3 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(79,103,245,0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  box-shadow: 0 10px 26px rgba(79,103,245,0.32);
}

.btn-light {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-light:hover {
  border-color: rgba(79,103,245,0.32);
  color: var(--accent-hover);
  background: var(--accent-light);
}
.btn-row { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }

/* ── Info：用分隔线承载信息，不再做多层卡片 ── */
.info { display: grid; }
.info-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.info-row:first-child { padding-top: 2px; }
.info-row:last-child { border-bottom: none; padding-bottom: 2px; }
.k { color: var(--text-3); font-size: 12px; font-weight: 700; padding-top: 1px; }
.v { font-size: 13px; color: var(--text); word-break: break-all; line-height: 1.65; font-weight: 550; }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.68;
  flex-shrink: 0;
}
.unused  { background: rgba(19,168,116,0.12); color: #0c7f5a; border: 1px solid rgba(19,168,116,0.18); }
.used    { background: rgba(223,74,74,0.10); color: #b42332; border: 1px solid rgba(223,74,74,0.18); }
.running { background: var(--accent-light); color: var(--accent-hover); border: 1px solid rgba(79,103,245,0.18); }
.paused  { background: rgba(217,144,29,0.12); color: #925f0e; border: 1px solid rgba(217,144,29,0.20); }

/* ── Notices ── */
.notice {
  display: none;
  padding: 12px 15px;
  border-radius: var(--radius-s);
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.65;
  border: 1px solid transparent;
  font-weight: 600;
}
.notice.show { display: block; animation: rise 0.18s ease; }
.notice.ok { background: var(--ok-dim); color: #0c7f5a; border-color: rgba(19,168,116,0.20); }
.notice.err { background: var(--danger-dim); color: #b42332; border-color: rgba(223,74,74,0.20); }

/* ── Content blocks ── */
.blockText { font-size: 14px; color: var(--text-2); line-height: 1.9; white-space: pre-wrap; margin-top: 10px; }
.img { width: 100%; border-radius: var(--radius-s); border: 1px solid var(--border); display: block; margin-top: 12px; }

.jump {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 15px 22px;
  border-radius: var(--radius-m);
  background: linear-gradient(135deg, var(--accent) 0%, #6d5df3 56%, var(--cyan) 100%);
  border: none;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-top: 14px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  box-shadow: 0 10px 26px rgba(79,103,245,0.28);
  cursor: pointer;
}
.jump:hover { box-shadow: 0 14px 34px rgba(79,103,245,0.34); transform: translateY(-1px); }
.jump::after { content: '→'; margin-left: 6px; font-size: 16px; position: relative; }

/* ── Loading ── */
.loading-card {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-3);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@keyframes dot1 { 0%,60%,100%{opacity:.2;transform:scale(.7)} 20%{opacity:1;transform:scale(1)} }
@keyframes dot2 { 0%,20%,80%,100%{opacity:.2;transform:scale(.7)} 40%{opacity:1;transform:scale(1)} }
@keyframes dot3 { 0%,40%,100%{opacity:.2;transform:scale(.7)} 60%{opacity:1;transform:scale(1)} }

/* ── Self supplement ── */
.supplement-status-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.75;
  padding: 12px 15px;
  background: var(--accent-light);
  border-radius: var(--radius-s);
  border: 1px solid rgba(79,103,245,0.18);
  border-left: 3px solid var(--accent);
  margin-top: 4px;
}

.hidden { display: none !important; }

/* ── Animations ── */
@keyframes rise { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── Responsive ── */
@media (max-width: 600px) {
  body { padding: 16px 12px 56px; }
  .hero { padding: 25px 21px 23px; border-radius: var(--radius-xl); }
  .hero h1 { font-size: 23px; }
  .card { padding: 18px; }
  .query, .btn-row { flex-direction: column; }
  .info-row { grid-template-columns: 80px 1fr; }
  .btn { width: 100%; min-height: 46px; }
}

/* =====================================================
   Fix Pack r4 — 用户端稳定性与轻量 UI 调整
===================================================== */
[v-cloak] { display: none !important; }
.current-code-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.notice.err.show,
.notice.ok.show { word-break: break-word; }
.card .notice:last-child { margin-bottom: 0; }
.info-row .v a,
.v { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .hero { margin-bottom: 10px; }
  .card { margin-bottom: 8px; }
  .title { margin-bottom: 12px; }
  .info-row { padding: 9px 0; }
}
/* r4: 用户端原生 JS 版补充样式 */
[hidden] { display: none !important; }
.current-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.current-code-text { font-size: 13px; color: var(--text-2); }
.current-code-text strong { color: var(--text); font-size: 15px; letter-spacing: .04em; }
.btn-compact { padding: 8px 16px; font-size: 13px; min-height: 38px; }
.inline-notice { margin-top: 12px; margin-bottom: 0; }
.loading-dots { display: inline-flex; gap: 3px; align-items: center; margin-left: 4px; }
.loading-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.loading-dots span:nth-child(1) { animation: dot1 1.2s ease infinite 0s; }
.loading-dots span:nth-child(2) { animation: dot2 1.2s ease infinite .2s; }
.loading-dots span:nth-child(3) { animation: dot3 1.2s ease infinite .4s; }
.empty-line { padding: 10px 0; color: var(--text-3); font-size: 13px; }
@media (max-width: 600px) {
  .current-code { align-items: stretch; }
  .btn-compact { width: 100%; min-height: 42px; }
}

/* =====================================================
   Fix Pack r5 — 用户端百分比进度条
===================================================== */
.progressMini {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.progressTop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.progressTop strong {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-hover);
  letter-spacing: -0.02em;
}
.progressTop span {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}
.progressTrack {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f8;
  border: 1px solid rgba(203,213,225,0.72);
}
.progressTrack i {
  display: block;
  height: 100%;
  min-width: 6px;
  max-width: 100%;
  border-radius: inherit;
  transition: width .24s ease;
  background: linear-gradient(90deg, var(--accent), #6d5df3);
}
.progress-warm .progressTrack i { background: linear-gradient(90deg, #4f67f5, #0ea5c6); }
.progress-done .progressTrack i { background: linear-gradient(90deg, #13a874, #20c997); }
.progress-done .progressTop strong { color: #0c7f5a; }
@media (max-width: 600px) {
  .progressTop { align-items: flex-start; }
  .progressTop span { width: 100%; }
}

/* =====================================================
   Fix Pack r7 — 用户端进度精简 + 点击复制
===================================================== */
.info-row {
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 6px 12px;
  padding: 10px 0;
  align-items: center;
}
.k {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-3);
  font-weight: 800;
  white-space: nowrap;
  padding-top: 0;
}
.v {
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}
.progressMini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.progressTop { display: none !important; }
.progressPercent {
  min-width: 44px;
  text-align: right;
  font-size: 15px;
  font-weight: 900;
  color: var(--accent-hover);
  letter-spacing: -0.02em;
}
.progressTrack {
  height: 10px;
  background: #eef2f8;
}
.progressTrack i { min-width: 0; }
.progress-done .progressPercent { color: #0c7f5a; }
.copyInline {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.55;
  letter-spacing: .01em;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  word-break: break-all;
}
.copyInline em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 850;
  color: var(--accent-hover);
  background: var(--accent-light);
  border: 1px solid rgba(79,103,245,.16);
  border-radius: 999px;
  padding: 2px 7px;
}
.copyInline.copied em {
  color: #0c7f5a;
  background: rgba(19,168,116,.10);
  border-color: rgba(19,168,116,.18);
}
.copySuffix {
  display: inline-flex;
  margin-left: 8px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 520px) {
  body { padding-left: 12px; padding-right: 12px; }
  .card { padding: 18px 18px; }
  .info-row { grid-template-columns: 56px minmax(0, 1fr); gap: 6px 10px; }
  .k { font-size: 12px; }
  .v, .copyInline { font-size: 14px; }
  .progressPercent { min-width: 40px; font-size: 14px; }
  .copyInline { align-items: flex-start; flex-direction: column; gap: 4px; }
}


/* =====================================================
   Fix Pack 2026-05-13 r8
   目标：用户端复制交互去按钮化，修复流水号 HTML 露出后的样式兜底。
===================================================== */
.copyInline {
  width: auto;
  max-width: 100%;
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-weight: 850;
  letter-spacing: .01em;
  text-align: left;
  word-break: break-all;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(79,103,245,.12);
}
.copyInline::after {
  content: '';
  display: none;
}
.copyInline em { display: none !important; }
.copyInline.copied {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.copyToast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .88);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(17,24,39,.24);
  transition: opacity .16s ease, transform .16s ease;
}
.copyToast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 520px) {
  .copyInline { display: inline; font-size: 14px; }
}

/* UX Refinement r9 — calmer status colors and smoother copy/progress */
.used {
  background: rgba(79,103,245,0.10) !important;
  color: #3045bf !important;
  border: 1px solid rgba(79,103,245,0.18) !important;
}
.failed {
  background: rgba(223,74,74,0.10) !important;
  color: #b42332 !important;
  border: 1px solid rgba(223,74,74,0.18) !important;
}
.running {
  background: rgba(79,103,245,0.10) !important;
  color: #3045bf !important;
  border: 1px solid rgba(79,103,245,0.18) !important;
}
.progress-run .progressTrack i { background: linear-gradient(90deg, #4f67f5, #6b7cff); }
.progressTrack { overflow: hidden; border-radius: 999px; }
.progressTrack i { display: block; height: 100%; border-radius: inherit; transition: width .22s ease; }
.copyInline {
  cursor: pointer;
  word-break: break-all;
}
.copyInline::after { content: '点击复制'; }
@media (max-width: 640px) {
  .info-row { align-items: flex-start; }
  .progressMini { gap: 8px; }
  .progressPercent { min-width: 38px; }
}

/* r12 brand personalization */
.brand-logo{
  display:block;
  max-width:120px;
  max-height:56px;
  object-fit:contain;
  margin:0 0 14px;
}
.public-notice{
  color:var(--text-2);
  border-left:4px solid var(--accent);
  padding:14px 16px;
}
.public-footer{
  max-width:560px;
  margin:14px auto 0;
  text-align:center;
  color:var(--text-3);
  display:grid;
  gap:6px;
  font-size:13px;
}
.public-footer a{color:var(--accent);font-weight:800;text-decoration:none;}
.public-footer small{font-size:12px;color:var(--text-3);}
