/* ═══════════════════════════════════════════════════
   beifeng.cloud — 视觉层
   设计基调：深夜深空 + 单向流光 + 玻璃薄片
   ═══════════════════════════════════════════════════ */

/* ─── 设计令牌 ─── */
:root {
  /* 品牌色：雾蓝 · 天青 · 沙金 */
  --brand:        #7EBFDD;
  --brand-2:      #5E9FC0;
  --brand-3:      #A9D9EC;
  --brand-warm:   #E3B78C;

  /* 深色（默认） */
  --bg:           #070c12;
  --bg-soft:      #0b1219;
  --surface:      rgba(255, 255, 255, 0.045);
  --surface-2:    rgba(255, 255, 255, 0.075);
  --surface-solid: #101a24;
  --line:         rgba(255, 255, 255, 0.09);
  --line-strong:  rgba(255, 255, 255, 0.18);
  --text:         #eef4f8;
  --text-soft:    #a7b7c4;
  --text-dim:     #6b7d8c;
  --shadow:       0 24px 60px -20px rgba(0, 10, 16, 0.85);
  --shadow-sm:    0 8px 24px -12px rgba(0, 10, 16, 0.8);
  --sheen:        rgba(255, 255, 255, 0.55);
  --grid-line:    rgba(255, 255, 255, 0.05);

  /* 版式 */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI",
               system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, ui-monospace, monospace;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --maxw: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 浅色 */
:root[data-theme="light"],
html.light-mode {
  --brand:        #3f8fb8;
  --bg:           #f2f8fb;
  --bg-soft:      #e6f0f6;
  --surface:      rgba(255, 255, 255, 0.72);
  --surface-2:    rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --line:         rgba(12, 26, 36, 0.09);
  --line-strong:  rgba(12, 26, 36, 0.18);
  --text:         #0c1a24;
  --text-soft:    #47606f;
  --text-dim:     #8aa0ae;
  --shadow:       0 24px 60px -24px rgba(20, 60, 80, 0.22);
  --shadow-sm:    0 10px 26px -14px rgba(20, 60, 80, 0.25);
  --sheen:        rgba(255, 255, 255, 0.9);
  --grid-line:    rgba(20, 60, 80, 0.04);
}

/* ─── 基础重置 ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.45s var(--ease-soft), color 0.45s var(--ease-soft);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, dt { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

svg {
  width: 1em; height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 2px solid var(--brand-3);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: color-mix(in srgb, var(--brand) 42%, transparent); color: #fff; }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  padding: 12px 20px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ═══════════════ 环境光 ═══════════════ */
.ambient {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
:root[data-theme="light"] .orb { opacity: 0.4; }

.orb--a {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  top: -14vw; left: -10vw;
  background: radial-gradient(circle at 40% 40%, var(--brand) 0%, transparent 68%);
  animation: drift-a 26s var(--ease-soft) infinite alternate;
}
.orb--b {
  width: 40vw; height: 40vw; min-width: 320px; min-height: 320px;
  top: 22vh; right: -12vw;
  background: radial-gradient(circle at 60% 50%, var(--brand-2) 0%, transparent 68%);
  animation: drift-b 32s var(--ease-soft) infinite alternate;
}
.orb--c {
  width: 34vw; height: 34vw; min-width: 280px; min-height: 280px;
  bottom: -8vw; left: 32vw;
  background: radial-gradient(circle at 50% 50%, var(--brand-3) 0%, transparent 70%);
  opacity: 0.3;
  animation: drift-c 38s var(--ease-soft) infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(-7vw, 8vh, 0) scale(0.94); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-5vw, -6vh, 0) scale(1.16); }
}

/* 极细网格，给深空一点结构感 */
.grid-veil {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 78%);
}

/* 颗粒，压掉渐变的塑料感 */
.grain {
  position: absolute; inset: -50%;
  opacity: 0.16;
  display: none;
  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='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: grain-shift 8s steps(6) infinite;
}
@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, -1%); }
  80% { transform: translate(2%, 1%); }
}

/* ═══════════════ 滚动进度 ═══════════════ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 90;
  background: transparent;
}
.scroll-progress span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand-3), var(--brand), var(--brand-warm));
  box-shadow: 0 0 14px color-mix(in srgb, var(--brand) 70%, transparent);
  transition: width 0.1s linear;
}

/* ═══════════════ 顶栏 ═══════════════ */
.topbar {
  position: sticky; top: 0; z-index: 80;
  padding: 14px 24px;
  transition: padding 0.35s var(--ease), background-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 14px 10px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.4s var(--ease);
}

/* 滚过首屏后，顶栏收成一颗悬浮胶囊 */
.topbar.is-stuck { padding-top: 8px; padding-bottom: 8px; }
.topbar.is-stuck .topbar__inner {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-color: var(--line);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--shadow-sm);
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.brand__ava { position: relative; display: grid; place-items: center; }
.brand__ava img {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  transition: transform 0.5s var(--ease);
}
.brand__ring {
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--brand-3), var(--brand), var(--brand-2), var(--brand-3));
  opacity: 0; transition: opacity 0.4s var(--ease);
  mask: radial-gradient(circle, transparent 62%, #000 64%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%);
  animation: spin 6s linear infinite;
}
.brand:hover .brand__ring { opacity: 1; }
.brand:hover .brand__ava img { transform: scale(1.06) rotate(-2deg); }
@keyframes spin { to { transform: rotate(360deg); } }

.brand__txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand__txt strong {
  font-size: 1.02rem; font-weight: 650; letter-spacing: -0.01em;
}
.brand__txt .dot { color: var(--brand); }
.brand__txt small { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.02em; }

.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  position: relative;
  padding: 9px 15px; border-radius: 999px;
  font-size: 0.9rem; color: var(--text-soft);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.topnav a::after {
  content: ""; position: absolute; left: 50%; bottom: 5px;
  width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3));
  transform: translateX(-50%);
  transition: width 0.32s var(--ease);
}
.topnav a:hover { color: var(--text); background: var(--surface); }
.topnav a:hover::after { width: 18px; }

.topbar__tools { display: flex; gap: 6px; flex-shrink: 0; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text-soft);
  border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
  transform: translateY(-1px);
}

/* 主题按钮里的日月切换 */
#themeBtn .i-sun { display: none; }
:root[data-theme="light"] #themeBtn .i-sun,
html.light-mode #themeBtn .i-sun { display: block; }
:root[data-theme="light"] #themeBtn .i-moon,
html.light-mode #themeBtn .i-moon { display: none; }

/* ═══════════════ 主视觉 ═══════════════ */
main { position: relative; z-index: 1; }

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 84px 24px 100px;
  text-align: left;
}

.hero__status {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 34px;
}

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 0.8rem; color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s var(--ease);
}
.pill:hover { border-color: var(--line-strong); color: var(--text); }
.pill__ico { width: 14px; height: 14px; opacity: 0.8; }

.pill--live { color: var(--text); }
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse-ring 2.4s var(--ease-soft) infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero__line { display: block; }

/* 第二行：渐变文字 + 光带扫过 */
.hero__line--accent {
  background: linear-gradient(100deg, var(--brand-3) 0%, var(--brand) 38%, var(--brand-2) 68%, var(--brand-warm) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen-slide 9s var(--ease-soft) infinite;
}
@keyframes sheen-slide {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero__lead {
  max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: var(--text-soft);
  margin-bottom: 40px;
  text-wrap: pretty;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 72px; }

/* ─── 按钮 ─── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 600;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn svg { width: 17px; height: 17px; transition: transform 0.35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
  color: #fff;
  background: linear-gradient(120deg, var(--brand-2), var(--brand) 52%, var(--brand-3));
  background-size: 180% 100%;
  box-shadow:
    0 12px 34px -14px color-mix(in srgb, var(--brand) 90%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-position 0.6s var(--ease);
}
.btn--primary:hover {
  background-position: 100% 50%;
  box-shadow:
    0 18px 44px -14px color-mix(in srgb, var(--brand) 90%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
/* 掠过按钮的高光 */
.btn--primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.42) 50%, transparent 65%);
  transform: translateX(-130%);
  transition: transform 0.75s var(--ease);
}
.btn--primary:hover::after { transform: translateX(130%); }

.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn--ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  background: var(--surface-2);
  box-shadow: 0 12px 30px -18px color-mix(in srgb, var(--brand) 80%, transparent);
}

/* ─── 数据条 ─── */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.stat {
  padding: 22px 24px;
  background: color-mix(in srgb, var(--bg-soft) 82%, transparent);
  transition: background-color 0.3s var(--ease);
}
.stat:hover { background: var(--surface-2); }
.stat dt {
  font-size: 0.76rem; color: var(--text-dim);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 6px;
}
.stat dd {
  font-family: var(--font-mono);
  font-size: 1.5rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.num--date .sep { color: var(--brand); margin: 0 1px; }

/* ═══════════════ 区块通用 ═══════════════ */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 96px;
}

.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  margin-bottom: 34px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-3);
  margin-bottom: 8px;
}
:root[data-theme="light"] .eyebrow { color: color-mix(in srgb, var(--brand) 80%, #000 20%); }

.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 680;
  letter-spacing: -0.025em;
}
.section__note {
  font-size: 0.88rem; color: var(--text-dim);
  max-width: 34ch; text-align: right;
}

/* ═══════════════ 卡片矩阵（Bento） ═══════════════ */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 210px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  isolation: isolate;
  transform-style: preserve-3d;
  transition:
    transform 0.45s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.45s var(--ease),
    background-color 0.35s var(--ease);
  will-change: transform;
}

.card--feature { grid-column: span 2; grid-row: span 2; min-height: 300px; padding: 32px; }
.card--compact { min-height: 150px; }

.card:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow:
    var(--shadow),
    0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent),
    0 0 60px -22px color-mix(in srgb, var(--brand) 85%, transparent);
  background: var(--surface-2);
}

/* 鼠标跟随的柔光 */
.card__glow {
  position: absolute; inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--brand) 30%, transparent),
    transparent 62%
  );
  transition: opacity 0.4s var(--ease);
}
.card:hover .card__glow { opacity: 1; }

/* 卡片边缘流光：用 conic 渐变描边 */
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    color-mix(in srgb, var(--brand-3) 70%, transparent) 40deg,
    color-mix(in srgb, var(--brand) 80%, transparent) 70deg,
    transparent 130deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.card:hover::before {
  opacity: 1;
  animation: border-spin 3.2s linear infinite;
}
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes border-spin { to { --angle: 360deg; } }

.card__top { display: flex; gap: 8px; margin-bottom: auto; }

.chip {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.chip--blue   { background: color-mix(in srgb, var(--brand) 22%, transparent); color: color-mix(in srgb, var(--brand) 40%, #fff 60%); }
.chip--violet { background: color-mix(in srgb, var(--brand-2) 22%, transparent); color: color-mix(in srgb, var(--brand-2) 35%, #fff 65%); }
.chip--mint   { background: color-mix(in srgb, var(--brand-3) 20%, transparent); color: color-mix(in srgb, var(--brand-3) 45%, #fff 55%); }
.chip--amber  { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.chip--rose   { background: rgba(244, 114, 182, 0.18); color: #f9a8d4; }
.chip--ghost  { background: var(--surface-2); color: var(--text-dim); }

:root[data-theme="light"] .chip--blue   { color: #3451d1; }
:root[data-theme="light"] .chip--violet { color: #6d28d9; }
:root[data-theme="light"] .chip--mint   { color: #0e7490; }
:root[data-theme="light"] .chip--amber  { color: #b45309; }
:root[data-theme="light"] .chip--rose   { color: #be185d; }

.card__body { margin-top: 26px; }
.card__body h3 {
  font-size: 1.22rem; font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 7px;
  transition: color 0.3s var(--ease);
}
.card--feature .card__body h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.card__body p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.62;
  text-wrap: pretty;
}
.card--feature .card__body p { font-size: 0.98rem; max-width: 34ch; }

.card__foot { margin-top: 20px; }
.go {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.84rem; font-weight: 600;
  color: var(--text-dim);
  transition: color 0.3s var(--ease), gap 0.3s var(--ease);
}
.go svg { width: 15px; height: 15px; }
.card:hover .go { color: var(--brand-3); gap: 10px; }
:root[data-theme="light"] .card:hover .go { color: var(--brand); }

/* 头条卡片的装饰网格 */
.card__grid-deco {
  position: absolute; right: -30%; bottom: -40%;
  width: 90%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg,
      color-mix(in srgb, var(--brand) 16%, transparent) 0deg 1deg,
      transparent 1deg 12deg);
  mask: radial-gradient(circle, #000 8%, transparent 68%);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 68%);
  opacity: 0.7;
  transition: transform 0.8s var(--ease), opacity 0.5s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.card--feature:hover .card__grid-deco { transform: rotate(18deg) scale(1.08); opacity: 1; }

/* ═══════════════ MC 链接列表 ═══════════════ */
.links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 10px;
}

.link {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  transition: all 0.32s var(--ease);
  overflow: hidden;
}
/* 左侧渐亮竖条 */
.link::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 2px; height: 0;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-3), var(--brand));
  transform: translateY(-50%);
  transition: height 0.32s var(--ease);
}
.link:hover {
  transform: translateX(4px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}
.link:hover::before { height: 55%; }

.link__ico {
  flex-shrink: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 1.1rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease);
}
.link:hover .link__ico { transform: scale(1.08) rotate(-4deg); }

.link__txt { display: flex; flex-direction: column; min-width: 0; }
.link__txt strong { font-size: 0.93rem; font-weight: 600; }
.link__txt small { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.link__arr {
  width: 16px; height: 16px;
  margin-left: auto; flex-shrink: 0;
  color: var(--text-dim);
  opacity: 0.35;
  transition: all 0.32s var(--ease);
}
.link:hover .link__arr { opacity: 1; color: var(--brand-3); transform: translate(3px, -3px); }
:root[data-theme="light"] .link:hover .link__arr { color: var(--brand); }

/* ═══════════════ 工具磁贴 ═══════════════ */
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.tool {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 17px;
  border-radius: var(--r-sm);
  font-size: 0.87rem;
  color: var(--text-soft);
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  transition: all 0.28s var(--ease);
}
.tool span { font-size: 1rem; transition: transform 0.3s var(--ease); }
.tool:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.tool:hover span { transform: scale(1.18) rotate(6deg); }

/* ═══════════════ CTA ═══════════════ */
.cta {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 30px;
  padding: 48px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 55%),
    radial-gradient(100% 140% at 0% 100%, color-mix(in srgb, var(--brand-3) 16%, transparent), transparent 55%),
    var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cta__body { position: relative; z-index: 2; }
.cta h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.cta p {
  color: var(--text-soft);
  font-size: 0.93rem;
  max-width: 46ch;
  margin-bottom: 26px;
  text-wrap: pretty;
}
.cta__actions { display: flex; flex-wrap: wrap; gap: 11px; }

.cta__art { position: relative; height: 220px; }
.ring {
  position: absolute; top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, transparent);
  transform: translate(-50%, -50%);
  animation: ring-pulse 5s var(--ease-soft) infinite;
}
.ring--1 { width: 120px; height: 120px; animation-delay: 0s; }
.ring--2 { width: 180px; height: 180px; animation-delay: 1.1s; }
.ring--3 { width: 240px; height: 240px; animation-delay: 2.2s; }
@keyframes ring-pulse {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(0.9); }
  70%  { opacity: 0;   transform: translate(-50%, -50%) scale(1.16); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.16); }
}

/* ═══════════════ 页脚 ═══════════════ */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px 42px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  gap: 22px; flex-wrap: wrap;
}
.footer__copy { font-size: 0.82rem; color: var(--text-dim); letter-spacing: 0.02em; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); opacity: 0.9; }
.footer__brand div { display: flex; flex-direction: column; }
.footer__brand strong { font-size: 0.82rem; font-weight: 600; }
.footer__brand small { font-size: 0.74rem; color: var(--text-dim); }

.footer__nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer__nav a {
  font-size: 0.85rem; color: var(--text-soft);
  position: relative;
  transition: color 0.25s var(--ease);
}
.footer__nav a::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--brand-3);
  transition: width 0.3s var(--ease);
}
.footer__nav a:hover { color: var(--text); }
.footer__nav a:hover::after { width: 100%; }

.footer__meta { font-size: 0.78rem; color: var(--text-dim); }

/* ═══════════════ 悬浮联系 ═══════════════ */
.contact-float {
  position: fixed; right: 22px; bottom: 24px; z-index: 70;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.87rem; font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--ease);
}
.contact-float svg { width: 17px; height: 17px; color: var(--brand); }
.contact-float:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: color-mix(in srgb, var(--brand) 50%, transparent);
  box-shadow:
    0 16px 34px -16px color-mix(in srgb, var(--brand) 90%, transparent),
    var(--shadow-sm);
}
.contact-float:hover svg { color: var(--brand-3); }

/* ═══════════════ 搜索浮层 ═══════════════ */
.modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: start center;
  padding-top: min(16vh, 140px);
}
.modal[hidden] { display: none; }

.modal__scrim {
  position: absolute; inset: 0;
  background: rgba(4, 5, 10, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.25s var(--ease-soft);
}
:root[data-theme="light"] .modal__scrim { background: rgba(230, 233, 245, 0.62); }

.modal__panel {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: modal-in 0.32s var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.search__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.search__bar > svg { width: 19px; height: 19px; color: var(--text-dim); flex-shrink: 0; }
.search__bar input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  font-size: 1rem; color: var(--text);
  font-family: inherit;
}
.search__bar input::placeholder { color: var(--text-dim); }
.search__bar input::-webkit-search-cancel-button { display: none; }
.search__bar kbd {
  font-family: var(--font-mono);
  font-size: 0.66rem; color: var(--text-dim);
  padding: 3px 7px; border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.search__results {
  max-height: 46vh;
  overflow-y: auto;
  padding: 8px;
}
.search__results:empty::after {
  content: "输入关键词开始搜索";
  display: block;
  padding: 26px 16px 32px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.result {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 0.18s var(--ease-soft);
}
.result.is-active, .result:hover { background: var(--surface-2); }
.result__ico {
  width: 32px; height: 32px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.result__txt { display: flex; flex-direction: column; min-width: 0; }
.result__txt strong { font-size: 0.9rem; font-weight: 600; }
.result__txt small { font-size: 0.76rem; color: var(--text-dim); }
.result__tag {
  margin-left: auto; flex-shrink: 0;
  font-size: 0.68rem; color: var(--text-dim);
  padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.search__hint {
  display: flex; gap: 18px;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ═══════════════ 滚动入场动画 ═══════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ═══════════════ 响应式 ═══════════════ */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card--feature { grid-column: span 2; grid-row: span 1; min-height: 260px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .cta { grid-template-columns: 1fr; padding: 38px 30px; }
  .cta__art { display: none; }
  .topnav { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .topbar { padding: 10px 14px; }
  .brand__txt small { display: none; }
  .hero { padding: 56px 18px 72px; }
  .hero__lead { margin-bottom: 32px; }
  .hero__actions { margin-bottom: 54px; }
  .hero__actions .btn { flex: 1; justify-content: center; }
  .section { padding: 0 18px 68px; }
  .bento { grid-template-columns: 1fr; gap: 12px; }
  .card--feature { grid-column: span 1; padding: 24px; }
  .card { min-height: 0; padding: 20px; }
  .card__body { margin-top: 20px; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .section__note { text-align: left; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 16px 18px; }
  .stat dd { font-size: 1.25rem; }
  .footer__inner { flex-direction: column; align-items: center; gap: 16px; padding: 28px 18px 34px; }
  .contact-float span { display: none; }
  .contact-float { padding: 14px; }
  .modal { padding-top: 10vh; }
}

/* ═══════════════ 无障碍 / 性能降级 ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

html.reduced-motion .orb,
html.reduced-motion .grain { animation: none; }

/* 低端设备：关掉重滤镜 */
@media (max-width: 620px) {
  .orb { filter: blur(60px); }
  .grain { display: none; }
}

@media print {
  .ambient, .topbar, .contact-float, .modal, .scroll-progress { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ═══════════════════════════════════════════════════
   子页面通用（关于 / 联系 / 游戏 / 工具 / 留言板 等）
   ═══════════════════════════════════════════════════ */

/* 子页页头：紧凑，克制留白 */
.page-hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 46px 24px 30px;
  display: flex;
  flex-direction: column;
}
.page-hero__title {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1.3;
  margin-bottom: 10px;
}
.page-hero__title .accent { color: var(--brand-3); }
:root[data-theme="light"] .page-hero__title .accent,
html.light-mode .page-hero__title .accent { color: var(--brand); }
.page-hero__lead {
  max-width: 58ch;
  font-size: 0.98rem;
  color: var(--text-soft);
  margin-bottom: 16px;
  text-wrap: pretty;
}

/* 返回链接：置顶 + 醒目色胶囊 */
.back-link {
  order: -1;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 22px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--brand-3);
  background: color-mix(in srgb, var(--brand) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 34%, transparent);
  transition: all 0.25s var(--ease);
}
.back-link svg { width: 15px; height: 15px; }
.back-link:hover {
  color: #fff;
  background: color-mix(in srgb, var(--brand) 32%, transparent);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  transform: translateX(-2px);
}
:root[data-theme="light"] .back-link,
html.light-mode .back-link { color: var(--brand); }

/* 通用内容面板 */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.panel--center { max-width: 560px; margin: 0 auto; text-align: center; }
.panel--narrow { max-width: 880px; }
.panel__title { font-size: 1.25rem; font-weight: 650; margin-bottom: 14px; }
.panel p { color: var(--text-soft); line-height: 1.85; }
.panel p + p { margin-top: 10px; }
.panel strong { color: var(--text); font-weight: 600; }
.panel canvas { width: 100%; border-radius: var(--r-sm); background: #000; display: block; }

/* 游戏卡片网格 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.game-card {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 188px;
  padding: 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-solid) 48%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
  transition:
    transform 0.35s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease),
    background-color 0.3s var(--ease);
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.game-card__ico {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.game-card h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: 0.01em; margin-bottom: 6px; }
.game-card p { color: var(--text-soft); font-size: 0.88rem; line-height: 1.6; text-wrap: pretty; }
.game-card .go { margin-top: auto; padding-top: 14px; }

/* 表单控件 */
.field { margin-bottom: 14px; }
.field__label {
  display: block; font-size: 0.82rem; color: var(--text-soft);
  margin-bottom: 7px; letter-spacing: 0.02em;
}
.input, .textarea, .select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 12px 14px;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 70%, transparent);
  background: var(--surface-2);
}
.textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.select { cursor: pointer; appearance: none; }

.btn--block { width: 100%; justify-content: center; }
.btn--sm { padding: 10px 18px; font-size: 0.86rem; }

/* 按钮色变体（工具/后台的危险、成功、警告） */
.btn--danger  { color: #ff7875; border: 1px solid rgba(255,77,79,0.4);  background: rgba(255,77,79,0.12); }
.btn--danger:hover  { background: rgba(255,77,79,0.22); border-color: #ff4d4f; }
.btn--success { color: #52c41a; border: 1px solid rgba(40,167,69,0.4);  background: rgba(40,167,69,0.12); }
.btn--success:hover { background: rgba(40,167,69,0.22); border-color: #28a745; }
.btn--warning { color: #ffd666; border: 1px solid rgba(255,193,7,0.4);  background: rgba(255,193,7,0.12); }
.btn--warning:hover { background: rgba(255,193,7,0.22); border-color: #ffc107; }

/* 横向控件行 */
.ctrl-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ctrl-row .input, .ctrl-row .select { width: auto; flex: 1; min-width: 0; }

/* 更新日志 */
.log-list { display: flex; flex-direction: column; gap: 16px; }
.log-item {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 22px 26px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.log-item:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  transform: translateY(-2px);
}
.log-date {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-dim);
  margin-bottom: 8px; letter-spacing: 0.04em;
}
.log-title { font-size: 1.08rem; font-weight: 650; margin-bottom: 10px; color: var(--text); }
.log-content ul { padding-left: 18px; }
.log-content li {
  position: relative; padding-left: 4px; margin: 7px 0;
  color: var(--text-soft); line-height: 1.7;
}
.log-content li::before {
  content: ""; position: absolute; left: -14px; top: 0.62em;
  width: 5px; height: 5px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-3), var(--brand));
}

/* 评论区 */
.comment-form {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 22px; margin-bottom: 24px;
}
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 18px 20px;
}
.comment-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.comment-user { font-weight: 600; color: var(--text); }
.comment-user.is-admin { color: #f5b942; }      /* Admin：金色 */
.comment-user.is-beifeng { color: var(--brand); } /* beifeng：站点雾蓝 */
.comment-time { font-size: 0.78rem; color: var(--text-dim); }
.comment-content { margin-top: 8px; color: var(--text-soft); line-height: 1.7; word-break: break-word; }
.reply-wrap { margin-top: 14px; margin-left: 16px; border-left: 2px solid var(--line-strong); padding-left: 16px; }
.reply-block { padding: 8px 0; }
.reply-block + .reply-block { border-top: 1px dashed var(--line); }

/* 设备 / 状态面板 */
.device-card { margin-bottom: 18px; }
.device-card h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: 14px; }
.status-text { font-size: 0.85rem; color: var(--text-dim); min-height: 20px; margin-top: 8px; }
.meter-wrap { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.meter-bar { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.meter-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
  transition: width 0.1s linear;
}
.meter-label { min-width: 40px; text-align: right; font-size: 0.85rem; color: var(--text-dim); }
.tip { font-size: 0.8rem; color: var(--text-dim); margin-top: 8px; }

/* 玩家列表 */
.player-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.player-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 0.85rem;
}
.player-avatar { width: 22px; height: 22px; border-radius: 4px; }

/* 状态信息行 */
.info-line { margin: 10px 0; color: var(--text-soft); font-size: 0.92rem; }
.info-line strong { color: var(--text); font-weight: 600; margin-left: 4px; }
.status-img { width: 100%; border-radius: var(--r-sm); margin-bottom: 16px; }

/* 管理员后台 */
.login-panel { max-width: 440px; margin: 24px auto 0; }
.msg-note { margin-top: 12px; font-size: 0.85rem; color: var(--text-dim); }
.admin-item { margin-bottom: 12px; }
.admin-item .nick { font-weight: 600; color: var(--brand); }
.admin-item .time { font-size: 0.78rem; color: var(--text-dim); margin-left: 10px; }
.admin-item .meta { font-size: 0.72rem; color: var(--text-dim); }
.admin-item .content { margin: 8px 0; color: var(--text-soft); line-height: 1.7; }

/* 2048 棋盘（固定配色，明暗通用） */
.board-2048 { max-width: 360px; margin: 0 auto; background: #bbada0; padding: 12px; border-radius: 10px; }
.board-2048 .row { display: flex; gap: 10px; margin-bottom: 10px; }
.board-2048 .row:last-child { margin-bottom: 0; }
.board-2048 .cell {
  width: calc(25% - 8px); padding-bottom: calc(25% - 8px);
  background: #cdc1b4; border-radius: 6px; position: relative;
}
.board-2048 .cell span {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  font-weight: bold; font-size: 22px; color: #776e65;
}

/* 子页响应式 */
@media (max-width: 620px) {
  .page-hero { padding: 44px 18px 28px; }
  .panel { padding: 20px; }
  .log-item { padding: 18px; }
  .comment-form { padding: 18px; }
  .comment-item { padding: 15px 16px; }
}

/* ═══════════════════════════════════════════════════
   液态玻璃（Liquid Glass）
   半透明玻璃 + 顶部高光 + 柔光边缘 + 深度阴影
   ═══════════════════════════════════════════════════ */

:root {
  --glass: linear-gradient(140deg,
      rgba(255,255,255,0.17) 0%,
      rgba(255,255,255,0.05) 36%,
      rgba(255,255,255,0.02) 64%,
      rgba(255,255,255,0.10) 100%);
  --glass-hover: linear-gradient(140deg,
      rgba(255,255,255,0.26) 0%,
      rgba(255,255,255,0.10) 36%,
      rgba(255,255,255,0.06) 64%,
      rgba(255,255,255,0.16) 100%);
  --glass-line: rgba(255,255,255,0.18);
  --glass-line-hi: rgba(255,255,255,0.36);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,0.5),
                inset 0 -1px 0 rgba(0,0,0,0.22);
  --glass-drop: 0 24px 60px -26px rgba(0,0,0,0.8),
                0 6px 18px -8px rgba(0,0,0,0.45);
  --glass-blur: blur(28px) saturate(190%);
}
:root[data-theme="light"],
html.light-mode {
  --glass: linear-gradient(140deg,
      rgba(255,255,255,0.92) 0%,
      rgba(255,255,255,0.62) 36%,
      rgba(255,255,255,0.50) 64%,
      rgba(255,255,255,0.82) 100%);
  --glass-hover: linear-gradient(140deg,
      rgba(255,255,255,0.99) 0%,
      rgba(255,255,255,0.78) 36%,
      rgba(255,255,255,0.70) 64%,
      rgba(255,255,255,0.92) 100%);
  --glass-line: rgba(255,255,255,0.95);
  --glass-line-hi: #ffffff;
  --glass-edge: inset 0 1px 0 rgba(255,255,255,1),
                inset 0 -1px 0 rgba(20,30,60,0.06);
  --glass-drop: 0 24px 60px -28px rgba(30,40,90,0.35),
                0 6px 18px -8px rgba(30,40,90,0.20);
}

/* 玻璃面板 / 卡片 */
.card,
.game-card,
.link,
.tool,
.panel,
.log-item,
.comment-item,
.comment-form {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-edge), var(--glass-drop);
}

.card:hover,
.game-card:hover,
.link:hover,
.tool:hover,
.log-item:hover {
  background: var(--glass-hover);
  border-color: var(--glass-line-hi);
}

/* 卡片上掠过的镜面高光 */
.card::after,
.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg,
      transparent 28%,
      rgba(255,255,255,0.16) 47%,
      transparent 66%);
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.card:hover::after,
.game-card:hover::after { opacity: 1; }

/* 顶栏悬浮胶囊 */
.topbar.is-stuck .topbar__inner {
  background: var(--glass);
  border-color: var(--glass-line);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--glass-drop);
}

/* 悬浮联系按钮 / 幽灵按钮 / 图标按钮 */
.contact-float,
.btn--ghost,
.icon-btn:hover {
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-edge), var(--glass-drop);
}
.contact-float:hover,
.btn--ghost:hover,
.icon-btn:hover {
  background: var(--glass-hover);
  border-color: var(--glass-line-hi);
}

/* 输入控件：内凹玻璃 */
.input,
.textarea,
.select {
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05),
              inset 0 -1px 0 rgba(0,0,0,0.12);
}
:root[data-theme="light"] .input,
html.light-mode .input,
:root[data-theme="light"] .textarea,
html.light-mode .textarea,
:root[data-theme="light"] .select,
html.light-mode .select {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6),
              inset 0 -1px 0 rgba(20,30,60,0.04);
}

/* 搜索浮层 */
.modal__panel {
  background: var(--glass);
  border-color: var(--glass-line);
  box-shadow: var(--glass-edge), 0 40px 90px -30px rgba(0,0,0,0.7);
}

/* 页脚玻璃 */
.footer {
  background: color-mix(in srgb, var(--bg-soft) 42%, transparent);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border-top: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

/* 背景略微提亮，让玻璃有可折射的光 */
.orb { display: none; }
:root[data-theme="light"] .orb { display: none; }
.ambient::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  display: none;
  background: radial-gradient(60% 40% at 72% 8%,
      color-mix(in srgb, var(--brand-2) 12%, transparent), transparent 70%);
}

/* ═══════════════ 评论互动（点赞 / 回复） ═══════════════ */
.comment-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.like-btn, .reply-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.8rem; color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.like-btn:hover, .reply-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.like-btn:disabled { opacity: 0.6; cursor: default; }
.like-btn .like-ico { font-size: 0.9rem; transition: transform 0.25s var(--ease); }
.like-btn:hover .like-ico { transform: scale(1.15); }
.like-btn.is-liked {
  color: #ff5c8a;
  border-color: rgba(255, 92, 138, 0.4);
  background: rgba(255, 92, 138, 0.12);
}
.like-btn.is-liked .like-ico { color: #ff5c8a; }
.reply-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  animation: fade-in 0.25s var(--ease-soft);
}

/* 24 小时点赞：已赞态 */
.like-btn .like-tip { font-size: 0.72rem; opacity: 0.85; }
.like-btn.is-liked:disabled { opacity: 1; cursor: default; }

/* Turnstile 说明小字 */
.turnstile-note {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-dim);
  opacity: 0.7;
  letter-spacing: 0.02em;
}

/* 点名回复 */
.reply-to { color: var(--brand-3); font-weight: 500; }
:root[data-theme="light"] .reply-to,
html.light-mode .reply-to { color: var(--brand); }
.reply-hint { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 10px; }

/* ═══════════════ 点击 logo 的土豆粒子彩蛋 ═══════════════ */
.potato-p {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 22px;
  line-height: 1;
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
  animation: potato-fly 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes potato-fly {
  from {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(var(--sc, 1)) rotate(var(--rot, 0deg));
    opacity: 0;
  }
}
.brand.is-pop { animation: logo-pop 0.4s var(--ease); }
@keyframes logo-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* ═══════════════ 彩蛋 ═══════════════ */
.brand__ava { position: relative; }
.ava-emoji {
  position: absolute;
  right: -8px; top: -8px;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

.egg-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.85rem;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}
.egg-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.egg-rain { animation-duration: 1600ms !important; }

/* 首页「最近更新」弹层 */
.hero__stats .stat { position: relative; }
.stat--clickable { cursor: pointer; }
.stat--clickable:hover .num { color: var(--brand-3); }
.update-pop {
  position: fixed;
  width: 300px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-solid) 96%, transparent);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  z-index: 60;
  display: none;
}
.update-pop.is-show { display: block; }
.update-pop__title { font-size: 0.8rem; color: var(--text-soft); margin-bottom: 8px; }
.update-pop ul { margin: 0 0 10px; padding: 0; list-style: none; }
.update-pop li { font-size: 0.82rem; color: var(--text-soft); padding: 5px 0; border-bottom: 1px dashed var(--line); }
.update-pop li:last-child { border-bottom: 0; }
.update-pop a { font-size: 0.8rem; color: var(--brand-3); }

/* 彩蛋清单页 */
.egg-list { list-style: none; margin: 0; padding: 0; }
.egg-list li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.egg-list li:last-child { border-bottom: 0; }
.egg-list strong { flex: 0 0 120px; color: var(--text); font-weight: 600; }
.egg-list span { color: var(--text-soft); font-size: 0.9rem; line-height: 1.6; }
@media (max-width: 620px) {
  .egg-list li { flex-direction: column; gap: 4px; }
  .egg-list strong { flex-basis: auto; }
}
