/* =========================================================
   宏哥专用导航 HonggeNav · 基础层（主题变量 / 重置 / 背景 / 通用组件）
   ========================================================= */
:root {
  --shell: 1440px;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22, .61, .24, 1);
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #07080b;
  --bg-2: #0a0c11;
  --panel: rgba(18, 21, 28, .62);
  --panel-solid: #12151c;
  --card: rgba(255, 255, 255, .045);
  --card-hover: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .16);
  --ink: #eef1f7;
  --ink-2: #c3cad8;
  --muted: #8d96a9;
  --dim: #616a7d;
  --accent: #7ee9ee;
  --accent-2: #9c8cff;
  --accent-3: #ff9ecb;
  --accent-ink: #06121a;
  --glow: rgba(126, 233, 238, .35);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .85);
  --grain-opacity: .05;
  --blob-opacity: .55;
  --glass: blur(22px) saturate(150%);
}

[data-theme="light"] {
  --bg: #f2f1ee;
  --bg-2: #e9e8e4;
  --panel: rgba(255, 255, 255, .72);
  --panel-solid: #ffffff;
  --card: rgba(255, 255, 255, .78);
  --card-hover: #ffffff;
  --line: rgba(20, 24, 34, .09);
  --line-strong: rgba(20, 24, 34, .18);
  --ink: #14171e;
  --ink-2: #3d4351;
  --muted: #6c7385;
  --dim: #8b92a1;
  --accent: #0f8f96;
  --accent-2: #5b4bd6;
  --accent-3: #cf4f95;
  --accent-ink: #ffffff;
  --glow: rgba(15, 143, 150, .25);
  --shadow: 0 24px 50px -30px rgba(30, 34, 45, .35);
  --grain-opacity: .025;
  --blob-opacity: .28;
  --glass: blur(20px) saturate(160%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3, p { margin: 0; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 渐变光晕背景 ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--bg-2) 92%, transparent), var(--bg) 60%),
    var(--bg);
}
.blob {
  position: absolute;
  border-radius: 50%;
  opacity: var(--blob-opacity);
}
.b1 {
  width: 46vw; height: 46vw; left: -12vw; top: -18vw;
  background: radial-gradient(circle at 40% 40%, #1b6cff, transparent 66%);
}
.b2 {
  width: 40vw; height: 40vw; right: -10vw; top: -12vw;
  background: radial-gradient(circle at 50% 50%, #17d8c8, transparent 64%);
}
.b3 {
  width: 38vw; height: 38vw; right: 8vw; bottom: -20vw;
  background: radial-gradient(circle at 50% 50%, #8b5cf6, transparent 66%);
}
.b4 {
  width: 30vw; height: 30vw; left: 14vw; bottom: -16vw;
  background: radial-gradient(circle at 50% 50%, #ff5fa2, transparent 68%);
}
.grain {
  position: absolute; inset: -20%;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 30%, transparent 45%, rgba(0,0,0,.55) 100%);
  pointer-events: none;
}
[data-theme="light"] .vignette { background: radial-gradient(120% 80% at 50% 30%, transparent 55%, rgba(40,44,55,.10) 100%); }


/* ---------- 通用布局 ---------- */
.shell {
  width: min(var(--shell), calc(100% - 64px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal .8s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes reveal {
  to { opacity: 1; transform: none; }
}

/* ---------- 玻璃卡片 ---------- */
.card, .panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(255,255,255,.062), rgba(255,255,255,.025) 55%, rgba(255,255,255,.012));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
}
[data-theme="light"] .card, [data-theme="light"] .panel {
  background: linear-gradient(165deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.9);
}

/* ---------- 按钮 / kbd / 标签 ---------- */
.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--ink-2);
  transition: .25s var(--ease);
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.icon-btn:hover { color: var(--ink); background: var(--card); border-color: var(--line); transform: translateY(-1px); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm svg { width: 16px; height: 16px; }

.kbd, kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font: 600 11px/1.5 var(--mono);
  text-align: center;
}

.tag, .chip, .ad-mark {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--muted);
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  white-space: nowrap;
}
.ad-mark { color: var(--accent-3); border-color: rgba(255,158,203,.28); background: rgba(255,158,203,.08); }
.ad-mark.soft { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,.04); }

/* ---------- 渐变文字 ---------- */
.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 52%, var(--accent-3) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- 滚动条 / 选择 ---------- */
::selection { background: rgba(126,233,238,.25); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 20px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track { background: transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(20,24,34,.18); background-clip: content-box; border: 3px solid transparent; }

input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.toast[hidden] { display: none; }
.toast.show { animation: toastIn .4s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- 空态 ---------- */
.empty {
  padding: 40px 0 46px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}

/* ---------- 品牌标识（前台 / 后台共用） ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  box-shadow: 0 0 24px -6px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.brand-text i {
  font-style: normal; font-size: 9.5px; letter-spacing: .24em;
  color: var(--dim); font-weight: 600;
}

/* ---------- 降低动态效果偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
