/*
 * 全站视觉增强层（前台 / 后台共用）。只做外观：深色页头、光晕网格、卡片与表格悬浮、
 * 按钮扫光、分区标题、空状态和页脚。不改变任何交互逻辑。
 * 首页的专属动效在 home.css，本文件在它之前加载。
 */

/* ---- 全站滚动进度条（site-fx.js 创建） ---- */
.fx-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 300;
  width: 100%; height: 2px; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, #2f6bff, #22d3ee, #a78bfa);
  box-shadow: 0 0 16px rgba(47, 107, 255, .7);
  pointer-events: none;
}

/* ---- 前台深色页头：所有 site 页共用 ---- */
body.site .pagehead {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 32px 34px 26px; margin-bottom: 28px;
  border: 1px solid rgba(151, 180, 255, .2); border-radius: 20px;
  background:
    radial-gradient(760px 360px at 88% -10%, rgba(47, 107, 255, .34), transparent 65%),
    radial-gradient(500px 320px at 0% 120%, rgba(34, 211, 238, .14), transparent 65%),
    #070d18;
  color: #e8f0ff;
  box-shadow: 0 24px 60px -42px rgba(47, 107, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: fxHeadIn .75s cubic-bezier(.16, 1, .3, 1) both;
}
body.site .pagehead::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(151, 180, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 180, 255, .08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 55% 30%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 55% 30%, #000 0%, transparent 72%);
  animation: fxGrid 26s linear infinite;
}
body.site .pagehead::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: -1; height: 1px;
  pointer-events: none; opacity: .7;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .85), transparent);
  box-shadow: 0 0 24px rgba(34, 211, 238, .5);
  animation: fxScan 8s cubic-bezier(.4, 0, .2, 1) infinite;
}
body.site .pagehead > * { position: relative; z-index: 2; }
body.site .pagehead .crumb { color: #7f92ad; }
body.site .pagehead .crumb a { color: #8fa1ba; }
body.site .pagehead .crumb a:hover { color: #7dd3fc; }
body.site .pagehead .eyebrow { color: #7dd3fc; }
body.site .pagehead h1 {
  color: #fff; margin-bottom: .35rem;
  font-size: clamp(2rem, 3.8vw, 3rem); line-height: 1.08; letter-spacing: -.045em;
  text-shadow: 0 0 42px rgba(47, 107, 255, .3);
}
body.site .pagehead .headline h1 { margin: 0; }
body.site .pagehead .sub { color: #a8b7cf; max-width: 62em; }
body.site .pagehead .sub strong { color: #e8f0ff; }
body.site .pagehead .hint { color: #8fa1ba; }
body.site .pagehead code { color: #a5f3fc; background: rgba(34, 211, 238, .08); }
body.site .pagehead a { color: #9db8ff; }
body.site .pagehead a:hover { color: #7dd3fc; }

/* 页头里的统计条：玻璃态 */
body.site .pagehead .statstrip {
  margin-top: 20px; border-color: rgba(151, 180, 255, .18); border-radius: 12px;
  background: rgba(255, 255, 255, .035); overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
body.site .pagehead .stat { border-right-color: rgba(151, 180, 255, .14); padding: 12px 18px; }
body.site .pagehead .stat:last-child { border-right: 0; }
body.site .pagehead .statk { color: #8fa1ba; }
body.site .pagehead .statv { color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(47, 107, 255, .28); }
body.site .pagehead .statv .unit { color: #8fa1ba; }

/* 页头里的徽标 */
body.site .pagehead .badge {
  color: #c9d6ec; border-color: rgba(151, 180, 255, .22);
  background: rgba(255, 255, 255, .05);
}
body.site .pagehead .badge.accent { color: #7dd3fc; border-color: rgba(34, 211, 238, .38); background: rgba(34, 211, 238, .1); }
body.site .pagehead .badge.ok { color: #6ee7b7; border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); }
body.site .pagehead .badge.bad { color: #fca5a5; border-color: rgba(248, 113, 113, .38); background: rgba(248, 113, 113, .1); }
body.site .pagehead .head-actions .hint { color: #8fa1ba; }

/* 页头里的搜索框 */
body.site .pagehead .searchbox input[type=search] {
  color: #fff; border-color: rgba(151, 180, 255, .22);
  background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
body.site .pagehead .searchbox input[type=search]::placeholder { color: #7f92ad; }
body.site .pagehead .searchbox input[type=search]:focus {
  border-color: rgba(125, 211, 252, .6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .12), 0 0 30px -8px rgba(47, 107, 255, .7);
}

/* 配置单页头：标题输入框 / 总价 / 结论条 */
body.site .build-head .build-title-input { color: #fff; caret-color: #22d3ee; }
body.site .build-head .build-title-input:hover { box-shadow: inset 0 -2px 0 rgba(151, 180, 255, .3); }
body.site .build-head .build-title-input:focus {
  background: rgba(255, 255, 255, .06); outline: none;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, .6), 0 0 0 4px rgba(47, 107, 255, .14);
}
body.site .build-head .build-total { border-left-color: rgba(151, 180, 255, .18); }
body.site .build-head .build-total-v { color: #fff; text-shadow: 0 0 26px rgba(47, 107, 255, .32); }
body.site .build-head .build-total-d { color: #8fa1ba; }
body.site .build-head .build-na,
body.site .build-head .build-hint,
body.site .build-head .build-legend { color: #a8b7cf; }
body.site .build-head .build-legend .muted { color: #7f92ad; }
body.site .build-head .verdictbar { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .8); }

/* ---- 分区标题：左侧渐变色条 ---- */
body.site .section-head h2 {
  position: relative; padding-left: 12px;
}
body.site .section-head h2::before {
  content: ""; position: absolute; left: 0; top: .16em; bottom: .16em; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, #2f6bff, #22d3ee 55%, #a78bfa);
  box-shadow: 0 0 14px rgba(47, 107, 255, .45);
}
body.site .section-head .eyebrow { color: #2f6bff; }

/* ---- 卡片 / 表格 / 过滤条 ---- */
body.site .panel {
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
body.site .panel:hover {
  border-color: rgba(47, 107, 255, .28);
  box-shadow: 0 18px 42px -34px rgba(47, 107, 255, .55);
  transform: translateY(-1px);
}
body.site .panel-dark:hover { border-color: rgba(125, 211, 252, .3); }

body.site .tablewrap {
  box-shadow: 0 12px 34px -30px rgba(11, 18, 32, .45);
  transition: border-color .25s ease, box-shadow .25s ease;
}
body.site .tablewrap:hover {
  border-color: rgba(47, 107, 255, .26);
  box-shadow: 0 20px 46px -32px rgba(47, 107, 255, .4);
}
body.site .tablewrap tbody tr { transition: background .18s ease; }
body.site .tablewrap tbody tr:hover {
  background: linear-gradient(90deg, rgba(47, 107, 255, .055), rgba(34, 211, 238, .02) 55%, transparent 90%);
}
body.site .tablewrap thead th { background: #f8faff; }

body.site .facetline a.chip { transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
body.site .facetline a.chip:hover { background: #eef4ff; box-shadow: 0 0 0 1px rgba(47, 107, 255, .1); }
body.site .facetline a.chip.on {
  background: linear-gradient(100deg, #2f6bff, #1f5eff 55%, #0ea5e9);
  box-shadow: 0 6px 18px -10px rgba(47, 107, 255, .8);
}

/* ---- 按钮 / 徽标 / 图片 ---- */
body.site .btn { position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
body.site .btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .38), transparent 70%);
  transform: translateX(-130%); transition: transform .65s ease;
}
body.site .btn:hover::after { transform: translateX(130%); }
body.site .btn.primary {
  background: linear-gradient(100deg, #2f6bff, #1f5eff 55%, #0ea5e9);
  box-shadow: 0 12px 30px -18px rgba(47, 107, 255, .95);
}
body.site .btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -16px rgba(47, 107, 255, 1); }
body.site .btn.ghost:hover { border-color: rgba(47, 107, 255, .4); box-shadow: 0 0 0 3px rgba(47, 107, 255, .06); }
body.site .badge { transition: border-color .2s ease, color .2s ease, background .2s ease; }
body.site .badge:hover { border-color: rgba(47, 107, 255, .4); color: var(--accent); }
body.site .gallery figure { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
body.site .gallery figure:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -30px rgba(47, 107, 255, .55); }
body.site .gallery img { transition: transform .3s ease; }
body.site .gallery figure:hover img { transform: scale(1.035); }

/* ---- 空状态 / 配置步骤 / 结论条 ---- */
body.site .empty { position: relative; overflow: hidden; background: linear-gradient(120deg, #fff, #f8faff); }
body.site .empty::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(rgba(47, 107, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 107, 255, .06) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 30%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000, transparent 72%);
}
body.site .empty > * { position: relative; z-index: 1; }
body.site .empty-ic { animation: fxFloat 5s ease-in-out infinite; }

body.site .build-steps > div {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #fff, #f8faff);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.site .build-steps > div:hover { border-color: rgba(47, 107, 255, .3); transform: translateY(-2px); box-shadow: 0 14px 30px -26px rgba(47, 107, 255, .5); }
body.site .verdictbar { box-shadow: 0 10px 30px -26px rgba(11, 18, 32, .45); }
body.site .specrow { transition: background .18s ease; border-radius: 6px; }
body.site .specrow:hover { background: rgba(47, 107, 255, .035); }

/* ---- 页脚 ---- */
body.site .sitefoot {
  position: relative; margin-top: 4.5rem; padding-top: 22px;
  border-top: 1px solid var(--line); flex-wrap: wrap;
}
body.site .sitefoot::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 96px; height: 2px;
  background: linear-gradient(90deg, #2f6bff, #22d3ee, transparent);
  box-shadow: 0 0 14px rgba(47, 107, 255, .45);
}
body.site .foot-brand span { color: #2f6bff; letter-spacing: .12em; }
body.site .foot-legal {
  flex: 1 0 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .66rem; letter-spacing: .02em; color: var(--muted);
}
body.site .foot-legal a { color: var(--muted); }
body.site .foot-legal a:hover { color: var(--accent); }
body.site .foot-legal .sep { color: var(--line-strong); }

/* ---- 前台导航：底部一条会呼吸的渐变线 ---- */
body.site .sitenav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(47, 107, 255, .7), rgba(34, 211, 238, .55), transparent);
  opacity: .75;
}
body.site .sitenav .brand-mark { box-shadow: 0 0 20px rgba(47, 107, 255, .35); }

/* ---- 后台：导航和页头小升级，不动表单逻辑 ---- */
body:not(.site) .adminnav {
  background: linear-gradient(100deg, #070c16, #0b1424 52%, #070c16);
  box-shadow: 0 8px 28px -24px rgba(0, 0, 0, .9);
}
body:not(.site) .adminnav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 107, 255, .55), transparent);
  pointer-events: none;
}
body:not(.site) .adminlinks a:hover { color: #7dd3fc; }
body:not(.site) main > header {
  position: relative; isolation: isolate; overflow: hidden;
  margin-bottom: 22px; padding: 22px 24px 20px;
  border: 1px solid rgba(151, 180, 255, .18); border-radius: 16px;
  background:
    radial-gradient(600px 280px at 90% -20%, rgba(47, 107, 255, .28), transparent 65%),
    #070d18;
  color: #e8f0ff;
  box-shadow: 0 18px 44px -36px rgba(47, 107, 255, .55);
}
body:not(.site) main > header::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none; opacity: .4;
  background-image:
    linear-gradient(rgba(151, 180, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 180, 255, .08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse at 60% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000, transparent 75%);
}
body:not(.site) main > header > * { position: relative; z-index: 1; }
body:not(.site) main > header h1 { color: #fff; letter-spacing: -.035em; margin-bottom: .25rem; }
body:not(.site) main > header .sub { color: #a8b7cf; }
body:not(.site) main > header a { color: #9db8ff; }
body:not(.site) main > header a:hover { color: #7dd3fc; }
body:not(.site) main > header .msg { color: #0b7a53; }
body:not(.site) .panel { transition: border-color .2s ease, box-shadow .2s ease; }
body:not(.site) .panel:hover { border-color: rgba(47, 107, 255, .24); box-shadow: 0 16px 36px -32px rgba(47, 107, 255, .4); }
body:not(.site) main table tbody tr { transition: background .18s ease; }
body:not(.site) main table tbody tr:hover { background: rgba(47, 107, 255, .035); }

/* 待审队列批量操作条 */
.bulkbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.bulkbar .checkrow { margin: 0; }
.bulkbar input[type=text] { flex: 1 1 240px; min-width: 180px; margin: 0; }
.bulkbar button { margin: 0; }
.bulkbar .hint { margin-left: auto; }

/* 登录页滑动验证 */
.slider-captcha { width: 100%; max-width: 320px; }
.slider-stage {
  position: relative; width: 100%; max-width: 320px; aspect-ratio: 2 / 1;
  overflow: hidden; border: 1px solid var(--line); border-radius: 10px;
  background: #0b1424; cursor: default;
}
.slider-stage #sliderBg {
  display: block; width: 100%; height: 100%; object-fit: fill; user-select: none;
}
.slider-stage #sliderPiece {
  position: absolute; left: 0; top: 0; display: none; width: 48px; height: 48px;
  border-radius: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); z-index: 2;
  pointer-events: none; user-select: none;
}
.slider-tip {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  background: rgba(7, 13, 24, .58); color: #dbe7ff; font-size: .76rem;
  letter-spacing: .04em; pointer-events: none;
}
.slider-tip[hidden] { display: none; }
.slider-controls {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; max-width: 320px;
}
.slider-controls input[type=range] {
  flex: 1; margin: 0; accent-color: var(--accent); cursor: pointer;
}
.slider-controls .linkbtn { margin: 0; flex: none; }
.slider-error { margin: 8px 0 0; font-size: .78rem; }

.captcha-dialog {
  display: block; position: fixed; inset: 0; margin: auto;
  width: min(84vw, 330px); min-width: 0; min-height: 0; height: fit-content;
  max-height: 90vh; padding: 16px 16px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink);
  box-shadow: 0 24px 70px -28px rgba(8, 18, 40, .55), 0 0 0 1px rgba(255, 255, 255, .4) inset;
  overflow: auto;
}
.captcha-dialog::backdrop {
  background: rgba(5, 9, 18, .58);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.captcha-dialog[open] { animation: dialogIn .22s cubic-bezier(.16, 1, .3, 1) both; }
.captcha-dialog-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-bottom: 4px;
}
.captcha-dialog-head h2 { margin: 3px 0 0; font-size: 1rem; letter-spacing: -.02em; }
.captcha-dialog-head .eyebrow { margin: 0; color: var(--accent); font-size: .58rem; }
.captcha-dialog-head .linkbtn { flex: none; font-size: .9rem; line-height: 1; padding: 3px 5px; }
.captcha-dialog .sub { font-size: .76rem; margin: 0 0 10px; line-height: 1.55; }
.captcha-dialog .slider-captcha { max-width: 298px; margin: 0 auto; }
.captcha-dialog .slider-stage { max-width: 298px; border-radius: 8px; }
.captcha-dialog .slider-controls { max-width: 298px; margin-top: 8px; }
.dialog-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.dialog-actions .hint { margin-right: auto; font-size: .74rem; color: var(--muted); }
.dialog-actions .primary { margin: 0; height: 38px; padding: 0 16px; font-size: .84rem; }
.dialog-actions .linkbtn { margin: 0; font-size: .8rem; }

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.hp {
  position: absolute !important; left: -10000px !important; top: auto !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important;
  opacity: 0 !important; pointer-events: none !important;
}

/* ---- 动画 ---- */
@keyframes fxHeadIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes fxGrid {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(42px, 42px, 0); }
}
@keyframes fxScan {
  0% { top: 6%; opacity: 0; }
  12% { opacity: .55; }
  60% { top: 94%; opacity: .25; }
  100% { top: 6%; opacity: 0; }
}
@keyframes fxFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---- 响应式 ---- */
@media (max-width: 760px) {
  body.site .pagehead { padding: 22px 18px 20px; margin-bottom: 20px; border-radius: 15px; }
  body.site .pagehead h1 { font-size: clamp(1.75rem, 8vw, 2.45rem); }
  body.site .pagehead .statstrip { display: grid; grid-template-columns: 1fr 1fr; }
  body.site .pagehead .stat { border-right: 0; border-bottom: 1px solid rgba(151, 180, 255, .14); }
  body.site .pagehead .stat:nth-last-child(-n+2) { border-bottom: 0; }
  body.site .pagehead .stat:nth-child(odd) { border-right: 1px solid rgba(151, 180, 255, .14); }
  body.site .pagehead .searchbox { flex-wrap: wrap; }
  body.site .pagehead .searchbox input[type=search] { flex: 1 1 100%; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.site .pagehead,
  body.site .pagehead::before,
  body.site .pagehead::after,
  body.site .empty-ic { animation: none !important; }
  body.site .panel, body.site .tablewrap, body.site .gallery figure, body.site .btn { transition: none !important; }
}
