/* ============================================================
   FROST — 全站视觉系统
   深空黑底 × 霓虹紫/电光青 × 玻璃拟态 × CRT 扫描线 × 故障字
   所有可开关特效均由 body[data-fx-*] 属性控制(见 js/fx.js)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #05060e;
  --bg-2: #0a0c1a;
  --panel: rgba(255, 255, 255, .035);
  --panel-strong: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09);
  --text: #e7eaf6;
  --muted: #8b93b5;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #ec4899;
  --green: #4ade80;
  --amber: #facc15;
  --red: #f87171;
  --grad: linear-gradient(100deg, var(--violet), var(--cyan));
  --radius: 16px;
  --font-display: 'Orbitron', 'Space Grotesk', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

::selection { background: rgba(139, 92, 246, .4); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

/* ---------- 全局背景层 ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background-image:
    linear-gradient(rgba(139, 92, 246, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
body[data-fx-grid="off"] .bg-grid { display: none; }

.bg-glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(600px 400px at 12% -5%, rgba(139, 92, 246, .16), transparent 65%),
    radial-gradient(700px 420px at 88% 8%, rgba(34, 211, 238, .12), transparent 65%),
    radial-gradient(500px 500px at 50% 110%, rgba(236, 72, 153, .08), transparent 70%);
}

#fx-particles {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body[data-fx-particles="off"] #fx-particles { display: none; }

/* CRT 扫描线 overlay */
.fx-scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
body[data-fx-scanlines="off"] .fx-scanlines { display: none; }

/* 鼠标追光 */
#fx-cursor-glow {
  position: fixed; z-index: 1; width: 500px; height: 500px; pointer-events: none;
  border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139,92,246,.10), rgba(34,211,238,.05) 40%, transparent 65%);
  transition: opacity .3s;
}
body[data-fx-glow="off"] #fx-cursor-glow { display: none; }

/* ---------- 布局 ---------- */
.container { width: min(1200px, 92%); margin: 0 auto; }

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(5, 6, 14, .68);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.logo {
  font-family: var(--font-display); font-weight: 900; font-size: 21px;
  letter-spacing: 3px; display: flex; align-items: center; gap: 10px;
}
/* 定做图标(冰晶 logo):导航栏小标 */
.logo .mark {
  width: 28px; height: 28px; border-radius: 8px; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(150, 205, 255, .55));
  transition: filter .3s;
}
.logo:hover .mark { filter: drop-shadow(0 0 14px rgba(150, 205, 255, .95)); }
body[data-fx-motion="off"] .logo .mark { transition: none; }

.logo b { color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }

.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 500;
  color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--panel-strong); }
.nav-links a.active { color: var(--cyan); }
/* 修复:导航内按钮文字色被 .nav-links a 覆盖导致对比度不足 */
.nav-links .btn-primary { color: #0b0618; font-weight: 700; }
.nav-links .btn-ghost { color: var(--text); }

.nav-cta { display: flex; gap: 10px; align-items: center; }

/* 语言切换(导航右上角,默认英文) */
.lang-switch {
  display: flex; align-items: center; gap: 2px; margin-left: 6px; flex: none;
  padding: 3px 4px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel);
}
.lang-switch button {
  background: none; border: 0; padding: 3px 8px; border-radius: 7px;
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .6px;
  cursor: pointer; line-height: 1.6; transition: color .2s, background .2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { color: #0b0618; background: var(--grad); }
.lang-switch .sep { color: var(--muted); opacity: .45; font-size: 11px; }
body[data-fx-motion="off"] .lang-switch button { transition: none; }

/* 汉堡按钮(≤900px 显示,展开 .nav-links 抽屉) */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 36px; padding: 0 8px; flex: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: border-color .2s;
}
.nav-toggle:hover { border-color: rgba(139,92,246,.6); }
.nav-toggle span {
  display: block; height: 2px; width: 100%; border-radius: 2px;
  background: var(--text); transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
body[data-fx-motion="off"] .nav-toggle span { transition: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: 12px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; position: relative;
  transition: transform .18s, box-shadow .25s, background .2s, border-color .2s;
  white-space: nowrap;
}
body[data-fx-motion="off"] .btn { transition: none; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--grad); color: #0b0618;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 8px 28px -8px rgba(139,92,246,.65);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset, 0 10px 40px -6px rgba(34,211,238,.55); transform: translateY(-2px); }
body[data-fx-motion="off"] .btn-primary:hover { transform: none; }

.btn-ghost {
  background: var(--panel); border-color: var(--line); color: var(--text);
}
.btn-ghost:hover { border-color: rgba(139,92,246,.6); box-shadow: 0 0 20px -4px rgba(139,92,246,.4); }

.btn-danger { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.4); color: var(--red); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* Discord 品牌按钮(导航栏);用 a.nav-discord 保证特异性压过 .nav-links a */
a.nav-discord {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; margin-left: 6px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  color: #c9cdfb !important;
  background: rgba(88, 101, 242, .14);
  border: 1px solid rgba(88, 101, 242, .45);
  transition: background .2s, color .2s, box-shadow .25s, transform .18s;
}
a.nav-discord svg { width: 16px; height: 16px; fill: #5865f2; transition: fill .2s; }
a.nav-discord:hover {
  color: #fff !important; background: rgba(88, 101, 242, .32);
  box-shadow: 0 0 20px -4px rgba(88, 101, 242, .8);
  transform: translateY(-1px);
}
a.nav-discord:hover svg { fill: #fff; }
body[data-fx-motion="off"] a.nav-discord, body[data-fx-motion="off"] a.nav-discord svg { transition: none; }
body[data-fx-motion="off"] a.nav-discord:hover { transform: none; }

/* 导航栏实时在线人数徽章(仅此一项对访客公开) */
.online-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--green);
  border: 1px solid rgba(74, 222, 128, .25); background: rgba(74,222,128,.06);
  padding: 5px 12px; border-radius: 99px;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
body[data-fx-motion="off"] .dot-live { animation: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 170px 0 90px; text-align: center;
}
/* Hero 区完整版定做 logo(冰晶徽章:深色卡片 + 银白冰晶 + FROST 字) */
.hero-logo {
  width: 128px; height: auto; display: block; margin: 0 auto 16px;
  border-radius: 22px;
  filter: drop-shadow(0 10px 30px rgba(120, 180, 240, .18));
  animation: heroFloat 5.5s ease-in-out infinite;
}
@keyframes heroFloat { 50% { transform: translateY(-9px); } }
body[data-fx-motion="off"] .hero-logo { animation: none; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 2px;
  color: var(--cyan); text-transform: uppercase;
  border: 1px solid rgba(34,211,238,.3); border-radius: 99px; padding: 7px 16px;
  background: rgba(34,211,238,.05); margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 7vw, 84px); line-height: 1.05; letter-spacing: 2px;
}

/* 故障字特效 */
.glitch { position: relative; display: inline-block; }
body[data-fx-glitch="on"] .glitch::before,
body[data-fx-glitch="on"] .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; overflow: hidden;
  background: var(--bg);
}
body[data-fx-glitch="on"] .glitch::before {
  color: var(--cyan); clip-path: inset(12% 0 58% 0);
  animation: glitchA 3.2s infinite steps(1);
}
body[data-fx-glitch="on"] .glitch::after {
  color: var(--pink); clip-path: inset(62% 0 8% 0);
  animation: glitchB 2.7s infinite steps(1);
}
@keyframes glitchA {
  0%, 91%, 100% { transform: none; opacity: 0; }
  92% { transform: translate(-6px, -2px); opacity: .85; }
  94% { transform: translate(5px, 1px); opacity: .85; }
  96% { transform: translate(-3px, 2px); opacity: .85; }
}
@keyframes glitchB {
  0%, 88%, 100% { transform: none; opacity: 0; }
  89% { transform: translate(6px, 2px); opacity: .85; }
  92% { transform: translate(-5px, -1px); opacity: .85; }
  95% { transform: translate(3px, -2px); opacity: .85; }
}

.hero .sub {
  max-width: 640px; margin: 24px auto 0; color: var(--muted); font-size: 17px;
}
.hero .type-line {
  font-family: var(--font-mono); color: var(--cyan); font-size: 15px;
  margin-top: 18px; min-height: 24px;
}
.type-line .caret {
  display: inline-block; width: 9px; height: 18px; background: var(--cyan);
  vertical-align: -3px; margin-left: 3px;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
body[data-fx-motion="off"] .type-line .caret { animation: none; }

.hero-actions { display: flex; gap: 16px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.btn-lg { padding: 14px 34px; font-size: 15.5px; border-radius: 14px; }

/* 注:原「运营数据四格」(.hero-stats)已移除,不再向访客展示站内数字 */

/* ---------- 区块通用 ---------- */
section { padding: 90px 0; position: relative; }
.sec-head { text-align: center; margin-bottom: 54px; }
.sec-head .eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 3px;
  color: var(--pink); text-transform: uppercase;
}
.sec-head h2 {
  font-family: var(--font-display); font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 1px; margin-top: 10px;
}
.sec-head p { color: var(--muted); max-width: 560px; margin: 12px auto 0; }

/* 滚动渐入 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
body[data-fx-motion="off"] .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- 玻璃卡片 ---------- */
.glass {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

/* 产品卡 */
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px;
}
.product-card {
  position: relative; padding: 26px; overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
  transform-style: preserve-3d; will-change: transform;
}
.product-card:hover { border-color: rgba(139,92,246,.55); box-shadow: 0 18px 50px -18px rgba(139,92,246,.5); }
/* 流光描边 */
.product-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--ang, 0deg), transparent 20%, var(--violet), var(--cyan), transparent 80%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
  animation: borderFlow 4s linear infinite;
}
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes borderFlow { to { --ang: 360deg; } }
.product-card:hover::before { opacity: 1; }
body[data-fx-motion="off"] .product-card::before { animation: none; }

.product-card .idx {
  position: absolute; top: 18px; right: 22px;
  font-family: var(--font-display); font-weight: 900; font-size: 40px;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.12);
}
.product-card .game {
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan);
  letter-spacing: 2px; text-transform: uppercase;
}
.product-card h3 {
  font-family: var(--font-display); font-size: 21px; margin: 8px 0 6px; letter-spacing: .5px;
}
.product-card .tagline { color: var(--muted); font-size: 14px; min-height: 44px; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1.5px;
  padding: 4px 11px; border-radius: 99px; text-transform: uppercase; margin-top: 14px;
}
.badge-undetected { color: var(--green); border: 1px solid rgba(74,222,128,.35); background: rgba(74,222,128,.07); }
.badge-updating   { color: var(--amber); border: 1px solid rgba(250,204,21,.35); background: rgba(250,204,21,.07); }
.badge-detected   { color: var(--red);   border: 1px solid rgba(248,113,113,.35); background: rgba(248,113,113,.07); }

.feat-list { list-style: none; margin: 18px 0; display: grid; gap: 9px; }
.feat-list li {
  font-size: 13.5px; color: #b9c0dd; display: flex; gap: 9px; align-items: baseline;
}
.feat-list li::before { content: '▸'; color: var(--violet); }

.product-card .price-row {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px dashed var(--line); padding-top: 18px; margin-top: 4px;
}
.price { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.price small { font-size: 12px; color: var(--muted); font-family: var(--font-body); font-weight: 400; }

/* 3D tilt 高光 */
.tilt-shine {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.07), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.product-card:hover .tilt-shine { opacity: 1; }
body[data-fx-tilt="off"] .tilt-shine { display: none; }

/* ---------- 特性矩阵 ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feat-cell { padding: 26px; }
.feat-cell .icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-size: 21px; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3);
  box-shadow: 0 0 22px -6px rgba(139,92,246,.5);
}
.feat-cell h4 { font-family: var(--font-display); font-size: 15px; margin: 16px 0 8px; letter-spacing: .5px; }
.feat-cell p { font-size: 13.5px; color: var(--muted); }

/* ---------- 状态表 ---------- */
.status-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--radius); }
.status-table th, .status-table td { padding: 15px 20px; text-align: left; font-size: 14px; }
.status-table thead th {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line);
}
.status-table tbody tr { border-bottom: 1px solid rgba(255,255,255,.05); transition: background .2s; }
.status-table tbody tr:hover { background: rgba(139,92,246,.05); }
.status-table .mono { font-family: var(--font-mono); }

/* ---------- 价格档位 ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan-card { padding: 34px 28px; text-align: center; position: relative; display: flex; flex-direction: column; }
.plan-card.hot {
  border-color: rgba(139,92,246,.55);
  box-shadow: 0 0 60px -18px rgba(139,92,246,.55);
  transform: translateY(-8px);
}
body[data-fx-motion="off"] .plan-card.hot { transform: none; }
.plan-card .hot-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #0b0618; font-size: 11px; font-weight: 700;
  letter-spacing: 2px; padding: 4px 14px; border-radius: 99px; text-transform: uppercase;
}
.plan-card h3 { font-family: var(--font-display); font-size: 15px; letter-spacing: 2px; color: var(--muted); }
.plan-card .amount { font-family: var(--font-display); font-weight: 900; font-size: 44px; margin: 14px 0 2px; }
.plan-card .amount span { font-size: 15px; color: var(--muted); font-weight: 400; margin-left: 5px; }
.plan-card ul { list-style: none; margin: 22px 0 26px; display: grid; gap: 10px; flex: 1; text-align: left; }
.plan-card ul li { font-size: 13.5px; color: #b9c0dd; }
.plan-card ul li::before { content: '✦ '; color: var(--cyan); }

/* ---------- 评价 marquee ---------- */
.marquee-wrap {
  overflow: hidden; position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee { display: flex; gap: 18px; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
body[data-fx-motion="off"] .marquee { animation: none; flex-wrap: wrap; width: auto; }
body[data-fx-motion="off"] .marquee-wrap { overflow: visible; mask-image: none; }

.review-card { width: min(340px, 84vw); padding: 22px; flex-shrink: 0; }
.review-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-card .avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--grad); display: grid; place-items: center;
  color: #0b0618; font-weight: 800; font-size: 15px;
}
.review-card .name { font-weight: 600; font-size: 14px; }
.review-card .prod { font-size: 12px; color: var(--cyan); font-family: var(--font-mono); }
.review-card .stars { color: var(--amber); font-size: 13px; letter-spacing: 2px; }
.review-card p { font-size: 13.5px; color: #b9c0dd; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item { overflow: hidden; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center;
  transition: background .2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--violet); transition: transform .25s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
body[data-fx-motion="off"] .faq-item summary::after { transition: none; }
.faq-item summary:hover { background: rgba(139,92,246,.06); }
.faq-item .faq-body { padding: 0 22px 18px; color: var(--muted); font-size: 14px; }

/* ---------- CTA 横幅 ---------- */
.cta-banner {
  text-align: center; padding: 70px 30px; position: relative; overflow: hidden;
  border: 1px solid rgba(139,92,246,.35); border-radius: 24px;
  background:
    radial-gradient(500px 240px at 50% 120%, rgba(139,92,246,.25), transparent),
    radial-gradient(400px 200px at 20% -40%, rgba(34,211,238,.15), transparent),
    var(--bg-2);
}
.cta-banner h2 { font-family: var(--font-display); font-size: clamp(24px, 4vw, 38px); letter-spacing: 1px; }

/* ---------- 页脚 ---------- */
footer.site-foot { border-top: 1px solid var(--line); padding: 46px 0 30px; color: var(--muted); font-size: 13px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 26px; }
.foot-grid .links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-grid a:hover { color: var(--cyan); }
.foot-note { border-top: 1px solid rgba(255,255,255,.05); padding-top: 20px; font-size: 12px; color: #5b6280; }

/* ---------- 表单页(登录/注册/验证) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 110px 5% 60px; }
.auth-card { width: min(440px, 100%); padding: 38px 34px; position: relative; }
.auth-card .back {
  position: absolute; top: 18px; left: 20px; color: var(--muted); font-size: 13px;
}
.auth-card .back:hover { color: var(--cyan); }
.auth-card h1 { font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; text-align: center; margin-bottom: 6px; }
.auth-card .hint { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; letter-spacing: 1px; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; font-family: var(--font-mono); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--text);
  font-size: 14.5px; font-family: var(--font-body); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
body[data-fx-motion="off"] .field input, body[data-fx-motion="off"] .field select, body[data-fx-motion="off"] .field textarea { transition: none; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139,92,246,.18);
}
.field textarea { resize: vertical; min-height: 70px; font-family: var(--font-body); }

/* 全站下拉框文字居中 + 深色选项列表 */
select, .field select, .toolbar .mini-select {
  text-align: center; text-align-last: center;
  color-scheme: dark;
}
select option {
  text-align: center;
  background-color: #10131f;
  color: var(--text);
  padding: 8px 10px;
}
select option:checked,
select option:hover {
  background-color: rgba(139, 92, 246, .35);
  color: #fff;
}

/* 数字输入框:内容居中 + 隐藏上下箭头 */
input[type="number"] {
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.form-msg { border-radius: 11px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; display: none; }
.form-msg.show { display: block; }
.form-msg.err { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.35); color: var(--red); }
.form-msg.ok { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.35); color: var(--green); }
.form-msg.info { background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.3); color: var(--cyan); }

.auth-alt { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.auth-alt a { color: var(--cyan); }

/* 验证码 6 格输入 */
.code-inputs { display: flex; gap: 10px; justify-content: center; margin: 8px 0 20px; }
.code-inputs input {
  width: 52px; height: 62px; text-align: center; font-family: var(--font-display);
  font-size: 26px; font-weight: 700; border-radius: 13px;
  background: rgba(0,0,0,.4); border: 1px solid var(--line); color: var(--text); outline: none;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.code-inputs input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.18); transform: translateY(-2px); }
body[data-fx-motion="off"] .code-inputs input { transition: none; }

/* ---------- 用户中心 / 管理后台 ---------- */
.dash-wrap { padding: 110px 0 70px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.dash-head h1 { font-family: var(--font-display); font-size: 26px; letter-spacing: 1px; }
.dash-head .sub { color: var(--muted); font-size: 14px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat-cards .card { padding: 20px 22px; }
.stat-cards .k { font-size: 12px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; font-family: var(--font-mono); }
.stat-cards .v { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 6px; }
/* 统计卡片副标题:说明该数字的口径(如"产品订单""卡密核销") */
.stat-cards .stat-sub { margin-top: 4px; font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

/* 流量趋势图面板 */
.traffic-panel { padding: 20px 22px 16px; }
.traffic-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.traffic-head h2 { margin-bottom: 0; }
.traffic-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.traffic-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.traffic-tag {
  padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 12px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--muted);
  transition: color .18s, border-color .18s, background .18s;
}
.traffic-tag:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
/* 开启态用各自系列色,与画布内蜡烛颜色对应 */
.traffic-tag.on { color: var(--text); background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.28); }
.traffic-tag.on[data-series="visitors"] { color: var(--cyan); border-color: rgba(34,211,238,.5); background: rgba(34,211,238,.1); }
.traffic-tag.on[data-series="users"] { color: var(--green); border-color: rgba(74,222,128,.5); background: rgba(74,222,128,.1); }
.traffic-tag.on[data-series="downloads"] { color: var(--violet); border-color: rgba(139,92,246,.5); background: rgba(139,92,246,.1); }
.traffic-tag.on[data-series="pageviews"] { color: var(--amber); border-color: rgba(250,204,21,.5); background: rgba(250,204,21,.1); }
.traffic-tag.on[data-series="orders"] { color: #fb923c; border-color: rgba(251,146,60,.5); background: rgba(251,146,60,.1); }
.traffic-tag.on[data-series="tickets"] { color: #f472b6; border-color: rgba(244,114,182,.5); background: rgba(244,114,182,.1); }
.traffic-tag.on[data-series="sales"] { color: #38bdf8; border-color: rgba(56,189,248,.5); background: rgba(56,189,248,.1); }
.traffic-tag.on[data-series="topup"] { color: #a78bfa; border-color: rgba(167,139,250,.5); background: rgba(167,139,250,.1); }

/* 自定义下拉(时间范围):替代原生 select,避免展开面板露出系统灰白样式 */
.traffic-select { position: relative; }
.traffic-select-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border-radius: 9px; cursor: pointer;
  font-size: 12px; font-family: inherit; color: var(--text);
  background: rgba(0,0,0,.35); border: 1px solid var(--line);
  transition: border-color .18s, background .18s;
}
.traffic-select-btn:hover { border-color: rgba(139,92,246,.55); background: rgba(139,92,246,.1); }
.traffic-select-btn:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 2px rgba(139,92,246,.25); }
.traffic-select-caret { color: var(--muted); transition: transform .18s; flex: none; }
.traffic-select.open .traffic-select-caret { transform: rotate(180deg); }

.traffic-select-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
  min-width: 118px; padding: 5px; display: grid; gap: 2px;
  border-radius: 11px; background: #10131f;
  border: 1px solid rgba(139,92,246,.28);
  box-shadow: 0 12px 32px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.traffic-select-menu[hidden] { display: none; }
.traffic-select-menu button {
  padding: 7px 11px; border: none; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 12px;
  font-family: inherit; text-align: left; white-space: nowrap;
  transition: color .15s, background .15s;
}
.traffic-select-menu button:hover { color: var(--text); background: rgba(255,255,255,.06); }
.traffic-select-menu button[aria-selected="true"] {
  color: var(--cyan); background: rgba(34,211,238,.1);
}

/* 注册赠送开关(卡密库存页) */
.gift-switch-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -6px 0 16px; padding: 10px 14px; border-radius: 11px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line);
}
.gift-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.gift-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.gift-switch-track {
  position: relative; width: 38px; height: 20px; border-radius: 999px; flex: none;
  background: rgba(255,255,255,.12); border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.gift-switch-knob {
  position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); transition: transform .2s, background .2s;
}
.gift-switch input:checked + .gift-switch-track {
  background: rgba(74,222,128,.22); border-color: rgba(74,222,128,.55);
}
.gift-switch input:checked + .gift-switch-track .gift-switch-knob {
  transform: translateX(18px); background: var(--green);
}
.gift-switch input:focus-visible + .gift-switch-track {
  box-shadow: 0 0 0 2px rgba(139,92,246,.35);
}
.gift-switch-text { font-size: 13px; color: var(--text); }
.gift-switch-state { font-size: 11.5px; color: var(--muted); font-family: var(--font-mono); }
.traffic-canvas-wrap { position: relative; width: 100%; }
.traffic-canvas-wrap canvas { display: block; width: 100%; height: 220px; }
.traffic-empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); font-size: 13px; text-align: center; padding: 0 20px;
}
/* hidden 属性要能覆盖上面的 display:grid,否则无数据遮罩会一直挡住图表 */
.traffic-empty[hidden] { display: none; }

.panel { padding: 22px; margin-bottom: 24px; }
.panel h2 { font-family: var(--font-display); font-size: 16px; letter-spacing: 1px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.panel h2::before { content: ''; width: 4px; height: 18px; background: var(--grad); border-radius: 2px; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; table-layout: auto; }
.data-table th, .data-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; }
.data-table th { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.data-table tr:hover td { background: rgba(139,92,246,.04); }
.data-table .mono { font-family: var(--font-mono); font-size: 12.5px; }
.data-table .overflow { max-width: 340px; overflow: hidden; text-overflow: ellipsis; }

/* 分页控件 */
.pager { display: flex; align-items: center; gap: 6px; margin-top: 12px; justify-content: flex-end; flex-wrap: wrap; }
.pager-info { font-size: 12px; color: var(--muted); margin-right: 8px; font-family: var(--font-mono); }
.pager-btn {
  min-width: 32px; height: 30px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--text);
  font-size: 13px; cursor: pointer; font-family: var(--font-mono); transition: all .15s;
}
.pager-btn:hover:not(:disabled) { border-color: var(--violet); color: var(--violet); }
.pager-btn.on { background: var(--violet); border-color: var(--violet); color: #fff; }
.pager-btn:disabled { opacity: .35; cursor: default; }

.tag {
  display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 99px; font-size: 11.5px;
  font-family: var(--font-mono); border: 1px solid; white-space: nowrap; min-width: max-content;
}
.tag-green { color: var(--green); border-color: rgba(74,222,128,.4); background: rgba(74,222,128,.08); }
.tag-red { color: var(--red); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.08); }
.tag-amber { color: var(--amber); border-color: rgba(250,204,21,.4); background: rgba(250,204,21,.08); }
.tag-cyan { color: var(--cyan); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.08); }
.tag-violet { color: var(--violet); border-color: rgba(139,92,246,.4); background: rgba(139,92,246,.08); }

.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"] {
  flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 11px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--text); outline: none;
}
.toolbar input[type="search"]:focus { border-color: var(--violet); }
.toolbar .mini-select {
  padding: 10px 12px; border-radius: 11px; background: rgba(0,0,0,.35);
  border: 1px solid var(--line); color: var(--text); outline: none; font-size: 13px;
}
.toolbar .mini-select:focus { border-color: var(--violet); }

/* 用户管理页顶部的在线汇总条:在线用户 + 在线访客(只显示数量,不显示 IP) */
.online-summary {
  display: flex; align-items: center; gap: 10px;
  margin: -4px 0 16px; padding: 10px 14px; border-radius: 11px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
  overflow: hidden;
}
.online-summary .online-item { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.online-summary b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.online-summary .online-sep { color: var(--line); flex: none; }
.online-summary .online-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}
.online-summary .online-dot-user { background: var(--green); box-shadow: 0 0 6px rgba(74,222,128,.55); }
.online-summary .online-dot-guest { background: var(--cyan); box-shadow: 0 0 6px rgba(34,211,238,.55); }

/* 后台用更宽的容器:表格列多,窄容器会把操作按钮挤成多行 */
.container-admin { width: min(1760px, 96%); }
.admin-layout { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: start; }
.admin-nav { position: sticky; top: 92px; display: grid; gap: 6px; padding: 16px 12px; }
.admin-nav button {
  text-align: left; padding: 11px 16px; border-radius: 11px; border: none; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s;
}
body[data-fx-motion="off"] .admin-nav button { transition: none; }
.admin-nav button:hover { color: var(--text); background: var(--panel-strong); }
.admin-nav button.on { color: #fff; background: linear-gradient(100deg, rgba(139,92,246,.28), rgba(34,211,238,.18)); box-shadow: inset 0 0 0 1px rgba(139,92,246,.45); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* 表格操作列:按钮排成一行,表格超宽时由外层横向滚动承担 */
.data-table .row-actions { flex-wrap: nowrap; gap: 5px; }
.data-table .row-actions .btn { padding: 5px 9px; font-size: 11.5px; white-space: nowrap; }

.license-box {
  font-family: var(--font-mono); font-size: 13.5px; letter-spacing: 1px;
  background: rgba(0,0,0,.4); border: 1px dashed rgba(139,92,246,.45);
  padding: 9px 13px; border-radius: 10px; display: inline-block; color: var(--cyan);
}

/* ---------- FX 特效开关面板 ---------- */
#fx-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 100;
  width: 50px; height: 50px; border-radius: 16px; cursor: pointer;
  border: 1px solid rgba(139,92,246,.5); background: rgba(10,12,26,.9);
  color: var(--violet); font-size: 21px; display: grid; place-items: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 26px -6px rgba(139,92,246,.6);
  transition: transform .2s, box-shadow .3s;
}
#fx-fab:hover { transform: translateY(-3px) rotate(-6deg); box-shadow: 0 0 34px -4px rgba(34,211,238,.7); }
body[data-fx-motion="off"] #fx-fab:hover { transform: none; }

#fx-panel {
  position: fixed; right: 22px; bottom: 84px; z-index: 100; width: 262px;
  padding: 18px; border-radius: 18px;
  background: rgba(8, 10, 22, .92); border: 1px solid rgba(139,92,246,.35);
  backdrop-filter: blur(20px); box-shadow: 0 24px 60px -18px rgba(0,0,0,.8), 0 0 40px -12px rgba(139,92,246,.4);
  opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
body[data-fx-motion="off"] #fx-panel { transition: none; }
#fx-panel.open { opacity: 1; transform: none; pointer-events: auto; }
#fx-panel h4 {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 2.5px;
  color: var(--cyan); text-transform: uppercase; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
#fx-panel h4 .fx-count { color: var(--muted); }
.fx-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px; font-size: 13.5px; color: #c3c9e6;
}
.fx-row small { display: block; color: #5f678a; font-size: 11px; }
.fx-switch {
  position: relative; width: 42px; height: 23px; flex-shrink: 0; cursor: pointer;
  background: rgba(255,255,255,.1); border-radius: 99px; border: 1px solid var(--line);
  transition: background .25s, border-color .25s;
}
.fx-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: #8b93b5; transition: transform .25s, background .25s;
}
.fx-switch.on { background: rgba(139,92,246,.35); border-color: rgba(139,92,246,.7); }
.fx-switch.on::after { transform: translateX(19px); background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
body[data-fx-motion="off"] .fx-switch::after { transition: none; }
#fx-panel .fx-foot {
  display: flex; gap: 8px; margin-top: 12px;
}
#fx-panel .fx-foot .btn { flex: 1; }

/* toast 通知 */
#toast-root { position: fixed; top: 84px; right: 22px; z-index: 200; display: grid; gap: 10px; }
.toast {
  min-width: 240px; max-width: 360px; padding: 13px 17px; border-radius: 13px;
  background: rgba(10, 12, 26, .94); border: 1px solid var(--line); font-size: 14px;
  backdrop-filter: blur(14px); box-shadow: 0 16px 40px -12px rgba(0,0,0,.7);
  animation: toastIn .3s ease;
}
.toast.ok { border-color: rgba(74,222,128,.5); color: #b7f2cd; }
.toast.err { border-color: rgba(248,113,113,.5); color: #fecaca; }
.toast.info { border-color: rgba(34,211,238,.5); color: #bdf2fa; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
body[data-fx-motion="off"] .toast { animation: none; }

/* ---------- 工单 ---------- */
.ticket-actions { display: flex; justify-content: center; margin-bottom: 26px; }
.ticket-panels { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.ticket-panels .panel { margin-bottom: 0; }
.ticket-form h3, .ticket-lookup h3 {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 1px;
  color: var(--cyan); margin-bottom: 16px;
}
.ticket-hint { color: var(--muted); font-size: 13px; line-height: 1.6; margin: -4px 0 14px; }
.ticket-list { display: grid; gap: 8px; margin-top: 14px; }
.ticket-list:empty { display: none; }
.ticket-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 12px; font-family: inherit; font-size: 13px; color: var(--text);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; transition: border-color .2s, background .2s;
}
.ticket-row:hover { border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .06); }
.ticket-row.on { border-color: var(--cyan); background: rgba(34, 211, 238, .08); }
.ticket-row-id { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); flex: 0 0 auto; }
.ticket-row-subject {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ticket-row-meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex: 0 0 auto; }
.ticket-thread { display: none; margin-top: 16px; }
.ticket-thread.show { display: block; }
.ticket-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.ticket-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 14px; }
.ticket-subject { font-size: 14px; margin-top: 8px; word-break: break-word; }
.ticket-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.ticket-messages { max-height: 420px; overflow-y: auto; }
.ticket-msg {
  border-left: 3px solid var(--violet); background: rgba(255, 255, 255, .03);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
}
.ticket-msg.admin { border-left-color: var(--cyan); background: rgba(34, 211, 238, .05); }
.ticket-msg .meta {
  display: flex; justify-content: space-between; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-bottom: 5px;
}
.ticket-msg .body { font-size: 13.5px; white-space: pre-wrap; word-break: break-word; }
.ticket-reply { margin-top: 14px; }
.ticket-reply .field { margin-bottom: 10px; }
.ticket-admin-detail { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.ticket-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ticket-detail-head h3 { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; color: var(--cyan); }

/* 工单弹窗 */
body.ticket-lock { overflow: hidden; }
.ticket-modal {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.ticket-modal.open { display: flex; }
.ticket-modal-mask {
  position: absolute; inset: 0; background: rgba(4, 6, 12, .78);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: tmFade .18s ease;
}
.ticket-modal-box {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 26px 26px 22px; border-radius: var(--radius); animation: tmIn .22s ease;
}
.ticket-modal-box h3 {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 1px;
  color: var(--cyan); margin-bottom: 18px; padding-right: 34px;
}
.ticket-modal-x {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  font-size: 22px; line-height: 1; color: var(--muted);
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.ticket-modal-x:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
@keyframes tmFade { from { opacity: 0; } }
@keyframes tmIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
body[data-fx-motion="off"] .ticket-modal-box,
body[data-fx-motion="off"] .ticket-modal-mask { animation: none; }

/* 邀请码面板 */
.invite-hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.invite-locked {
  padding: 18px 20px; border-radius: 12px; font-size: 13.5px; line-height: 1.8;
  color: var(--muted); background: rgba(139, 92, 246, .06);
  border: 1px dashed rgba(139, 92, 246, .3);
}
.invite-desc { font-size: 13.5px; color: var(--muted); line-height: 1.8; margin: -6px 0 16px; }
.invite-grid { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 14px; margin-bottom: 14px; }
.invite-field label {
  display: block; font-size: 12px; letter-spacing: 1px; color: var(--muted);
  margin-bottom: 6px; text-transform: uppercase; font-family: var(--font-mono);
}
.invite-code, .invite-link {
  width: 100%; cursor: pointer; text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.invite-code { font-size: 15px; letter-spacing: 1px; }
.invite-link { font-size: 12px; color: var(--cyan); }
.invite-stats { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .invite-grid { grid-template-columns: 1fr; }
}

/* 全站确认弹框 */
body.site-confirm-lock { overflow: hidden; }
dialog.site-confirm {
  position: fixed; inset: 0; margin: auto; width: min(460px, calc(100% - 40px));
  max-height: calc(100dvh - 40px); padding: 28px; overflow-y: auto;
  color: var(--text); background: linear-gradient(145deg, #151424, #0b111a);
  border: 1px solid rgba(139,92,246,.35); border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,.65); text-align: left;
  animation: tmIn .2s ease;
}
.site-confirm::backdrop {
  background: rgba(4,6,12,.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.site-confirm h3 {
  font-family: var(--font-display); font-size: 18px; line-height: 1.5; margin: 0 0 14px;
  color: var(--text); border-left: 3px solid var(--cyan); padding-left: 12px;
}
.site-confirm-message {
  font-size: 14px; line-height: 1.85; color: var(--muted); margin: 0;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.site-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.site-confirm-actions .btn { min-width: 96px; }
.site-confirm-actions .btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
body[data-fx-motion="off"] .site-confirm { animation: none; }
@media (prefers-reduced-motion: reduce) {
  dialog.site-confirm { animation: none; }
}
@media (max-width: 480px) {
  dialog.site-confirm { width: calc(100% - 24px); padding: 24px 20px; }
  .site-confirm-actions .btn { flex: 1; }
}

/* 后台评价编辑弹框 */
body.admin-edit-lock { overflow: hidden; }
.admin-edit-modal {
  position: fixed; inset: 0; z-index: 130; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.admin-edit-modal.open { display: flex; }
.admin-edit-mask {
  position: absolute; inset: 0; background: rgba(4, 6, 12, .78);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: tmFade .18s ease;
}
.admin-edit-box {
  position: relative; width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 26px 26px 22px; border-radius: var(--radius); animation: tmIn .22s ease;
}
.admin-edit-box h3 {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 1px;
  color: var(--cyan); margin-bottom: 18px; padding-right: 34px;
}
.admin-edit-x {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  font-size: 22px; line-height: 1; color: var(--muted);
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.admin-edit-x:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.admin-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.admin-edit-sub {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--cyan); margin: 20px 0 12px;
  padding-bottom: 7px; border-bottom: 1px solid var(--line);
}
.admin-edit-checks { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.admin-check {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 13.5px; color: var(--text); user-select: none;
}
.admin-check input[type="checkbox"] {
  width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--violet);
}
@media (max-width: 600px) {
  .admin-edit-modal { padding: 12px; }
  .admin-edit-box { padding: 24px 16px 16px; max-height: calc(100dvh - 24px); }
  .admin-edit-grid { grid-template-columns: 1fr; gap: 0; }
}
body[data-fx-motion="off"] .admin-edit-box,
body[data-fx-motion="off"] .admin-edit-mask { animation: none; }

/* ---------- 响应式 ---------- */
/* 中等宽度:压缩导航内边距,避免链接换行/溢出(中文文案较长) */
@media (max-width: 1080px) and (min-width: 901px) {
  .nav-inner { gap: 14px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 8px 10px; font-size: 13.5px; }
  /* 中等宽度下导航空间紧张,在线徽章隐藏(移动端抽屉里仍可见) */
  .nav-links .online-pill { display: none; }
}
@media (max-width: 900px) {
  /* 导航收进汉堡抽屉;语言切换与按钮保留在导航条右侧 */
  .nav-inner { gap: 12px; }
  .lang-switch { margin-left: auto; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .lang-switch + .nav-toggle { margin-left: 0; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 4vw 16px;
    background: rgba(7, 9, 20, .98);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 44px -22px rgba(0, 0, 0, .95);
    max-height: calc(100vh - 68px); overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links a.nav-discord {
    display: flex; align-items: center; padding: 12px 12px; margin-left: 0;
    font-size: 15px; border-radius: 10px;
  }
  .nav-links a.hide-md { display: flex; }
  .nav-links a.nav-discord { background: rgba(88, 101, 242, .12); }
  /* 抽屉展开时在线徽章占一整行,居中显示 */
  .nav-links .online-pill { margin: 6px 12px 4px; align-self: center; }
  .nav-links .nav-cta { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 6px; }
  .nav-links .nav-cta .btn { width: 100%; padding: 10px 14px; font-size: 14px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .plan-card.hot { transform: none; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { position: static; grid-template-columns: repeat(2, 1fr); }
  .ticket-panels { grid-template-columns: 1fr; }
  .ticket-modal { padding: 12px; }
  .ticket-modal-box { padding: 20px 16px 16px; }
}
/* 后台/控制台内的多列表单:窄屏改为单列(行内样式需 !important) */
@media (max-width: 700px) {
  #product-form, #manual-order, #card-form, #rp-form, #review-form,
  #gen-form, #key-form > div, #review-form > div {
    grid-template-columns: 1fr !important;
  }
  #product-form { gap: 0 !important; }
}
@media (max-width: 560px) {
  section { padding: 64px 0; }
  .hero { padding-top: 120px; padding-bottom: 64px; }
  .hero-logo { width: 96px; }
  .hero-kicker {
    font-size: 10.5px; letter-spacing: 1px; padding: 6px 12px;
    max-width: 100%; flex-wrap: wrap; justify-content: center; line-height: 1.7;
  }
  .hero h1 { font-size: clamp(26px, 8.4vw, 40px); letter-spacing: 1px; }
  .hero .sub { font-size: 15px; }
  .auth-wrap { padding: 96px 5% 48px; }
  .auth-card { padding: 28px 20px; }
  .auth-card h1 { font-size: 21px; }
  .code-inputs { gap: 6px; }
  .code-inputs input { width: auto; flex: 1 1 0; min-width: 0; height: 54px; font-size: 21px; }
  .dash-wrap { padding: 96px 0 56px; }
  .dash-head h1 { font-size: 22px; }
  .data-table th, .data-table td { padding: 9px 8px; font-size: 12.5px; }
  .data-table .overflow { max-width: 180px; }
  .product-card { padding: 20px; }
  .sec-head { margin-bottom: 34px; }
  .sec-head h2 { margin-top: 8px; }
  .status-table th, .status-table td { padding: 10px 12px; font-size: 12.5px; }
  .plan-card { padding: 26px 20px; }
  .plan-card .amount { font-size: 36px; }
  .faq-item summary { padding: 15px 16px; font-size: 14px; gap: 12px; }
  .faq-item .faq-body { padding: 0 16px 15px; font-size: 13.5px; }
  .cta-banner { padding: 44px 20px; border-radius: 18px; }
  .panel { padding: 16px; }
  .foot-grid { gap: 20px; }
  .foot-grid .links { gap: 16px; }
  #toast-root { left: 12px; right: 12px; top: 76px; }
  .toast { min-width: 0; max-width: none; }
}
@media (max-width: 380px) {
  .hero-kicker { font-size: 9.5px; letter-spacing: .5px; }
  .nav-inner { gap: 8px; }
  .lang-switch button { padding: 3px 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- 产品预览页 /product ---------- */
.pp-wrap { padding: 110px 0 80px; }
.pp-topbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.pp-back { color: var(--muted); font-size: 13.5px; transition: color .2s; }
.pp-back:hover { color: var(--cyan); }
.pp-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}
.pp-root { min-height: 320px; }
.pp-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.pp-gallery { padding: 0; overflow: hidden; }
.pp-stage {
  position: relative; overflow: hidden;
  background: radial-gradient(600px 300px at 50% 0%, rgba(139,92,246,.18), transparent 70%), #07081a;
  min-height: 200px; display: flex; align-items: center; justify-content: center;
}
.pp-stage-media { width: 100%; height: auto; max-height: 76vh; object-fit: contain; background: #05060e; display: block; }
/* 预览素材切换:新画面向切换方向滑入,旧画面由 .pp-stage 的 overflow 裁掉 */
.pp-slide { width: 100%; display: flex; align-items: center; justify-content: center; }
.pp-slide-in-right { animation: ppSlideInRight .42s cubic-bezier(.22,.61,.36,1) both; }
.pp-slide-in-left { animation: ppSlideInLeft .42s cubic-bezier(.22,.61,.36,1) both; }
@keyframes ppSlideInRight {
  from { transform: translateX(100%); opacity: .35; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes ppSlideInLeft {
  from { transform: translateX(-100%); opacity: .35; }
  to { transform: translateX(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-slide { animation: none; }
}
.pp-zoom { cursor: zoom-in; }
.pp-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(6,8,20,.55); color: var(--text); font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(6px); transition: border-color .2s, background .2s, color .2s;
}
.pp-nav:hover { border-color: var(--violet); background: rgba(139,92,246,.3); color: #fff; }
.pp-nav-prev { left: 12px; }
.pp-nav-next { right: 12px; }
.pp-count {
  position: absolute; top: 12px; right: 12px; z-index: 2; pointer-events: none;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: .5px;
  background: rgba(6,8,20,.65); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px;
}
.pp-stage-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; color: var(--muted); font-size: 13.5px; }
.pp-stage-empty img { width: 64px; opacity: .5; }
.pp-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 12px 14px; }
.pp-thumb {
  flex: 0 0 auto; width: 84px; height: 56px; padding: 0; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: #07081a; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-thumb.on { border-color: var(--violet); box-shadow: 0 0 0 1px rgba(139,92,246,.5), 0 0 18px -6px rgba(139,92,246,.8); }
.pp-thumb-video span { display: none; }

/* 预览图点击查看原图 */
.pp-lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; padding: 48px 24px;
  background: rgba(3,4,12,.94); overflow: auto; -webkit-overflow-scrolling: touch;
}
.pp-lightbox img {
  display: block; margin: auto; max-width: none; max-height: none; border-radius: 10px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(139,92,246,.25);
}
.pp-lightbox-close {
  position: fixed; top: 16px; right: 18px; z-index: 1; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10,12,28,.9); color: var(--text);
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pp-lightbox-close:hover { border-color: var(--violet); color: #fff; }
.pp-info { padding: 4px 2px; }
.pp-game { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); }
.pp-info h1 { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 38px); letter-spacing: 1px; margin: 8px 0 10px; }
.pp-tagline { color: var(--muted); font-size: 15px; margin-top: 14px; }
.pp-intro-box { margin-top: 26px; padding: 32px 28px; text-align: left; }
.pp-intro-box .pp-h2 { margin: 0 0 16px; }
.pp-intro { max-width: 860px; margin: 0 auto; text-align: left; color: #b9c0dd; font-size: 14.5px; line-height: 1.75; display: grid; gap: 12px; }
.pp-intro p { margin: 0; }
.pp-h2 { font-family: var(--font-display); font-size: 15px; letter-spacing: 1.5px; margin: 26px 0 12px; }
.pp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.pp-plan {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 13px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer; text-align: left; transition: border-color .2s, box-shadow .2s, background .2s;
}
.pp-plan:hover { border-color: rgba(139,92,246,.55); }
.pp-plan.on { border-color: var(--violet); background: rgba(139,92,246,.12); box-shadow: 0 0 0 1px rgba(139,92,246,.35) inset; }
.pp-plan-label { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.pp-plan-price { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.pp-buy { width: 100%; }
.pp-note { margin-top: 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.pp-result {
  margin-top: 18px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; border-color: rgba(74,222,128,.35);
}
.pp-result-text { font-family: var(--font-mono); font-size: 14px; color: var(--green); word-break: break-all; }
.pp-empty { padding: 56px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.pp-empty h1 { font-family: var(--font-display); font-size: 24px; }
.pp-empty p { color: var(--muted); font-size: 14px; max-width: 520px; }

/* 首页产品卡整卡可点击 + 价格标签 */
a.product-card { display: block; color: inherit; text-decoration: none; }
.price-chip {
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan); white-space: nowrap;
  border: 1px solid rgba(34,211,238,.35); background: rgba(34,211,238,.07); border-radius: 999px; padding: 3px 10px;
}
.card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--violet); }
a.product-card:hover .card-link { color: var(--cyan); }

/* 后台:产品预览素材管理 */
.pv-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 120px; }
.pv-thumb { position: relative; width: 36px; height: 28px; border-radius: 5px; overflow: hidden; border: 1px solid var(--line); background: #07081a; display: block; }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-x {
  position: absolute; top: 0; right: 0; width: 16px; height: 16px; padding: 0; line-height: 1;
  font-size: 12px; border: 0; border-radius: 0 6px 0 6px; background: rgba(248,113,113,.85); color: #fff; cursor: pointer;
}
.pv-video { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pv-video .pv-x { position: static; border-radius: 6px; }

@media (max-width: 900px) {
  .pp-grid { grid-template-columns: 1fr; gap: 20px; }
  .pp-info h1 { font-size: 26px; }
}
@media (max-width: 560px) {
  .pp-wrap { padding: 96px 0 56px; }
  .pp-plans { grid-template-columns: 1fr; }
  .pp-nav { width: 34px; height: 34px; font-size: 18px; }
  .pp-nav-prev { left: 8px; }
  .pp-nav-next { right: 8px; }
}

/* 钱包充值提示 */
.wallet-hint {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin: 12px 0 4px; padding: 10px 14px; border-radius: 11px;
  background: rgba(34,211,238,.06); border: 1px solid rgba(34,211,238,.22);
  color: var(--muted); font-size: 12.8px; line-height: 1.6;
}
.wallet-hint-link {
  color: var(--cyan); border-bottom: 1px dashed rgba(34,211,238,.5); padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.wallet-hint-link:hover { color: var(--text); border-bottom-color: var(--text); }
