/* =========================================================
   顾手游电竞 游戏代练业务站 - 全站公共样式
   ========================================================= */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #080d1a;
  --bg-soft: #0e1526;
  --card: #131c31;
  --card-hover: #18233c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eefb;
  --muted: #94a2c2;
  --primary: #4f8cff;
  --primary-2: #8b5cf6;
  --accent: #ffb02e;
  --success: #22c98f;
  --danger: #ff5c7a;
  --grad: linear-gradient(135deg, #4f8cff 0%, #8b5cf6 100%);
  --grad-warm: linear-gradient(135deg, #ff8a3d 0%, #ff4d7a 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85);
  --max: 1200px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* 背景装饰光晕 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(79, 140, 255, 0.20), transparent 60%),
    radial-gradient(800px 520px at 92% 4%, rgba(139, 92, 246, 0.18), transparent 62%),
    radial-gradient(700px 500px at 50% 108%, rgba(34, 201, 143, 0.10), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.container { width: min(100% - 44px, var(--max)); margin: 0 auto; position: relative; z-index: 1; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(8, 13, 26, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: 0.4px; }

.logo-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--grad);
  box-shadow: 0 8px 20px -8px rgba(79, 140, 255, 0.9);
  font-size: 18px;
  color: #fff;                 /* 品牌标识字「顾」（顾手游电竞） */
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

/* 备用图形 logo（当前品牌标识使用「顾」字，如需换回图标可放回 svg） */
.logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.logo span small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: 1.6px; }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-links a {
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links a.active { color: #fff; background: var(--grad); box-shadow: 0 8px 22px -12px rgba(79, 140, 255, 1); }

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

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 14px 30px -16px rgba(79, 140, 255, 1); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -16px rgba(79, 140, 255, 1); }

.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.3); }

.btn-warm { background: var(--grad-warm); color: #fff; box-shadow: 0 14px 30px -16px rgba(255, 92, 122, 1); }
.btn-warm:hover { transform: translateY(-2px); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; position: relative; z-index: 1; }
.section-sm { padding: 54px 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 760px; margin: 0 auto 46px; text-align: center; }

.eyebrow {
  display: inline-block;
  padding: 5px 14px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: rgba(79, 140, 255, 0.12);
  border: 1px solid rgba(79, 140, 255, 0.3);
  color: #9dc2ff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

h1, h2, h3, h4 { line-height: 1.32; font-weight: 800; letter-spacing: 0.2px; }
h2.section-title { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 14px; }
.section-desc { color: var(--muted); font-size: 15.5px; }

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

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 76px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

.hero h1 { font-size: clamp(30px, 4.6vw, 52px); margin-bottom: 20px; }
.hero p.lead { color: var(--muted); font-size: 16.5px; max-width: 560px; margin-bottom: 30px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 27px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat span { color: var(--muted); font-size: 13px; }

.hero-visual {
  position: relative;
  border-radius: 22px;
  padding: 26px;
  background: linear-gradient(160deg, rgba(79, 140, 255, 0.16), rgba(139, 92, 246, 0.10));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.hero-visual .vs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hero-visual .vs-head b { font-size: 14px; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; color: var(--success); font-size: 12.5px; font-weight: 700; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(34, 201, 143, 0.18); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.rank-row { display: grid; gap: 12px; }
.rank-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); }
.rank-badge { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--grad); color: #fff; flex: none; }
.rank-item .ri-body { flex: 1; min-width: 0; }
.rank-item .ri-body b { display: block; font-size: 13.5px; }
.rank-item .ri-body span { font-size: 12px; color: var(--muted); }
.rank-item .ri-val { font-weight: 800; font-size: 14px; color: var(--accent); }

/* ---------- 网格与卡片 ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: all 0.25s ease;
}

.card:hover { background: var(--card-hover); border-color: rgba(79, 140, 255, 0.35); transform: translateY(-4px); }

.card-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 21px;
  margin-bottom: 16px;
  background: rgba(79, 140, 255, 0.14);
  border: 1px solid rgba(79, 140, 255, 0.28);
}

.card h3 { font-size: 17px; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 14.2px; }

.card-num { font-size: 12px; font-weight: 800; color: var(--primary); letter-spacing: 2px; margin-bottom: 8px; display: block; }

/* 指标卡 */
.metric { text-align: center; padding: 28px 20px; }
.metric b { display: block; font-size: 34px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.metric span { color: var(--muted); font-size: 13.5px; }

/* ---------- 服务卡片 ---------- */
.service-card { display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.service-card .price { font-size: 24px; font-weight: 800; color: var(--accent); }
.service-card .price small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.service-card .tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(255, 176, 46, 0.14); color: var(--accent); border: 1px solid rgba(255, 176, 46, 0.3); }
.service-card ul li { color: var(--muted); font-size: 13.8px; padding-left: 20px; position: relative; margin-bottom: 6px; }
.service-card ul li::before { content: "◆"; position: absolute; left: 0; top: 0; font-size: 9px; color: var(--primary); line-height: 2; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
thead th {
  text-align: left;
  padding: 15px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #a9bade;
  background: rgba(255, 255, 255, 0.035);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(79, 140, 255, 0.06); color: var(--text); }
td strong, td b { color: var(--text); }
.td-price { color: var(--accent); font-weight: 800; white-space: nowrap; }

.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-hot { background: rgba(255, 92, 122, 0.15); color: #ff8ea1; border: 1px solid rgba(255, 92, 122, 0.32); }
.pill-ok { background: rgba(34, 201, 143, 0.14); color: #5ee0b3; border: 1px solid rgba(34, 201, 143, 0.3); }
.pill-warn { background: rgba(255, 176, 46, 0.14); color: #ffc766; border: 1px solid rgba(255, 176, 46, 0.3); }
.pill-info { background: rgba(79, 140, 255, 0.14); color: #9dc2ff; border: 1px solid rgba(79, 140, 255, 0.3); }
.pill-mute { background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid var(--line-strong); }

/* ---------- 标签切换 ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.tab {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab:hover { color: var(--text); border-color: rgba(79, 140, 255, 0.5); }
.tab.active { background: var(--grad); color: #fff; border-color: transparent; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.35s ease; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 流程步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h4 { font-size: 15.5px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.6px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 700; color: #b6c4e2; }
.field label .req { color: var(--danger); }

.field input, .field select, .field textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.field input::placeholder, .field textarea::placeholder { color: #63708f; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.18);
}
.field textarea { resize: vertical; min-height: 118px; }
.field select option { background: #131c31; color: var(--text); }
.field .hint { font-size: 12px; color: #6f7c99; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .err-msg { font-size: 12px; color: var(--danger); display: none; }
.field.invalid .err-msg { display: block; }

.form-note { font-size: 12.5px; color: #6f7c99; margin-top: 12px; }

/* 提交提示 */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.8px; margin-bottom: 18px; display: none; }
.alert.show { display: block; animation: fadeUp 0.3s ease; }
.alert-success { background: rgba(34, 201, 143, 0.12); border: 1px solid rgba(34, 201, 143, 0.35); color: #6ee7bb; }
.alert-error { background: rgba(255, 92, 122, 0.12); border: 1px solid rgba(255, 92, 122, 0.35); color: #ff9db0; }
.alert-info { background: rgba(79, 140, 255, 0.12); border: 1px solid rgba(79, 140, 255, 0.35); color: #a8c8ff; }

/* ---------- 联系卡片 ---------- */
.contact-item { display: flex; gap: 15px; align-items: flex-start; padding: 18px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.028); border: 1px solid var(--line); margin-bottom: 14px; }
.contact-item .ci-icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--grad); }
.contact-item h4 { font-size: 14.5px; margin-bottom: 3px; }
.contact-item p { color: var(--muted); font-size: 13.6px; word-break: break-all; }
.contact-item .copy-btn { margin-left: auto; align-self: center; }

.qr-box { text-align: center; padding: 26px; border-radius: var(--radius); border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, 0.025); }
.qr-box .qr-placeholder {
  width: 168px; height: 168px; margin: 0 auto 14px;
  border-radius: 12px;
  display: grid; place-items: center;
  background:
    repeating-conic-gradient(#1b2740 0% 25%, #131c31 0% 50%) 50% / 18px 18px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  padding: 0 18px;
}
.qr-box b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.qr-box span { color: var(--muted); font-size: 12.6px; }
/* 后台设置二维码图片后：隐藏文字占位，显示真实二维码 */
.qr-box .qr-img {
  display: none;
  width: 168px; height: 168px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line-strong);
  object-fit: contain;
  padding: 6px;
}
.qr-box.has-qr .qr-img { display: block; }
.qr-box.has-qr .qr-placeholder { display: none; }

/* ---------- FAQ 折叠 ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; background: transparent; border: none; color: var(--text); font-size: 15px; font-weight: 700; cursor: pointer; text-align: left; }
.faq-q i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(79, 140, 255, 0.16); color: #9dc2ff; font-size: 14px; font-style: normal; font-weight: 800; transition: transform 0.25s ease; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { padding: 0 20px 18px; color: var(--muted); font-size: 14px; }
.faq-item.open .faq-a { max-height: 400px; }

/* ---------- CTA 条 ---------- */
.cta-band {
  border-radius: 22px;
  padding: 46px 40px;
  background: linear-gradient(120deg, rgba(79, 140, 255, 0.22), rgba(139, 92, 246, 0.18));
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(21px, 2.6vw, 28px); margin-bottom: 8px; }
.cta-band p { color: #b9c6e4; font-size: 14.5px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 26px; margin-top: 40px; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 36px; }
.footer-grid h4 { font-size: 14px; margin-bottom: 14px; }
.footer-grid p, .footer-grid a { color: var(--muted); font-size: 13.6px; display: block; margin-bottom: 9px; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #6f7c99; font-size: 12.6px; }

/* ---------- 面包屑 / 页头 ---------- */
.page-head { padding: 58px 0 42px; text-align: center; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 12px; }
.page-head p { color: var(--muted); max-width: 660px; margin: 0 auto; }

/* ---------- 管理后台 ---------- */
.admin-body { background: #070b15; }

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}
.login-card {
  width: min(100%, 400px);
  padding: 34px 30px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.login-card .logo { justify-content: center; margin-bottom: 8px; }
.login-card h2 { text-align: center; font-size: 19px; margin-bottom: 6px; }
.login-card .login-tip { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.login-hint { margin-top: 16px; padding: 11px 13px; border-radius: 10px; background: rgba(79, 140, 255, 0.09); border: 1px dashed rgba(79, 140, 255, 0.35); color: #9dc2ff; font-size: 12.4px; text-align: center; }
.login-welcome { margin-top: 18px; padding: 11px 13px; border-radius: 10px; background: rgba(79, 140, 255, 0.09); border: 1px dashed rgba(79, 140, 255, 0.35); color: #9dc2ff; font-size: 13.4px; font-weight: 700; letter-spacing: .6px; text-align: center; }

.admin-shell { display: none; min-height: 100vh; }
.admin-shell.show { display: block; }

.admin-topbar {
  position: sticky; top: 0; z-index: 60;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgba(9, 14, 26, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.admin-topbar .logo { font-size: 16px; }
.admin-topbar .logo-mark { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 13.4px; color: var(--muted); }
.admin-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 13px; }

.admin-layout { display: grid; grid-template-columns: 218px 1fr; align-items: start; }

.admin-side { position: sticky; top: 62px; padding: 20px 14px; border-right: 1px solid var(--line); height: calc(100vh - 62px); overflow-y: auto; }
.admin-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-side a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.admin-side a.active { background: rgba(79, 140, 255, 0.16); color: #b8d0ff; box-shadow: inset 3px 0 0 var(--primary); }

.admin-main { padding: 26px 26px 60px; min-width: 0; }

.admin-page { display: none; }
.admin-page.active { display: block; animation: fadeUp 0.3s ease; }

.admin-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-page-head h2 { font-size: 21px; margin-bottom: 4px; }
.admin-page-head p { color: var(--muted); font-size: 13.6px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.kpi { padding: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.kpi .kpi-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.kpi .kpi-value { font-size: 27px; font-weight: 800; }
.kpi .kpi-sub { font-size: 12.4px; margin-top: 6px; color: var(--muted); }
.kpi .kpi-sub.up { color: var(--success); }
.kpi .kpi-sub.down { color: var(--danger); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h3 { font-size: 16px; }
.panel-head .panel-sub { color: var(--muted); font-size: 12.8px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select {
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 13.4px;
}
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--primary); }
.toolbar select option { background: #131c31; }

/* 简易柱状图 */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; }
.bar { width: 100%; max-width: 46px; border-radius: 8px 8px 0 0; background: var(--grad); min-height: 6px; transition: height 0.6s cubic-bezier(.2,.8,.2,1); position: relative; }
.bar:hover { filter: brightness(1.15); }
.bar-col span { font-size: 11.6px; color: var(--muted); }
.bar-col b { font-size: 12px; color: #b6c4e2; }

/* 进度条 */
.bar-line { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; min-width: 90px; }
.bar-line i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }

/* Toast */
.toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 12px 18px;
  border-radius: 11px;
  background: #16203a;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: slideIn 0.28s ease;
  max-width: 320px;
}
.toast.ok { border-color: rgba(34, 201, 143, 0.5); }
.toast.err { border-color: rgba(255, 92, 122, 0.5); }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* 模态框 */
.modal-mask {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(3, 6, 14, 0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  width: min(100%, 560px);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.28s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h3 { font-size: 17px; }
.modal-close { background: transparent; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.14); border-radius: 999px; cursor: pointer; transition: 0.25s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: 0.25s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 空状态 */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .empty-icon { font-size: 34px; margin-bottom: 12px; opacity: 0.6; }

/* 返回顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(19, 28, 49, 0.92);
  color: var(--text); cursor: pointer; font-size: 17px;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: all 0.25s ease;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--primary); border-color: var(--primary); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; }
  .admin-side a { margin-bottom: 0; white-space: nowrap; }
}

@media (max-width: 820px) {
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 20px 18px;
    background: rgba(9, 14, 26, 0.98);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { border-radius: 10px; }
  .nav-toggle { display: grid; place-items: center; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 62px 0; }
  .hero { padding: 60px 0 52px; }
  .cta-band { padding: 32px 24px; }
  .admin-main { padding: 20px 16px 50px; }
}

@media (max-width: 560px) {
  .grid-4, .kpi-grid, .steps { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .logo span small { display: none; }
}
