:root {
  /* 站点通用蓝色主题 */
  --brand: #1677ff;
  --brand-d: #0958d9;
  --brand-soft: rgba(22, 119, 255, 0.12);
  --brand-glow: rgba(22, 119, 255, 0.3);
  --bg: #f5f7fa;
  --bg-dark: #0b0f19;
  --text: #1f2329;
  --text-light: #fff;
  --muted: #646a73;
  --card-bg: #fff;
  --card-border: #e8eaed;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ 两层页头 ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.top-bar {
  height: 36px;
  background: rgba(8, 11, 18, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
}

.top-bar-inner {
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;   /* 与内容容器 1500px/24px 对齐 */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.top-bar a:hover { color: #fff; }

.top-auth { display: flex; align-items: center; gap: 8px; }
.top-auth .sep { color: rgba(255,255,255,0.35); }
.top-auth .usr-name { color: rgba(255,255,255,0.85); }
.top-auth .usr-admin,
.top-auth .usr-center,
.top-auth .usr-logout { color: #fff; text-decoration: none; opacity: 0.9; }
.top-auth .usr-admin:hover,
.top-auth .usr-center:hover,
.top-auth .usr-logout:hover { opacity: 1; text-decoration: underline; }

.nav-bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0 max(24px, calc((100% - 1500px) / 2));   /* 与内容容器 1500px/24px 对齐 */
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled .nav-bar {
  background: rgba(11, 15, 25, 0.98);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--brand);
  text-decoration: none;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.logo-img {
  height: 38px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.header-logo-text {
  display: inline-block;
  white-space: nowrap;
}

.main-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
  opacity: 1;
  transition: opacity 0.15s ease;
  z-index: 2;
}

.main-nav.nav-pending {
  opacity: 0;
}

.main-nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -8px;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.22s ease;
}
.main-nav a:hover,
.main-nav a.active { color: #fff; }
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hotline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
}
.hotline svg { width: 20px; height: 20px; fill: currentColor; }

.icon-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
.icon-link:hover { color: var(--brand); }
.icon-link svg { width: 22px; height: 22px; fill: currentColor; display: block; }

/* 页面主内容 */
.page-main {
  padding: 136px 24px 60px;
  max-width: 1500px;
  margin: 0 auto;
  min-height: 70vh;
}

.page-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 12px;
  text-align: center;
}
.page-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 40px;
}

.hero {
  position: relative;
  padding: 120px 48px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #0b0f19 0%, #141b2d 60%, #0b0f19 100%);
  overflow: hidden;
}
.hero h1 { font-size: 44px; margin: 0 0 16px; }
.hero p { font-size: 18px; opacity: 0.85; margin: 0 0 32px; }
.hero .btns { display: flex; gap: 16px; justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  color: #fff;
  box-shadow: 0 8px 22px var(--brand-glow);
}
.btn-primary:hover { transform: translateY(-1px); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

/* 通用卡片 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* 页尾 */
.site-footer {
  background: rgba(8, 11, 18, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 50px 24px 24px;   /* 与内容容器 1500px/24px 对齐 */
}

.footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 18px;
  color: #fff;
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  margin: 0 0 10px;
  line-height: 1.5;
}

.footer-col a:hover { color: var(--brand); }

.footer-qr {
  width: 96px;
  height: 96px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}
.footer-qr img { width: 100%; height: 100%; object-fit: cover; }

.footer-hotline {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  margin: 6px 0 10px;
}

.footer-bottom {
  max-width: 1500px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* 右侧悬浮工具条：官网统一白底 + 品牌蓝 hover（支付宝蓝 #1677ff，统一走 --brand） */
.float-toolbar {
  position: fixed;
  right: 1%;
  top: 25%;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  border: 1px solid #ededed;
  border-top: 0;
  background: #fff;
}

.toolbar-item {
  position: relative;
  width: 58px;
  height: 58px;
  background: #fff;
  border-top: 1px solid #ededed;
  cursor: pointer;
}
.toolbar-item .tool-btn {
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toolbar-item .tool-btn img {
  width: 28px;
  height: 28px;
  opacity: 1;
  transition: opacity 0.3s linear;
}
.toolbar-item .tool-btn svg {
  width: 28px;
  height: 28px;
  opacity: 1;
  transition: opacity 0.3s linear;
}
.toolbar-item .tool-btn span {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 58px;
  height: 58px;
  padding: 0 2px;
  background: var(--brand);
  line-height: 14px;
  text-align: center;
  font-size: 12px;
  color: #fff;
  opacity: 0;
  box-sizing: border-box;
  transition: opacity 0.3s linear;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 2026-11-01：「AI客服」4 字在 58px 内不再折成两行 */
  white-space: nowrap;
}
.toolbar-item:hover .tool-btn img { opacity: 0; }
.toolbar-item:hover .tool-btn svg { opacity: 0; }
.toolbar-item:hover .tool-btn span { opacity: 1; }

/* 弹窗卡片 */
.toolbar-card {
  position: absolute;
  right: 58px;
  top: 50%;
  transform: translateY(-50%) scale(0.95);
  transform-origin: right center;
  width: 220px;
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  color: #333;
  text-align: center;
}
.toolbar-item:hover .toolbar-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}
.toolbar-card::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent transparent #fff;
}
.toolbar-card .qq-avatar {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: #f0f2f5;
  display: grid; place-items: center; font-size: 28px;
}
.toolbar-card .contact-btn {
  display: inline-block; padding: 6px 18px; border: 1px solid var(--brand); border-radius: 20px;
  color: var(--brand); font-size: 13px; text-decoration: none; margin: 8px 0; transition: all 0.2s;
  /* 2026-11-01：AI客服入口用 <button>（替换原 QQ <a>），清掉浏览器默认按钮底色/字体 */
  background: transparent; font-family: inherit; cursor: pointer; line-height: normal;
}
.toolbar-card .contact-btn:hover { background: var(--brand); color: #fff; }
.toolbar-card .contact-info { font-size: 13px; color: #666; line-height: 1.6; }
.toolbar-card .contact-info strong { display: block; font-size: 18px; color: var(--brand); margin: 6px 0; }
.toolbar-card .qr-img { width: 150px; height: 150px; margin: 0 auto; background: #f5f5f5; border-radius: 4px; overflow: hidden; }
.toolbar-card .qr-img img { width: 100%; height: 100%; object-fit: cover; }
.toolbar-card .qr-tip { font-size: 12px; color: #888; margin-top: 10px; }

/* 返回顶部：位于页面顶部时整块不出现（display:none，不占位留白），滚动到下方才淡入 */
.backtop { display: none; }
.backtop.visible {
  display: block;
  animation: backtopIn 0.25s ease both;
}
@keyframes backtopIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .top-bar-inner { padding: 0 20px; }
  .nav-bar { padding: 0 20px; }
  .main-nav { display: none; }
  .hotline span { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .float-toolbar { display: none; }
  .page-main { padding-top: 120px; }
  .hero { padding: 80px 20px; }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}

/* ============ 服务页 ============ */
.svc-hero { text-align: center; padding: 10px 0 4px; }
.svc-hero h1 {
  font-size: 38px; font-weight: 800; margin: 0 0 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.svc-hero .lead { font-size: 18px; color: var(--muted); margin: 0; }

.section-head { text-align: center; margin: 56px 0 8px; }
.section-head h2 { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.section-head p { color: var(--muted); font-size: 15px; margin: 0; }

.svc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin-top: 30px;
}
.svc-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.svc-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(22,119,255,0.12); }
.svc-card .svc-ico {
  width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft);
  color: var(--brand); display: grid; place-items: center; margin-bottom: 16px;
}
.svc-card .svc-ico svg { width: 26px; height: 26px; fill: currentColor; }
.svc-card h3 { margin: 0 0 10px; font-size: 18px; }
.svc-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.guarantee-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px; margin-top: 30px;
}
.guarantee-item {
  display: flex; gap: 14px; align-items: flex-start; background: var(--card-bg);
  border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.guarantee-item .check {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-d));
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.guarantee-item h4 { margin: 0 0 6px; font-size: 15px; }
.guarantee-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ============ 定价页增强 ============ */
.price-packages {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 24px; margin-top: 30px;
}
.pkg-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.pkg-card.featured { border-color: var(--brand); box-shadow: 0 10px 30px var(--brand-glow); }
.pkg-card .tag {
  position: absolute; top: 14px; right: -34px; transform: rotate(45deg);
  background: var(--brand); color: #fff; font-size: 12px; padding: 4px 40px;
}
.pkg-card h3 { margin: 0 0 6px; font-size: 18px; }
.pkg-card .price-big { font-size: 30px; font-weight: 800; color: var(--brand); margin: 10px 0; }
.pkg-card .price-big small { font-size: 14px; font-weight: 500; color: var(--muted); }
.pkg-card ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.9; }

/* ============ 后台管理表单 ============ */
.admin-form { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.admin-form .field { display: flex; flex-direction: column; gap: 6px; }
.admin-form label { font-size: 13px; color: #646a73; font-weight: 600; }
.admin-form input, .admin-form textarea, .admin-form select {
  padding: 10px 12px; border: 1px solid #d9dce0; border-radius: 6px; font-size: 14px;
  font-family: inherit; transition: border-color 0.2s;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-form select:focus {
  outline: none; border-color: var(--brand);
}
.admin-form textarea { resize: vertical; min-height: 80px; }
.admin-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-save {
  align-self: flex-start; margin-top: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff;
  border: none; padding: 10px 28px; border-radius: 6px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.admin-save:hover { opacity: 0.92; }
.admin-hint { font-size: 13px; color: #8a9099; margin: 0 0 4px; }
.admin-item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 14px 16px; border: 1px solid #e8eaed; border-radius: 8px; margin-bottom: 10px; background: #fff;
}
.admin-item .t { font-weight: 600; font-size: 14px; }
.admin-item .d { font-size: 13px; color: #8a9099; grid-column: 1 / 2; }
.admin-item button {
  border: 1px solid #d9dce0; background: #fff; border-radius: 6px; padding: 6px 14px;
  font-size: 13px; cursor: pointer;
}
.admin-item button.del { color: #ff2d55; border-color: #ffd0d8; }
.admin-item button:hover { background: #f5f7fa; }

/* 防止配置（站点名/Logo/导航/标语）加载前闪现默认内容（FOUC）。
   html 在未加 cfg-ready 前隐藏待配置区域；site-config.js 同步应用完配置后加 cfg-ready 立即显示。
   兜底：若脚本未执行，0.6s 后自动显示，避免永久空白。 */
@keyframes fsCfgReveal { to { visibility: visible; } }
html:not(.cfg-ready) .logo-mark,
html:not(.cfg-ready) .header-logo-text,
html:not(.cfg-ready) .top-bar-inner > div:first-child,
html:not(.cfg-ready) .main-nav {
  visibility: hidden;
  animation: fsCfgReveal 0.01s linear 0.6s forwards;
}
