/* ==========================================================================
   千寻自助充值兑换中心 · 公共样式
   视觉 100% 对齐参考站 auto17.de10.online（深色 + 荧光绿 #9dff70 强调色）
   ========================================================================== */

:root {
  --accent: #9dff70;
  --accent-rgb: 157, 255, 112;
  --text: #f6f7f4;
  --muted: #858d98;
  --bg: #090b0f;
  --panel: #11141ae0;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 320px;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: var(--bg); }
button, input, textarea, select { font: inherit; }
::selection { background: #4361ee2e; }

/* 页面根容器（各页共享） */
.page {
  --accent: #9dff70;
  --accent-rgb: 157, 255, 112;
  color: #f6f7f4;
  background: #090b0f;
  min-height: 100vh;
  padding: 0 32px 40px;
  position: relative;
  overflow: hidden;
}

/* 环境光斑 + 网格背景 */
.ambient, .page-ambient { z-index: 0; pointer-events: none; border-radius: 999px; position: absolute; }
.ambient-one { background: radial-gradient(circle, rgba(var(--accent-rgb), .14), transparent 68%); width: 820px; height: 620px; top: -340px; left: 50%; transform: translate(-50%); }
.ambient-two { background: radial-gradient(circle, #6352ff1f, #0000 66%); width: 720px; height: 720px; bottom: -320px; right: -300px; }
.grid-overlay, .page-grid {
  z-index: 0; opacity: .35; pointer-events: none;
  background-image: linear-gradient(#ffffff06 1px, #0000 1px), linear-gradient(90deg, #ffffff06 1px, #0000 1px);
  background-size: 56px 56px; position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(#000, #0000 78%); mask-image: linear-gradient(#000, #0000 78%);
}

.shell { z-index: 1; width: min(100%, 1160px); min-height: 100vh; margin: 0 auto; position: relative; }

/* ---------------- 顶栏 ---------------- */
.topbar { border-bottom: 1px solid #ffffff17; justify-content: space-between; align-items: center; min-height: 76px; display: flex; }
.brand { color: inherit; align-items: center; gap: 12px; display: inline-flex; }
a.brand { text-decoration: none; }
button.brand { cursor: pointer; text-align: left; background: 0 0; border: 0; padding: 0; }
.brand-logo {
  border: 1px solid rgba(var(--accent-rgb), .45); width: 40px; height: 40px;
  box-shadow: 0 0 24px rgba(var(--accent-rgb), .12); background: #ffffff14;
  border-radius: 12px; place-items: center; display: grid; overflow: hidden; flex: none;
}
.brand-logo img { object-fit: cover; border-radius: 9px; width: 34px; height: 34px; display: block; }
.brand-copy { gap: 3px; display: grid; }
.brand-copy strong { letter-spacing: .03em; font-size: 14px; font-weight: 750; }
.brand-copy small { color: #707780; letter-spacing: .15em; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; font-weight: 700; }

.quick-nav { background: #ffffff09; border: 1px solid #ffffff14; border-radius: 12px; align-items: center; gap: 4px; padding: 4px; display: flex; }
.quick-nav a, .quick-nav button {
  color: #777f89; min-height: 34px; font: inherit; cursor: pointer; background: 0 0; border: 0;
  border-radius: 8px; align-items: center; gap: 7px; padding: 0 12px; font-size: 11px; font-weight: 650;
  text-decoration: none; transition: all .16s; display: inline-flex;
}
.quick-nav a:hover, .quick-nav button:hover, .quick-nav button.active, .quick-nav a.active { color: #f6f7f4; background: #ffffff14; }
.quick-nav button.active svg, .quick-nav a.active svg { color: var(--accent); }

/* ---------------- 状态胶囊 ---------------- */
.status-pill {
  border: 1px solid rgba(var(--accent-rgb), .2); color: rgba(var(--accent-rgb), .85);
  background: rgba(var(--accent-rgb), .06); letter-spacing: .12em; border-radius: 999px;
  align-items: center; gap: 9px; padding: 7px 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 700; display: inline-flex;
}
.status-pill span { background: var(--accent); width: 6px; height: 6px; box-shadow: 0 0 10px var(--accent); border-radius: 50%; }

/* ---------------- 按钮 ---------------- */
.btn {
  cursor: pointer; border-radius: 13px; min-height: 46px; font-size: 13px; font-weight: 700;
  align-items: center; justify-content: center; gap: 8px; padding: 0 16px; width: 100%;
  border: 1px solid transparent; transition: all .18s; display: inline-flex; text-decoration: none;
}
.btn:disabled { cursor: not-allowed; }

.btn-primary {
  box-shadow: 0 12px 30px rgba(var(--accent-rgb), .14);
  background: var(--accent); border-color: var(--accent); color: #080a0d;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:disabled { box-shadow: none; background: #242a25; border-color: #2f3730; color: #626a63; }

.btn-secondary { background: #ffffff09; border-color: #ffffff1a; color: #a1a8b1; }
.btn-secondary:hover:not(:disabled) { background: #ffffff12; border-color: #ffffff2e; color: #f1f3ef; }

.btn-block { display: flex; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 输入框 ---------------- */
.input-group { gap: 10px; display: grid; }
.field-label { color: #89919b; letter-spacing: .08em; justify-content: space-between; align-items: center; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; font-weight: 700; display: flex; }
.field-label b { color: #555d67; letter-spacing: 0; font-size: 9px; font-weight: 500; }
.input-wrap {
  background: #0c0f13; border: 1px solid #ffffff1a; border-radius: 13px; min-height: 58px;
  align-items: center; gap: 7px; padding: 0 16px; display: flex; transition: border-color .16s, box-shadow .16s;
}
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .09); }
.input-wrap:hover { border-color: rgba(var(--accent-rgb), .45); }
.input-wrap .prefix { color: var(--accent); flex: none; display: inline-flex; margin-right: 7px; }
.input-wrap input {
  flex: 1; min-width: 0; height: 56px; background: transparent; border: 0; outline: none; color: #f0f3ec;
  caret-color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; letter-spacing: .04em;
}
.input-wrap input::placeholder { color: #414851; }
.input-wrap .clear { color: #555d67; background: 0 0; border: 0; cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; flex: none; }
.input-wrap .clear:hover { color: #f0f3ec; }

/* 多行输入（Session JSON） */
.textarea-wrap {
  background: #0c0f13; border: 1px solid #ffffff1a; border-radius: 13px; padding: 14px 16px; transition: border-color .16s, box-shadow .16s;
}
.textarea-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .09); }
.textarea-wrap textarea {
  width: 100%; background: transparent; border: 0; outline: none; resize: vertical; color: #f0f3ec;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; line-height: 1.6; min-height: 140px;
}
.textarea-wrap textarea::placeholder { color: #414851; }

/* ---------------- 错误提示 ---------------- */
.error-alert {
  color: #fff1f1; background: linear-gradient(135deg, #7e192375, #ff484829); border: 1px solid #ff7e7eb8;
  border-radius: 12px; align-items: center; gap: 10px; min-height: 58px; margin-top: 14px; padding: 13px 16px; display: flex;
  box-shadow: 0 0 0 3px #ff484814, 0 12px 28px #ff28371f;
}
.error-alert .alert-icon { color: #ff9c9c; flex: none; display: inline-flex; }
.error-alert strong { color: #fff7f7; letter-spacing: .01em; font-size: 14px; font-weight: 750; line-height: 1.55; display: block; }

/* ---------------- 页脚 ---------------- */
.footer { color: #4e5660; border-top: 1px solid #ffffff12; justify-content: space-between; align-items: center; min-height: 68px; font-size: 9px; display: flex; }
.footer-status { align-items: center; gap: 7px; display: inline-flex; }
.footer-status i { background: var(--accent); width: 5px; height: 5px; box-shadow: 0 0 10px var(--accent); border-radius: 50%; }
.footer-center { color: #5e6670; text-align: center; padding-top: 28px; font-size: 10px; }

/* 响应式（公共部分） */
@media (width <= 700px) {
  .topbar { gap: 14px; padding: 16px 0; }
  .brand-copy small { display: none; }
  .quick-nav { background: 0 0; border: 0; }
}
