/* ============================================================
   屏界主题 - 全站样式（深色/浅色双主题 / 玻璃拟态 / 圆角卡片）
   ============================================================ */
:root {
  --bg: #0a0d18;
  --bg-soft: #10152a;
  --tint4: rgba(255, 255, 255, .025);
  --tint1: rgba(255, 255, 255, .05);
  --tint2: rgba(255, 255, 255, .07);
  --tint3: rgba(255, 255, 255, .16);
  --card: var(--tint1);
  --card-hover: var(--tint2);
  --border: rgba(255, 255, 255, .09);
  --text: #eef1fb;
  --muted: #8b93b0;
  --primary: #6c5cff;
  --primary-2: #b44cff;
  --accent: #ff5c8a;
  --grad: linear-gradient(135deg, #6c5cff, #b44cff 55%, #ff5c8a);
  --radius: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .35);
  --header-bg: rgba(10, 13, 24, .72);
  --pop-bg: rgba(22, 22, 34, .97);
  --cover-bg: #151a2e;
  --code-bg: rgba(0, 0, 0, .3);
  --ok: #5ddc9a;
  --warn: #ffd66b;
  --bad: #ff8095;
  --soft: #a99cff;
  --ink-2: #c6cbe0;
  --ink-3: #d5d9ec;
  --json-ink: #b8c0e0;
}

/* 白天模式：html[data-theme="light"] 覆盖全部颜色变量 */
[data-theme="light"] {
  --bg: #eef0f8;
  --bg-soft: #ffffff;
  --tint4: rgba(20, 26, 60, .03);
  --tint1: rgba(20, 26, 60, .05);
  --tint2: rgba(20, 26, 60, .08);
  --tint3: rgba(20, 26, 60, .16);
  --border: rgba(20, 26, 60, .13);
  --text: #23263a;
  --muted: #616a85;
  --shadow: 0 12px 32px rgba(40, 50, 110, .12);
  --header-bg: rgba(255, 255, 255, .78);
  --pop-bg: rgba(255, 255, 255, .98);
  --cover-bg: #dfe3f2;
  --code-bg: rgba(20, 26, 60, .06);
  --ok: #17925a;
  --warn: #9a6b00;
  --bad: #d23a56;
  --soft: #5648d6;
  --ink-2: #3a3f58;
  --ink-3: #333850;
  --json-ink: #3a3f58;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
/* ===== 深色主题：3 个巨型彩色 blob + 噪点 ===== */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background:
    /* 紫（右上）*/
    radial-gradient(55% 45% at 88% -8%, rgba(108, 92, 255, .55), transparent 60%),
    /* 粉（左下）*/
    radial-gradient(48% 42% at -5% 105%, rgba(255, 92, 138, .42), transparent 62%),
    /* 青（右下）*/
    radial-gradient(50% 40% at 105% 108%, rgba(0, 195, 217, .35), transparent 60%),
    /* 淡紫（中上）*/
    radial-gradient(40% 30% at 38% -6%, rgba(180, 76, 255, .35), transparent 60%),
    /* 基色 */
    var(--bg);
  filter: saturate(1.15);
  animation: blob-breath 18s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  /* SVG 噪点 — 毛玻璃的"玻璃感"来源 */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.10 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: overlay;
}
@keyframes blob-breath {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(-2%, 1%) scale(1.03); }
  100% { transform: translate(1%, -1%) scale(1.06); }
}

/* ===== 亮色主题：blob 更淡，噪点更柔和 ===== */
[data-theme="light"] body::before {
  background:
    radial-gradient(55% 45% at 88% -8%, rgba(108, 92, 255, .28), transparent 60%),
    radial-gradient(48% 42% at -5% 105%, rgba(255, 92, 138, .20), transparent 62%),
    radial-gradient(50% 40% at 105% 108%, rgba(0, 195, 217, .18), transparent 60%),
    radial-gradient(40% 30% at 38% -6%, rgba(180, 76, 255, .18), transparent 60%),
    var(--bg);
}
[data-theme="light"] body::after { opacity: 0.3; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-main { min-height: calc(100vh - 60px - 120px); padding-bottom: 60px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: .3px; }
.logo-icon { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; box-shadow: 0 4px 16px rgba(108, 92, 255, .4); transition: transform .25s; }
.logo:hover .logo-icon { transform: scale(1.06) rotate(-4deg); }
.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav > a, .nav-drop > a {
  position: relative; padding: 8px 14px; border-radius: 10px;
  color: var(--muted); font-weight: 500; font-size: 14px; transition: .2s;
}
.main-nav > a:hover, .nav-drop > a:hover {
  color: var(--text);
  background: var(--card-hover);
}
.main-nav > a.active { color: var(--soft); background: var(--tint1); }
.nav-drop { position: relative; }
.drop-menu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 160px;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
  box-shadow: 0 20px 48px rgba(0,0,0,.35);
}
.drop-right { left: auto; right: 0; }
.nav-drop:hover .drop-menu, .nav-drop.open .drop-menu { opacity: 1; visibility: visible; transform: none; }
.drop-menu a { display: block; padding: 9px 14px; border-radius: 8px; color: var(--muted); font-size: 14px; transition: .15s; }
.drop-menu a:hover { color: var(--text); background: var(--card-hover); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.avatar-btn { display: inline-flex; cursor: pointer; padding: 2px; border-radius: 50%; border: 1px solid transparent; transition: .2s; }
.nav-drop:hover .avatar-btn { border-color: var(--border); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 2px 10px rgba(108, 92, 255, .4);
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* 白天/夜间切换按钮 */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; transition: .25s;
}
.theme-toggle:hover { color: var(--text); background: var(--card-hover); transform: rotate(18deg); border-color: rgba(108, 92, 255, .3); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------------- Flash 提示 ---------------- */
.flash { margin-top: 20px; padding: 12px 18px; border-radius: 12px; font-size: 14.5px; border: 1px solid; }
.flash-success { background: rgba(60, 200, 120, .10); border-color: rgba(60, 200, 120, .35); color: var(--ok); }
.flash-error   { background: rgba(255, 92, 110, .10); border-color: rgba(255, 92, 110, .35); color: var(--bad); }
.flash-info    { background: rgba(108, 92, 255, .10); border-color: rgba(108, 92, 255, .35); color: var(--soft); }

/* ---------------- 按钮 ---------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: .25s cubic-bezier(.22,1,.36,1); font-family: inherit;
  isolation: isolate;
}
/* 按钮内部高光层 */
.btn::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  z-index: 0;
}
.btn > * { position: relative; z-index: 1; }

.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.35),
    0 6px 18px rgba(108, 92, 255, .35);
  border-color: rgba(255,255,255,0.15);
}
.btn-primary::before {
  opacity: 1;
  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255,255,255,0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: btn-sheen 3s ease-in-out infinite;
}
@keyframes btn-sheen {
  0%, 100% { transform: translateX(-100%); }
  50%      { transform: translateX(100%); }
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.4),
    0 12px 28px rgba(108, 92, 255, .5),
    0 0 0 1px rgba(167, 139, 250, 0.25);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }

.btn-ghost {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-color: rgba(255,255,255,0.14);
  color: var(--text);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.12);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.18), 0 6px 18px rgba(0,0,0,0.15);
}
.btn-ghost::before {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 60%);
}

/* 亮色主题下的 ghost 按钮 */
[data-theme="light"] .btn-ghost {
  background: rgba(255,255,255,0.55);
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(255,255,255,0.8);
  border-color: rgba(108,92,255,0.3);
  box-shadow: 0 4px 16px rgba(108,92,255,0.15);
}

.btn-danger { background: rgba(255, 92, 110, .12); color: var(--bad); border-color: rgba(255, 92, 110, .3); }
.btn-danger:hover { background: rgba(255, 92, 110, .2); }
.btn-sm { padding: 7px 16px; font-size: 13.5px; border-radius: 10px; }
.btn-lg { padding: 14px 34px; font-size: 16.5px; border-radius: 14px; }
.btn-block { width: 100%; }

/* ---------------- Hero ---------------- */
.hero { padding: 84px 0 56px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px; font-size: 13.5px; color: var(--soft);
  background: rgba(108, 92, 255, .10); border: 1px solid rgba(108, 92, 255, .30);
  margin-bottom: 22px;
}
.hero h1 { font-size: 46px; line-height: 1.25; font-weight: 800; letter-spacing: 1px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--muted); font-size: 18px; max-width: 580px; margin: 16px auto 34px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 56px; justify-content: center; margin-top: 58px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-size: 32px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 2px; }

/* ---------------- 区块 ---------------- */
.section { margin-top: 64px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.section-head h2::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--grad); }
.more-link { color: var(--muted); font-size: 14.5px; transition: .2s; }
.more-link:hover { color: var(--text); }

/* ---------------- 分类 ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 10px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border);
  transition: .25s; text-align: center;
}
.cat-card:hover { transform: translateY(-4px); background: var(--card-hover); border-color: rgba(108, 92, 255, .45); box-shadow: var(--shadow); }
.cat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; color: #fff; }
.cat-icon.c1 { background: linear-gradient(135deg, #6c5cff, #8f7bff); }
.cat-icon.c2 { background: linear-gradient(135deg, #b44cff, #cf7bff); }
.cat-icon.c3 { background: linear-gradient(135deg, #ff5c8a, #ff7ba8); }
.cat-icon.c4 { background: linear-gradient(135deg, #ff9f5c, #ffb87b); }
.cat-icon.c5 { background: linear-gradient(135deg, #2cc9a6, #5cdcbf); }
.cat-icon.c6 { background: linear-gradient(135deg, #4c9aff, #7bb8ff); }
.cat-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.cat-count { font-size: 12.5px; color: var(--muted); }

/* ---------------- 主题卡片 ---------------- */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.theme-card {
  position: relative;
  display: block; border-radius: var(--radius); overflow: hidden;
  background: #111;
  transition: .3s cubic-bezier(.22,1,.36,1);
  isolation: isolate;
  /* 透镜追踪 CSS 变量 */
  --mx: 50%; --my: 50%;
  /* aspect-ratio 由 card-cover 撑住 */
}
.theme-card > * { pointer-events: none; }
.theme-card .card-cover, .theme-card .card-body { pointer-events: none; }
/* 点击链接本身需要可点 */
.theme-card { pointer-events: auto; }
/* 卡片光流扫过 */
.theme-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  background:
    radial-gradient(
      300px circle at var(--mx) var(--my),
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0.04) 40%,
      transparent 70%
    );
  opacity: 0;
  transition: opacity .35s;
}
.theme-card:hover::before { opacity: 1; }
.theme-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow:
    0 24px 56px rgba(0,0,0,0.5),
    0 0 32px rgba(108, 92, 255, .15);
}
.card-cover {
  position: relative; aspect-ratio: 16 / 10; background: var(--cover-bg); overflow: hidden;
}
.card-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s cubic-bezier(.22,1,.36,1), filter .3s;
}
.theme-card:hover .card-cover img {
  transform: scale(1.08);
  filter: saturate(1.1);
}
/* cover 底部渐变遮罩 — 叠 card-body 用 */
.theme-card .card-cover::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,0) 70%);
  transition: .3s;
}
.theme-card:hover .card-cover::before {
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.45) 35%, rgba(0,0,0,0) 70%);
}
/* cover 上的透镜高光 */
.theme-card .card-cover::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(
      120px circle at var(--mx) var(--my),
      rgba(255,255,255,0.25) 0%,
      rgba(255,255,255,0.08) 30%,
      transparent 60%
    );
  opacity: 0;
  transition: opacity .3s;
}
.theme-card:hover .card-cover::after { opacity: 1; }
.cover-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(108, 92, 255, .8), rgba(255, 92, 138, .8));
}
.cover-placeholder span { font-size: 46px; font-weight: 800; color: rgba(255, 255, 255, .88); }
.card-cat {
  position: absolute; top: 10px; left: 10px; padding: 3px 11px; font-size: 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .48); backdrop-filter: blur(6px); border: 1px solid var(--tint3);
}
/* 主题类型角标（右上角，按类型着色） */
.card-type {
  position: absolute; top: 10px; right: 10px; padding: 3px 11px; font-size: 12px; font-weight: 600;
  border-radius: 999px; backdrop-filter: blur(6px); color: #fff;
  background: rgba(0, 0, 0, .48); border: 1px solid var(--tint3);
}
.card-type.type-json  { background: rgba(108, 92, 255, .78); border-color: rgba(169, 156, 255, .65); }
.card-type.type-image { background: rgba(0, 184, 217, .72); border-color: rgba(90, 220, 255, .55); }
.card-type.type-live  { background: rgba(255, 92, 138, .74); border-color: rgba(255, 140, 170, .55); }
.card-type.type-video { background: rgba(0, 170, 120, .74); border-color: rgba(90, 230, 180, .5); }
.card-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 4;
  padding: 34px 14px 12px;
  color: #fff;
}
.card-title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.card-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; color: rgba(255,255,255,.75); font-size: 12px; }
.card-author { margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.meta-item { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* ---------------- 空状态 ---------------- */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px;
  color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius);
}

/* ---------------- 分类页 chips ---------------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0; }
.chip {
  padding: 8px 18px; border-radius: 999px; font-size: 14.5px;
  background: var(--card); border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.chip:hover { color: var(--text); background: var(--card-hover); }
.chip.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.sort-group { display: flex; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.sort-group a { padding: 6px 18px; border-radius: 9px; font-size: 14px; color: var(--muted); transition: .2s; }
.sort-group a.active { background: var(--card-hover); color: var(--text); font-weight: 600; }
.search-form { display: flex; gap: 8px; }
.search-form input {
  width: 220px; background: var(--tint1); border: 1px solid var(--border);
  border-radius: 12px; padding: 9px 14px; color: var(--text); font-size: 14px; outline: none; transition: .2s;
}
.search-form input:focus { border-color: rgba(108, 92, 255, .6); box-shadow: 0 0 0 3px rgba(108, 92, 255, .15); }

/* ---------------- 详情页 ---------------- */
.breadcrumb { margin: 26px 0 0; font-size: 13.5px; color: var(--muted); }
.breadcrumb a { color: var(--muted); transition: .2s; }
.breadcrumb a:hover { color: var(--text); }
.detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; margin-top: 18px; }
.detail-cover {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 16 / 10; background: var(--cover-bg); align-self: start;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-panel { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 28px; }
.detail-title { font-size: 26px; font-weight: 700; line-height: 1.35; }
.detail-author { display: flex; align-items: center; gap: 10px; margin: 14px 0 18px; }
.detail-author .avatar { width: 34px; height: 34px; font-size: 15px; }
.detail-author .name { font-weight: 600; }
.detail-author .time { color: var(--muted); font-size: 13px; }
.chip-tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; background: rgba(108, 92, 255, .12); border: 1px solid rgba(108, 92, 255, .30); color: var(--soft); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 22px; }
.stat-box { background: var(--tint1); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; }
.stat-box b { display: block; font-size: 18px; }
.stat-box span { font-size: 12.5px; color: var(--muted); }
.detail-desc { margin-top: 18px; }
.detail-actions { display: flex; gap: 12px; margin-top: 4px; }
.detail-desc-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 26px; margin-top: 26px; }
.detail-desc-card h3 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.detail-desc-card h3::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--grad); }
.desc-text { color: var(--ink-2); white-space: pre-wrap; }

/* ---------------- 表单 ---------------- */
.auth-wrap { max-width: 430px; margin: 64px auto 0; }
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 38px 34px; backdrop-filter: blur(8px); }
.auth-card h1 { font-size: 24px; text-align: center; margin-bottom: 6px; }
.auth-card .auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-foot a { color: var(--soft); }
.auth-foot a:hover { text-decoration: underline; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%; background: var(--tint1); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 15px; color: var(--text); font-size: 15px;
  font-family: inherit; outline: none; transition: .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: rgba(108, 92, 255, .6); box-shadow: 0 0 0 3px rgba(108, 92, 255, .15);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group select option { background: var(--bg-soft); }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.form-error { background: rgba(255, 92, 110, .10); border: 1px solid rgba(255, 92, 110, .35); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 18px; }
input[type="file"] { color: var(--muted); font-size: 14px; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card-hover); color: var(--text); cursor: pointer; font-family: inherit; transition: .2s;
}
input[type="file"]::file-selector-button:hover { border-color: rgba(108, 92, 255, .6); }

/* ---------------- 个人中心 ---------------- */
.center-head {
  display: flex; align-items: center; gap: 20px; margin-top: 40px;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 28px;
}
.center-head .avatar { width: 68px; height: 68px; font-size: 30px; }
.center-info h1 { font-size: 24px; }
.center-info p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.center-stats { margin-left: auto; display: flex; gap: 28px; }
.tabs { display: flex; gap: 8px; margin: 26px 0; border-bottom: 1px solid var(--border); }
.tabs a {
  padding: 11px 22px; font-size: 15px; color: var(--muted); font-weight: 500;
  border-bottom: 2px solid transparent; transition: .2s; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); border-bottom-color: var(--primary); }
.list-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 12px; transition: .2s;
}
.list-row:hover { background: var(--card-hover); border-color: rgba(108, 92, 255, .4); }
.list-thumb { width: 92px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--cover-bg); flex-shrink: 0; }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-thumb .cover-placeholder span { font-size: 22px; }
.list-main { flex: 1; min-width: 0; }
.list-main h3 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-main .muted { font-size: 13px; }
.list-actions { display: flex; gap: 8px; flex-shrink: 0; }
.profile-box { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 30px; max-width: 560px; }
.profile-box label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.profile-box input[type="text"],
.profile-box input[type="email"],
.profile-box input[type="number"],
.profile-box input[type="password"],
.profile-box select,
.profile-box textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.profile-box input:focus,
.profile-box select:focus,
.profile-box textarea:focus {
  border-color: rgba(108,92,255,.6);
  box-shadow: 0 0 0 3px rgba(108,92,255,.15);
}
.profile-box textarea { resize: vertical; min-height: 80px; }
.profile-box input[type="file"] {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.04);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.profile-box input[type="file"]::-webkit-file-upload-button {
  background: var(--grad); color: #fff; border: 0; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; margin-right: 12px; cursor: pointer;
}
.profile-box .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-box .grid2 > label { margin-bottom: 0; }
@media (max-width: 560px) { .profile-box .grid2 { grid-template-columns: 1fr; } }
.app-versions-grid { display: grid; grid-template-columns: 440px 1fr; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .app-versions-grid { grid-template-columns: 1fr; } }
.profile-line { display: flex; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.profile-line:last-child { border-bottom: 0; }
.profile-line b { width: 110px; color: var(--muted); font-weight: 500; flex-shrink: 0; }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin: 40px 0 10px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--border); color: var(--muted); font-size: 14px; transition: .2s;
}
.pagination a:hover { color: var(--text); background: var(--card-hover); }
.pagination .active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------------- 头像图片 ---------------- */
.avatar { overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-xl { width: 76px; height: 76px; font-size: 32px; }

/* ---------------- 评论 ---------------- */
.comment-card { margin-top: 26px; }
.comment-form { margin: 18px 0 26px; }
.comment-form-row { display: flex; gap: 12px; align-items: flex-start; }
.comment-form-row .avatar { width: 38px; height: 38px; font-size: 16px; }
.comment-form-row textarea {
  flex: 1; min-height: 86px; resize: vertical;
  background: var(--tint1); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 15px; color: var(--text); font-size: 15px;
  font-family: inherit; outline: none; transition: .2s;
}
.comment-form-row textarea:focus { border-color: rgba(108, 92, 255, .6); box-shadow: 0 0 0 3px rgba(108, 92, 255, .15); }
.comment-form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 10px; }
.replying-tip { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--soft); margin-right: auto; }
.link-btn {
  background: none; border: 0; padding: 2px 6px; cursor: pointer; font-family: inherit;
  font-size: 13px; color: var(--soft); border-radius: 6px; transition: .15s; display: inline-flex; align-items: center;
}
.link-btn:hover { background: rgba(108, 92, 255, .12); }
.link-btn.link-danger { color: var(--bad); }
.link-btn.link-danger:hover { background: rgba(255, 92, 110, .12); }
.comment-list { display: flex; flex-direction: column; gap: 4px; }
.comment-item { display: flex; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--border); }
.comment-list > .comment-item:first-child { border-top: 0; }
.comment-item .avatar { width: 38px; height: 38px; font-size: 16px; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 10px; }
.comment-user { font-size: 14.5px; }
.comment-time { font-size: 12.5px; color: var(--muted); }
.comment-content { font-size: 14.5px; color: var(--ink-3); margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.reply-to { color: var(--soft); margin-right: 6px; }
.comment-actions { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.comment-reply { margin-left: 50px; background: var(--tint4); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.comment-reply .avatar { width: 30px; height: 30px; font-size: 13px; }

/* ---------------- 排行榜 ---------------- */
.rank-hero { text-align: center; margin-top: 46px; }
.rank-hero h1 { font-size: 34px; font-weight: 800; }
.rank-hero p { margin-top: 6px; }
.rank-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.rank-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 18px; transition: .2s;
}
.rank-row:hover { background: var(--card-hover); border-color: rgba(108, 92, 255, .4); transform: translateX(4px); }
.rank-badge {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15.5px; color: #fff;
  background: var(--tint2); border: 1px solid var(--border);
}
.rank-badge.rb-1 { background: linear-gradient(135deg, #f5b942, #f7d774); box-shadow: 0 4px 14px rgba(245, 185, 66, .4); border: 0; }
.rank-badge.rb-2 { background: linear-gradient(135deg, #9aa7bd, #c8d2e4); box-shadow: 0 4px 14px rgba(154, 167, 189, .35); border: 0; }
.rank-badge.rb-3 { background: linear-gradient(135deg, #c77b46, #e2a06c); box-shadow: 0 4px 14px rgba(199, 123, 70, .35); border: 0; }
.rank-thumb { width: 92px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--cover-bg); flex-shrink: 0; }
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-thumb .cover-placeholder span { font-size: 22px; }
.rank-main { flex: 1; min-width: 0; }
.rank-main h3 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-main .muted { font-size: 13px; }
.rank-count { text-align: center; flex-shrink: 0; min-width: 92px; }
.rank-count b { display: block; font-size: 22px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rank-count span { font-size: 12px; color: var(--muted); }

/* ---------------- 资料编辑 / 主题编辑 ---------------- */
.profile-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; align-items: start; }
.profile-title { font-size: 16.5px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.profile-title::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--grad); }
.profile-title:not(:first-child) { margin-top: 26px; }
.avatar-upload { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.edit-cover-preview {
  width: 200px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--cover-bg);
}
.edit-cover-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- 响应式补充 ---------------- */
@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
  .rank-row { flex-wrap: wrap; }
  .comment-reply { margin-left: 24px; }
  .designer-layout { grid-template-columns: 1fr; }
  .stage-panel { position: static; }
  .designer-stage { height: 420px; }
}
@media (max-width: 640px) {
  .rank-count { min-width: 70px; }
  .rank-count b { font-size: 18px; }
  .comment-reply { margin-left: 0; }
}

/* ---------------- JSON 主题设计器 ---------------- */
.designer-head { text-align: center; margin-top: 42px; }
.designer-head h1 { font-size: 32px; font-weight: 800; }
.designer-head p { margin-top: 6px; }
.designer-layout { display: grid; grid-template-columns: 480px 1fr; gap: 20px; margin-top: 26px; align-items: start; }
.designer-panel { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 22px; }
.stage-panel { position: sticky; top: 88px; }
.designer-sec-title { font-size: 14px; color: var(--muted); font-weight: 600; margin: 16px 0 10px; }
.designer-panel > .designer-sec-title:first-child { margin-top: 0; }
.designer-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.designer-chips button {
  padding: 7px 14px; border-radius: 999px; font-size: 13px; cursor: pointer; font-family: inherit;
  background: var(--tint1); border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.designer-chips button:hover { color: var(--text); background: var(--card-hover); }
.designer-chips button.active { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
.designer-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.json-status { font-size: 13px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.json-status.json-ok { color: var(--ok); border-color: rgba(60, 200, 120, .4); background: rgba(60, 200, 120, .08); }
.json-status.json-err { color: var(--bad); border-color: rgba(255, 92, 110, .4); background: rgba(255, 92, 110, .08); }
.designer-editor {
  width: 100%; min-height: 380px; resize: vertical; box-sizing: border-box;
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; color: var(--ink-2); font-size: 13px; line-height: 1.6; outline: none;
  font-family: Consolas, Monaco, "Courier New", monospace; tab-size: 2;
}
.designer-editor:focus { border-color: rgba(108, 92, 255, .6); box-shadow: 0 0 0 3px rgba(108, 92, 255, .15); }
.designer-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.designer-guide { margin-top: 18px; border: 1px dashed var(--border); border-radius: 12px; padding: 12px 16px; }
.designer-guide summary { cursor: pointer; font-size: 14px; color: var(--soft); }
.guide-body { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.guide-body b { color: var(--ink-3); }
.designer-stage {
  height: 560px; display: flex; align-items: center; justify-content: center;
  border-radius: 14px; overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%),
    linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.025) 75%);
  background-size: 24px 24px; background-position: 0 0, 12px 12px;
}
.designer-scaler { position: relative; }
.designer-canvas {
  position: absolute; top: 0; left: 0; transform-origin: top left;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.designer-punch {
  position: absolute; top: 0; left: 0; height: 100%; z-index: 5; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, rgba(255,92,110,.14) 0 10px, rgba(255,92,110,.05) 10px 20px);
  border-right: 2px dashed rgba(255, 92, 110, .5);
  border-radius: 14px 0 0 14px;
}
.designer-punch span {
  writing-mode: vertical-lr; font-size: 13px; letter-spacing: 4px; color: var(--bad); font-weight: 600;
}
.punch-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.punch-toggle input { accent-color: #6c5cff; }

/* 设计器 v2：组件列表 / 属性面板 / 拖拽辅助 */
.widget-list { max-height: 210px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.wl-empty { font-size: 13px; color: var(--muted); text-align: center; padding: 18px 0; border: 1px dashed var(--border); border-radius: 10px; }
.widget-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px;
  cursor: pointer; font-size: 13px; border: 1px solid transparent; background: var(--tint1); transition: .15s;
}
.widget-row:hover { background: var(--card-hover); }
.widget-row.active { border-color: rgba(108, 92, 255, .5); background: rgba(108, 92, 255, .10); }
.wr-type {
  flex-shrink: 0; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(108, 92, 255, .14); border: 1px solid rgba(108, 92, 255, .3); color: var(--soft);
}
.wr-hint { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-ops { margin-left: auto; display: flex; gap: 3px; flex-shrink: 0; }
.mini-btn {
  padding: 3px 8px; font-size: 12px; border-radius: 7px; cursor: pointer; font-family: inherit;
  background: var(--tint2); border: 1px solid var(--border); color: var(--muted); transition: .15s;
}
.mini-btn:hover { color: var(--text); background: var(--card-hover); }
.mini-btn:disabled { opacity: .35; cursor: not-allowed; }
.mini-btn.mini-danger { color: var(--bad); }
.mini-btn.mini-danger:hover { background: rgba(255, 92, 110, .14); }
.dw { cursor: move; touch-action: none; }
.dw.widget-selected { outline: 2px dashed var(--soft); outline-offset: 2px; }
.pg select {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px;
  color: var(--text); font-size: 13.5px; outline: none; cursor: pointer; transition: .2s;
}
.pg select:focus { border-color: rgba(108, 92, 255, .6); }
.pg select option { background: var(--bg-soft); }
.guide-line { position: absolute; z-index: 9; display: none; background: rgba(169, 156, 255, .85); pointer-events: none; }
.gl-v { width: 1px; top: 0; bottom: 0; }
.gl-h { height: 1px; left: 0; right: 0; }
.props-card { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 16px; }
.props-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.props-title { font-size: 14px; font-weight: 600; color: var(--soft); }
.props-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.pg label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pg input[type="text"], .pg input[type="number"] {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px;
  color: var(--text); font-size: 13.5px; outline: none; transition: .2s;
}
.pg input:focus { border-color: rgba(108, 92, 255, .6); box-shadow: 0 0 0 3px rgba(108, 92, 255, .15); }
.pg input[type="checkbox"] { accent-color: #6c5cff; width: 16px; height: 16px; }
.pg textarea {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px;
  color: var(--text); font-size: 13.5px; font-family: inherit; resize: vertical; outline: none; transition: .2s;
}
.pg textarea:focus { border-color: rgba(108, 92, 255, .6); }
.pg-full { grid-column: 1 / -1; }

/* 设计器 v3：背景素材栏 / 视频背景 */
.bg-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.bg-select {
  background: var(--tint1); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; color: var(--text); font-size: 13px; font-family: inherit; outline: none; cursor: pointer;
}
.bg-select option { background: var(--bg-soft); }
.bg-extra {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); margin-bottom: 10px; min-height: 24px;
}
.bg-extra label { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.bg-extra input {
  background: var(--tint1); border: 1px solid var(--border); border-radius: 9px;
  padding: 6px 11px; color: var(--text); font-size: 13px; outline: none; width: 170px;
}
.bg-extra input:focus { border-color: rgba(108, 92, 255, .6); }
.bg-extra input#bgAngle { width: 80px; }
.bg-url { font-size: 12.5px; color: var(--muted); }
.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* 视频主题详情预览 */
.detail-cover { position: relative; }
.detail-cover video {
  width: 100%; height: 100%; object-fit: cover; background: #000; display: block; border-radius: 20px;
}
.type-badge {
  position: absolute; top: 12px; right: 12px; padding: 4px 12px; font-size: 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); border: 1px solid var(--tint3); color: #fff;
}
.type-badge.type-json  { background: rgba(108, 92, 255, .78); border-color: rgba(169, 156, 255, .65); }
.type-badge.type-image { background: rgba(0, 184, 217, .72); border-color: rgba(90, 220, 255, .55); }
.type-badge.type-live  { background: rgba(255, 92, 138, .74); border-color: rgba(255, 140, 170, .55); }
.type-badge.type-video { background: rgba(0, 170, 120, .74); border-color: rgba(90, 230, 180, .5); }

/* 设计器 v4：直接发布弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(5, 8, 18, .72); backdrop-filter: blur(6px);
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 26px; box-shadow: var(--shadow); animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.modal .form-hint { margin-bottom: 16px; }
.m-field { margin-bottom: 14px; }
.m-field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.m-field input[type="text"], .m-field select, .m-field textarea {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px;
  color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: .2s;
}
.m-field textarea { resize: vertical; }
.m-field input:focus, .m-field select:focus, .m-field textarea:focus {
  border-color: rgba(108, 92, 255, .6); box-shadow: 0 0 0 3px rgba(108, 92, 255, .15);
}
.m-field select option { background: var(--bg-soft); }
.m-field input[type="file"] { font-size: 13px; color: var(--muted); }
.m-ops { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* 设计器 v5：对齐 / 缩放 / 网格 / 图层增强 */
.align-btns { display: flex; gap: 3px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.zoom-ctrl { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
#zoomVal { font-size: 12.5px; color: var(--muted); min-width: 40px; text-align: center; }
.designer-gridlayer {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; display: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px);
  background-size: 40px 40px;
}
.dw-locked { cursor: default; }
.dw-locked.widget-selected { outline-color: #ffb14c; }
.wr-hidden { opacity: .45; }
.mini-lock { color: #ffb14c; border-color: rgba(255, 177, 76, .4); }
.mini-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.mini-btn svg { display: block; }
.btn svg { flex: none; }

/* 设计器 v6：三栏编辑器布局 */
.designer-topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 10px 14px; margin-top: 22px;
}
.designer-topbar .zoom-ctrl { margin-left: auto; }
.designer-topbar .punch-toggle { margin-left: 4px; }
.designer-layout { grid-template-columns: 268px minmax(0, 1fr) 300px; gap: 14px; margin-top: 14px; }
.designer-panel { padding: 16px; }
.designer-panel .designer-sec-title { margin-top: 18px; }
.designer-panel > .designer-sec-title:first-child { margin-top: 0; }
.lib-panel .designer-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lib-panel .designer-chips button { width: 100%; margin: 0; }
.stage-panel { position: static; display: flex; flex-direction: column; }
.stage-panel .designer-actions { margin-top: 14px; justify-content: center; }
.designer-stage { flex: 1; min-height: 460px; }
.designer-editor { height: 190px; min-height: 0; font-size: 12.5px; }
.widget-list { max-height: 300px; }
.props-panel { position: sticky; top: 88px; }
.props-panel .props-card:first-child { margin-top: 0; }
.designer-guide { margin-top: 16px; }
@media (max-width: 1240px) {
  .designer-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .stage-panel { grid-column: 1 / -1; grid-row: 1; }
  .lib-panel { grid-row: 2; }
  .props-panel { position: static; grid-row: 2; }
}
@media (max-width: 760px) {
  .designer-layout { grid-template-columns: 1fr; }
  .stage-panel, .lib-panel, .props-panel { grid-column: auto; grid-row: auto; }
}

/* 设计器 v7：颜色选择容器 */
.pg-colorwrap { width: 100%; }
.pg-swatches { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.pg-swatch {
  width: 20px; height: 20px; border-radius: 6px; padding: 0; cursor: pointer; transition: .15s;
  border: 1px solid rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
}
.pg-swatch:hover { transform: scale(1.18); }
.pg-swatch.active { outline: 2px solid var(--soft); outline-offset: 1px; }
.pg-colorrow { display: flex; gap: 6px; }
.pg-colorrow input[type="color"] {
  width: 40px; height: 36px; padding: 3px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--tint1); cursor: pointer; flex: none; box-sizing: border-box;
}
.pg-colorrow input[type="text"] {
  flex: 1; min-width: 0; background: var(--tint1); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 10px; color: var(--text); font-size: 12.5px; outline: none; transition: .2s;
}
.pg-colorrow input[type="text"]:focus { border-color: rgba(108, 92, 255, .6); }
.bg-colorlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.bg-colorrow { display: flex; align-items: flex-start; gap: 6px; }
.bg-colorrow .pg-colorwrap { flex: 1; min-width: 0; }
.bg-extra { display: flex; flex-direction: column; gap: 8px; }
.bg-extra label { font-size: 12.5px; color: var(--muted); }
.bg-extra input[type="number"] {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px;
  color: var(--text); font-size: 13.5px; outline: none;
}

/* 详情页 JSON 结构预览 */
.json-preview { margin-top: 12px; }
.json-preview summary { cursor: pointer; color: var(--muted); font-size: 13.5px; user-select: none; }
.json-preview summary:hover { color: var(--text); }
.json-preview pre {
  margin-top: 10px; padding: 14px; border-radius: 12px; overflow: auto; max-height: 320px;
  background: var(--code-bg); border: 1px solid var(--border);
  font-family: Consolas, Monaco, monospace; font-size: 12.5px; line-height: 1.6; color: var(--json-ink);
}

/* 站内搜索 */
.nav-search {
  display: flex; align-items: center; gap: 0; margin-right: 4px;
  background: var(--tint2); border: 1px solid var(--border);
  border-radius: 999px; overflow: hidden; transition: .25s;
}
.nav-search:hover { border-color: rgba(108, 92, 255, .3); }
.nav-search:focus-within {
  border-color: rgba(108, 92, 255, .7);
  background: var(--tint2);
  box-shadow: 0 0 0 3px rgba(108, 92, 255, .12);
}
.nav-search input {
  border: none; outline: none; background: transparent; padding: 7px 4px 7px 14px;
  color: var(--text); font-size: 13.5px; width: 140px;
}
.nav-search input::placeholder { color: var(--muted); }
.nav-search button {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  padding: 7px 10px 7px 6px; display: flex; align-items: center; transition: .2s;
}
.nav-search button:hover { color: var(--soft); }
.search-hero { display: flex; gap: 10px; max-width: 640px; margin: 40px auto; }
.search-hero input {
  flex: 1; background: var(--tint2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 18px; color: var(--text); font-size: 15.5px; outline: none; transition: .2s;
}
.search-hero input:focus { border-color: rgba(108, 92, 255, .65); }

/* 后台维护 */
.maint-box { max-width: 640px; }
.maint-box code { background: var(--code-bg); padding: 2px 7px; border-radius: 6px; font-size: 13px; }
.maint-box form { margin-top: 14px; }

/* 注册人机验证 */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-img {
  height: 46px; flex: none; display: block; border-radius: 10px;
  border: 1px solid var(--border); cursor: pointer;
}

/* 滑块拼图验证码 */
.slider-captcha { width: 100%; }
.sc-canvas { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 10px; }
.sc-canvas img { display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.sc-piece { position: absolute; left: 0; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .45)); }
.sc-track {
  position: relative; height: 44px; border-radius: 999px; overflow: hidden;
  background: var(--tint2); border: 1px solid var(--border);
}
.sc-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 44px;
  background: linear-gradient(90deg, rgba(108, 92, 255, .25), rgba(108, 92, 255, .5));
}
.sc-tip {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted); pointer-events: none; transition: opacity .2s;
}
.sc-handle {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none;
  background: linear-gradient(135deg, #6c5cff, var(--soft)); color: #fff; border: none; border-radius: 999px;
  box-shadow: 0 3px 12px rgba(108, 92, 255, .45); transition: filter .2s;
}
.sc-handle:active { cursor: grabbing; filter: brightness(1.12); }
/* 滑块验证状态反馈 */
.sc-ok .sc-handle { background: linear-gradient(135deg, #2fbf71, var(--ok)); box-shadow: 0 3px 12px rgba(47, 191, 113, .45); }
.sc-ok .sc-fill { background: linear-gradient(90deg, rgba(47, 191, 113, .25), rgba(47, 191, 113, .55)); }
.sc-ok .sc-tip { color: var(--ok); }
.sc-err .sc-handle { background: linear-gradient(135deg, #e0455e, var(--bad)); box-shadow: 0 3px 12px rgba(224, 69, 94, .45); }
.sc-err .sc-fill { background: linear-gradient(90deg, rgba(224, 69, 94, .25), rgba(224, 69, 94, .5)); }
.sc-err .sc-tip { color: var(--bad); }
.sc-err .sc-canvas { animation: scShake .45s; }
@keyframes scShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.math-q {
  display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 18px;
  background: var(--tint2); border: 1px solid var(--border); border-radius: 10px;
  font-family: Georgia, serif; font-size: 18px; letter-spacing: 2px; color: var(--text); flex: none;
}

/* ---------------- 页脚 ---------------- */
.site-footer { border-top: 1px solid var(--border); padding: 34px 0; margin-top: 60px; text-align: center; }
.footer-wrap p { font-size: 14.5px; }
.footer-wrap .muted { font-size: 13px; margin-top: 4px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
  .theme-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav-wrap { height: 56px; gap: 14px; }
  .main-nav {
    display: none; position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 12px 20px 16px;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .drop-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 16px; display: none; }
  .nav-drop.open .drop-menu { display: block; }
  .nav-right { gap: 6px; }
  .nav-search { display: none; } /* 手机顶栏隐藏搜索框，汉堡菜单内或页面搜索 */
  .theme-toggle { width: 32px; height: 32px; }
  .avatar { width: 30px; height: 30px; font-size: 14px; }
  .nav-bell { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
  .btn-sm { padding: 5px 10px; font-size: 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .center-head { flex-direction: column; text-align: center; }
  .center-stats { margin: 0; }
}
@media (max-width: 640px) {
  .theme-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 56px 0 40px; }
  .hero-stats { gap: 32px; }
  .container { padding: 0 16px; }
  .search-form input { width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .list-row { flex-wrap: wrap; }
}

/* ---------------- 意见反馈 ---------------- */
.page-head h1 { font-size: 26px; margin: 0 0 6px; }
.page-head p { margin: 0; }
.fb-types { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.fb-type input { display: none; }
.fb-type span {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 14px 8px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer;
  background: var(--tint1); color: var(--muted);
  transition: border-color .2s, background .2s, color .2s, transform .2s;
}
.fb-type span b { font-size: 14.5px; color: var(--text); }
.fb-type span small { font-size: 11.5px; line-height: 1.5; }
.fb-type span:hover { transform: translateY(-2px); border-color: rgba(108, 92, 255, .5); }
.fb-type input:checked + span {
  border-color: #6c5cff; background: rgba(108, 92, 255, .14); color: var(--soft);
  box-shadow: 0 4px 16px rgba(108, 92, 255, .22);
}
.fb-type input:checked + span b { color: #fff; }
.fb-form .form-label { display: block; font-size: 14px; color: var(--muted); margin: 16px 0 8px; }
.fb-form input[type="text"],
.fb-form textarea {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px;
  color: var(--text); font-size: 14.5px; outline: none; font-family: inherit; resize: vertical;
}
.fb-form input[type="text"]:focus, .fb-form textarea:focus { border-color: rgba(108, 92, 255, .6); }
.fb-form input[type="file"] { color: var(--muted); font-size: 13.5px; }
.fb-prev { max-height: 180px; margin-top: 12px; border-radius: 12px; border: 1px solid var(--border); }
.fb-item {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; margin-bottom: 14px;
}
.fb-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.fb-item-head h3 { margin: 0; font-size: 16.5px; flex: 1; min-width: 0; }
.fb-badge {
  flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12.5px;
  background: rgba(108, 92, 255, .16); color: var(--soft); border: 1px solid rgba(108, 92, 255, .3);
}
.fb-st { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; }
.fb-st0 { background: rgba(255, 200, 60, .13); color: var(--warn); }
.fb-st1 { background: rgba(60, 200, 120, .13); color: var(--ok); }
.fb-st2 { background: var(--tint2); color: var(--muted); }
.fb-content { margin: 0 0 10px; font-size: 14.5px; line-height: 1.75; color: var(--text); word-break: break-word; }
.fb-attach { display: inline-block; }
.fb-attach img { max-height: 170px; border-radius: 10px; border: 1px solid var(--border); display: block; }
.fb-reply-block {
  background: rgba(60, 200, 120, .08); border: 1px solid rgba(60, 200, 120, .28);
  border-radius: 12px; padding: 12px 16px; margin: 10px 0;
}
.fb-reply-block b { color: var(--ok); font-size: 13.5px; }
.fb-reply-block p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.7; }
.fb-item-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.fb-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.fb-filter a {
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; color: var(--muted);
  background: var(--tint1); border: 1px solid var(--border);
}
.fb-filter a.active { color: #fff; background: linear-gradient(135deg, rgba(108, 92, 255, .5), rgba(180, 76, 255, .5)); border-color: transparent; }
.fb-admin-item { border-color: rgba(108, 92, 255, .25); }
.fb-reply-form textarea {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px;
  color: var(--text); font-size: 14.5px; outline: none; font-family: inherit; resize: vertical;
}
.fb-reply-form textarea:focus { border-color: rgba(108, 92, 255, .6); }
.fb-admin-actions { display: flex; gap: 10px; margin-top: 10px; }
@media (max-width: 900px) {
  .fb-types { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- 社区 ---------------- */
.post-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 20px 22px; margin-bottom: 16px;
}
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-who { display: flex; flex-direction: column; line-height: 1.4; }
.post-who b { font-size: 14.5px; }
.post-who .muted { font-size: 12.5px; }
.post-ops { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.post-ops form { margin: 0; }
.post-title { font-size: 19px; margin: 0 0 10px; line-height: 1.5; }
.post-detail .post-title { font-size: 24px; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--soft); }
.post-excerpt { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.post-content { margin: 0 0 16px; font-size: 15.5px; line-height: 1.85; word-break: break-word; }
.post-thumb-row { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.post-thumb-row img {
  width: 132px; height: 100px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--border);
}
.post-more { color: var(--muted); font-size: 13px; }
.post-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.post-foot .muted { font-size: 13px; }
.post-foot form { margin: 0; }
.post-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px;
}
.post-gallery.single { grid-template-columns: minmax(0, 480px); }
.post-gallery img {
  width: 100%; height: 200px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--border); display: block; transition: transform .2s;
}
.post-gallery img:hover { transform: scale(1.02); }
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 22px 0; }
.post-img-prev { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.post-img-prev img {
  width: 110px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border);
}
.img-del { position: relative; cursor: pointer; }
.img-del input { display: none; }
.img-del span {
  position: absolute; inset: auto 0 0 0; text-align: center; font-size: 11.5px;
  padding: 3px 0; background: rgba(0, 0, 0, .62); color: #ff9b9b; border-radius: 0 0 10px 10px;
}
.img-del input:checked + img { opacity: .35; }
.img-del input:checked ~ span { color: #fff; background: rgba(226, 70, 96, .75); }
.ref-picker { position: relative; }
.ref-picker > input[type="text"] {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px;
  color: var(--text); font-size: 14.5px; outline: none;
}
.ref-results {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--pop-bg); border: 1px solid var(--border); border-radius: 12px;
  max-height: 240px; overflow: auto; padding: 6px; display: flex; flex-direction: column;
}
.ref-results a { padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.ref-results a:hover { background: rgba(108, 92, 255, .16); }
.ref-chips { display: flex; flex-wrap: wrap; }
.cmt-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cmt-child { border-bottom: none; margin-top: 12px; padding-top: 0; }
.cmt-main { flex: 1; min-width: 0; }
.cmt-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.cmt-meta b { font-size: 14px; }
.cmt-meta .muted { font-size: 12.5px; }
.cmt-text { margin: 0 0 6px; font-size: 14.5px; line-height: 1.7; word-break: break-word; }
.cmt-ops { display: flex; gap: 14px; align-items: center; }
.cmt-ops form { margin: 0; }
.cmt-reply-btn, .cmt-del-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--soft); font-size: 13px;
}
.cmt-del-btn { color: var(--bad); }
.cmt-form { margin-top: 18px; }
.cmt-form textarea {
  width: 100%; box-sizing: border-box; background: var(--tint1);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  color: var(--text); font-size: 14.5px; outline: none; font-family: inherit; resize: vertical;
}
.cmt-form textarea:focus { border-color: rgba(108, 92, 255, .6); }
.replying { font-size: 13.5px; color: var(--soft); margin: 0 0 8px; }
@media (max-width: 760px) {
  .post-gallery { grid-template-columns: repeat(2, 1fr); }
  .post-gallery img { height: 140px; }
}
.user-link { color: inherit; }

/* ============================================================================
   酷安风格首页（v2）
   ============================================================================ */

/* --- Hero Banner --- */
.hero-banner { padding: 56px 0 40px; background: transparent; }
.hb-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  min-height: 560px;
  padding: 40px 48px;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: visible;
}
.hb-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 20% 0%, rgba(108, 92, 255, .10), transparent 60%);
  pointer-events: none;
}
.hb-info { padding-right: 20px; }
.hb-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--soft);
  background: rgba(108, 92, 255, .10); border: 1px solid rgba(108, 92, 255, .30);
  margin-bottom: 20px;
}
.hb-info h1 {
  font-size: 40px; line-height: 1.25; font-weight: 800; letter-spacing: .5px;
}
.hb-sub { color: var(--muted); font-size: 16px; max-width: 440px; margin: 14px 0 24px; }
.hb-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hb-stats {
  display: flex; gap: 6px; align-items: center;
  font-size: 14px; color: var(--muted);
}
.hb-stats b { color: var(--text); font-weight: 700; margin: 0 3px; }
.hb-stats .dot { color: var(--border); }

/* --- Hero Coverflow 3D Slider --- */
.hb-slider {
  position: relative;
  aspect-ratio: 9/16;
  width: 50%;
  justify-self: center;
  border-radius: 28px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  perspective: 1800px;
}
.hb-stage {
  position: absolute; inset: -6% -10%;
  transform-style: preserve-3d;
  display: flex; align-items: center; justify-content: center;
}
.hb-slide {
  --slide-w: 72%;
  position: absolute;
  width: var(--slide-w);
  aspect-ratio: 9/19.5;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(0,0,0,.55);
  transform-origin: center center;
  transition: transform .55s cubic-bezier(.2, .8, .2, 1),
              opacity .4s ease,
              box-shadow .4s ease;
  will-change: transform;
  cursor: grab;
  user-select: none;
  -webkit-user-drag: none;
  background: #111;
}

/* ===== 折射高光 — 玻璃表面的光流 ===== */
.hb-slide::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  /* 核心：动态渐变高光 */
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0) 35%,
    rgba(255,255,255,0.18) 45%,
    rgba(255,255,255,0.35) 50%,
    rgba(255,255,255,0.18) 55%,
    rgba(255,255,255,0) 65%,
    rgba(255,255,255,0) 100%
  );
  /* 高光流动动画 */
  animation: hb-refraction 4.5s ease-in-out infinite;
}
/* 顶部月牙折射 */
.hb-slide::after {
  content: '';
  position: absolute; top: -15%; left: 10%; right: 10%; height: 40%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 4;
  filter: blur(6px);
  animation: hb-glow 3.8s ease-in-out infinite;
}
@keyframes hb-refraction {
  0%, 100% { transform: translateX(-30%) translateY(-20%) rotate(-5deg) scale(1.2); opacity: .7; }
  50%      { transform: translateX(30%) translateY(20%) rotate(5deg) scale(1.3); opacity: 1; }
}
@keyframes hb-glow {
  0%, 100% { opacity: .5; top: -15%; }
  50%      { opacity: .9; top: -10%; }
}

/* ===== 色散边缘 — 模拟玻璃折射 ===== */
.hb-slide[data-pos="C"] {
  filter:
    drop-shadow(0 0 0.5px rgba(120,119,198,0.3))
    drop-shadow(0 0 0.5px rgba(255,182,193,0.2));
  box-shadow:
    0 28px 72px rgba(0,0,0,.55),
    0 0 40px rgba(108, 92, 255, .18),
    0 -2px 20px rgba(255,182,193,0.08);
}
.hb-slide[data-pos="C"]::before { animation-duration: 3s; }
.hb-slide[data-pos="C"]::after  { animation-duration: 2.6s; }
.hb-slide img, .hb-slide-ph {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
}
.hb-slide-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; font-weight: 800;
  background: var(--grad); color: #fff;
}
.hb-slide-mask {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 65%);
  pointer-events: none;
}
.hb-slide-info {
  position: absolute; left: 18px; right: 18px; bottom: 14px;
  color: #fff;
  transition: opacity .3s ease;
}
.hb-slide-cat {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.22); font-size: 12px; font-weight: 500;
  backdrop-filter: blur(6px); margin-bottom: 6px;
}
.hb-slide-title { font-size: 15px; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* 两侧弱化 */
.hb-slide[data-pos="L2"], .hb-slide[data-pos="R2"] { opacity: .35; }
.hb-slide[data-pos="L1"], .hb-slide[data-pos="R1"] { opacity: .75; }

/* 箭头 */
.hb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,.12);
  color: #fff; font-size: 22px; line-height: 1; font-weight: 300;
  backdrop-filter: blur(10px);
  transition: background .2s, transform .2s;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
}
.hb-arrow:hover { background: rgba(255,255,255,.25); }
.hb-prev { left: -24px; }
.hb-next { right: -24px; }

/* 指示点 */
.hb-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 20;
}
.hb-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.4); transition: .2s;
  cursor: pointer;
}
.hb-dots span.active { width: 20px; border-radius: 3px; background: #fff; }

/* 响应 */
@media (max-width: 1080px) {
  .hb-slider { width: 44%; }
  .hb-slide { --slide-w: 76%; }
}
@media (max-width: 768px) {
  .hero-banner { padding: 32px 0 24px; }
  .hb-card { min-height: auto; padding: 28px 20px; border-radius: 18px; }
  .hb-slider { aspect-ratio: 3/4; border-radius: 14px; overflow: visible; min-height: 400px; width: 60%; }
  .hb-slide { --slide-w: 58%; border-radius: 22px; }
  .hb-arrow { width: 34px; height: 34px; font-size: 18px; }
}

/* --- 分类 Tab --- */
.cat-tabs-wrap {
  position: sticky; top: 64px; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.cat-tabs {
  position: relative;
  display: flex; gap: 2px; padding: 10px 0;
  overflow-x: auto; scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }

/* 液态玻璃胶囊指示器 */
.cat-indicator {
  position: absolute; top: 10px; left: 0;
  height: 36px;
  border-radius: 999px;
  /* 液态玻璃核心 */
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18);
  /* 折射高光 — 顶部月牙光 */
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.5),
    inset 0 -2px 6px rgba(255,255,255,0.08),
    0 4px 18px rgba(108, 92, 255, 0.25),
    0 2px 6px rgba(0,0,0,0.12);
  /* 色散边缘 — 模拟玻璃折射 */
  filter: drop-shadow(0 0 1px rgba(108,92,255,0.15)) drop-shadow(0 0 1px rgba(255,182,193,0.12));
  transition: transform .45s cubic-bezier(.22,1,.36,1), width .45s cubic-bezier(.22,1,.36,1);
  z-index: 0;
  pointer-events: none;
}
/* 暗色系下加深 */
:root:not([data-theme="light"]) .cat-indicator {
  background: rgba(108, 92, 255, 0.18);
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.35),
    inset 0 -2px 6px rgba(108,92,255,0.15),
    0 4px 18px rgba(108, 92, 255, 0.45),
    0 2px 6px rgba(0,0,0,0.25);
}

.cat-tab {
  position: relative; z-index: 1;
  flex-shrink: 0;
  padding: 9px 18px; border-radius: 999px;
  border: none;
  background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: color .2s, transform .2s; font-family: inherit;
}
.cat-tab:hover { color: var(--text); transform: translateY(-1px); }
.cat-tab.active {
  color: var(--text);
  font-weight: 600;
}
.cat-tab.active:hover { transform: none; }

/* --- 信息流 --- */
.feed-section { padding: 32px 0 48px; }
.feed-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}
.feed-more {
  text-align: center; margin-top: 28px;
}

/* 卡片在 feed-grid 下的样式微调 */
.feed-grid .theme-card {
  border-radius: 14px; overflow: hidden;
  background: #111;
  transition: transform .3s ease, box-shadow .3s ease;
}
.feed-grid .theme-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .45);
}
.feed-grid .card-cover { aspect-ratio: 16/10; }
.feed-grid .card-cover img { height: 100%; }
.feed-grid .card-body { padding: 30px 12px 10px; }
.feed-grid .card-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.feed-grid .card-meta { font-size: 11.5px; gap: 8px; }
.feed-grid .meta-item svg { width: 12px; height: 12px; }

/* --- 响应式 --- */
@media (max-width: 1080px) {
  .hb-card { gap: 28px; padding: 28px 32px; }
  .hb-info { padding-right: 0; }
  .feed-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .hero-banner { padding: 28px 0 20px; }
  .hb-info h1 { font-size: 30px; }
  .hb-sub { font-size: 14px; margin: 10px 0 18px; }
  .hb-stats b { font-size: 14px; }
  .cat-tabs-wrap { top: 56px; }
  .feed-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feed-grid .card-title { font-size: 13px; }
  .feed-grid .card-meta { font-size: 11px; gap: 8px; }
}
@media (max-width: 480px) {
  .hb-info h1 { font-size: 24px; }
  .hb-slider { aspect-ratio: 16/9; border-radius: 14px; }
  .cat-tab { padding: 8px 14px; font-size: 13px; }
}

/* --- App 功能展示区 --- */
.app-showcase {
  padding: 72px 0 48px;
  margin-top: 16px;
  position: relative;
  overflow: hidden;
}
.app-showcase::before {
  content: "";
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(108, 92, 255, .18), transparent 70%);
  pointer-events: none; z-index: 0;
}
.app-showcase-head {
  text-align: center; position: relative; z-index: 1;
  max-width: 520px; margin: 0 auto 48px;
}
.app-showcase-head h2 {
  font-size: 28px; font-weight: 700; margin: 0 0 12px;
}
.app-showcase-head p { color: var(--muted); font-size: 15px; margin: 0 0 20px; }

.app-phones {
  display: flex; justify-content: center; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
  position: relative; z-index: 1;
  perspective: 1200px;
}

.phone-shot {
  width: 180px; height: auto;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .40);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
  flex-shrink: 0;
  display: block;
}
.phone-shot:hover { transform: translateY(-12px) rotateX(6deg); }

/* ============================================================================
   关于页面
   ============================================================================ */
.about-page { padding: 36px 0 60px; }

.about-hero {
  text-align: center; padding: 48px 20px 36px;
  background: var(--tint1);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 36px;
}
.about-logo {
  width: 80px; height: 80px; border-radius: 22px;
  box-shadow: 0 8px 28px rgba(108, 92, 255, .4);
  margin-bottom: 20px; object-fit: cover;
}
.about-hero h1 { font-size: 36px; font-weight: 800; margin: 0 0 8px; }
.about-tag { color: var(--soft); font-size: 15px; margin: 0 0 16px; }
.about-desc {
  color: var(--muted); font-size: 15px; line-height: 1.75;
  max-width: 560px; margin: 0 auto 24px;
}
.about-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.about-stats {
  display: flex; gap: 20px; justify-content: center;
  padding: 28px 20px; margin-bottom: 40px;
  background: var(--tint1); border: 1px solid var(--border); border-radius: 16px;
}
.about-stat { text-align: center; flex: 1; max-width: 160px; }
.as-num { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.as-label { font-size: 13px; color: var(--muted); margin-top: 6px; }

.about-features, .about-contact { margin-bottom: 40px; }
.about-features h2, .about-contact h2 {
  font-size: 22px; font-weight: 700; margin: 0 0 20px;
  display: flex; align-items: center; gap: 10px;
}
.about-features h2::before, .about-contact h2::before {
  content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--grad);
}

.feature-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}
.feature-card {
  padding: 22px; background: var(--tint1); border: 1px solid var(--border);
  border-radius: 16px; transition: transform .2s, border-color .2s;
}
.feature-card:hover { transform: translateY(-3px); border-color: rgba(108, 92, 255, .4); }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.feature-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }

.contact-grid {
  display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr);
}
.contact-card {
  padding: 24px; background: var(--tint1); border: 1px solid var(--border);
  border-radius: 16px;
}
.contact-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.contact-card p { font-size: 14px; color: var(--muted); margin: 0 0 16px; }

.about-legal {
  text-align: center; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
}

@media (max-width: 768px) {
  .about-page { padding: 20px 0 40px; }
  .about-hero { padding: 32px 16px 28px; }
  .about-hero h1 { font-size: 28px; }
  .about-logo { width: 64px; height: 64px; border-radius: 18px; }
  .about-stats { gap: 12px; padding: 20px 12px; }
  .as-num { font-size: 22px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.phone-featured {
  width: 210px;
  transform: translateY(-20px) scale(1.06);
}
.phone-featured:hover { transform: translateY(-32px) scale(1.08) rotateX(6deg); }

/* 响应 */
@media (max-width: 1080px) {
  .app-phones { gap: 20px; }
  .phone-shot { width: 150px; }
  .phone-featured { width: 175px; }
}
@media (max-width: 768px) {
  .app-showcase { padding: 48px 0 32px; }
  .app-showcase-head h2 { font-size: 22px; }
  .app-phones {
    gap: 16px; justify-content: flex-start;
    overflow-x: auto; padding: 10px 10px 24px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .phone-shot { width: 130px; scroll-snap-align: start; transform: none; }
  .phone-featured { width: 150px; transform: none; }
  .phone-featured:hover { transform: translateY(-8px); }
}
.user-link:hover { color: var(--soft); }

/* ---------------- 消息通知 ---------------- */
.nav-bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; color: var(--muted);
  transition: background .2s, color .2s;
}
.nav-bell:hover { background: var(--tint2); color: var(--soft); }
.bell-badge {
  position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 17px;
  text-align: center; color: #fff;
  background: linear-gradient(135deg, #e2465e, #ff7a45);
  box-shadow: 0 2px 6px rgba(226, 70, 94, .4);
}
.ntf-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 18px; margin-bottom: 10px;
}
.ntf-item.unread {
  border-color: rgba(108, 92, 255, .45);
  background: rgba(108, 92, 255, .08);
}
.ntf-main { flex: 1; min-width: 0; }
.ntf-text { margin: 0 0 2px; font-size: 14.5px; }
.ntf-post { margin: 0 0 2px; font-size: 13.5px; color: var(--soft); }
.ntf-item form { margin: 0; }

/* ================ AI 助手悬浮面板 ================ */
.ai-panel {
  position: fixed; bottom: 24px; right: 24px;
  width: 380px; max-height: 600px;
  z-index: 9999;
  display: flex; flex-direction: column;
  background: rgba(18, 22, 42, .92);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
}
[data-theme="light"] .ai-panel {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(20, 26, 60, .1);
  box-shadow: 0 20px 60px rgba(40, 50, 110, .18);
}
.ai-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
[data-theme="light"] .ai-panel-head { border-bottom: 1px solid rgba(20, 26, 60, .08); }
.ai-panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
}
.ai-close {
  width: 28px; height: 28px; border: none; background: transparent;
  color: var(--muted); border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.ai-close:hover { background: var(--tint2); color: var(--text); }

.ai-messages {
  flex: 1; overflow-y: auto; padding: 16px 14px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.ai-messages::-webkit-scrollbar { width: 5px; }
.ai-messages::-webkit-scrollbar-thumb { background: var(--tint3); border-radius: 3px; }

.ai-msg {
  display: flex;
}
.ai-msg-user { justify-content: flex-end; }
.ai-bubble {
  max-width: 82%; padding: 10px 14px;
  font-size: 14px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
  border-radius: 14px;
}
.ai-msg-user .ai-bubble {
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg-assistant .ai-bubble {
  background: var(--tint1);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ai-bubble.streaming::after {
  content: '▋';
  display: inline-block;
  margin-left: 2px;
  animation: ai-blink 1s steps(2, start) infinite;
  color: var(--soft);
}
@keyframes ai-blink { to { visibility: hidden; } }

.ai-quick {
  display: flex; gap: 8px; padding: 0 14px 10px; flex-wrap: wrap;
}
.ai-quick button {
  background: var(--tint1); border: 1px solid var(--border);
  color: var(--text); font-size: 12.5px;
  padding: 6px 12px; border-radius: 999px;
  cursor: pointer; transition: background .2s, border-color .2s;
}
.ai-quick button:hover {
  background: var(--tint2);
  border-color: rgba(108, 92, 255, .4);
}

.ai-input-row {
  display: flex; gap: 8px; padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0,0,0,.15);
}
[data-theme="light"] .ai-input-row {
  border-top: 1px solid rgba(20, 26, 60, .08);
  background: rgba(20, 26, 60, .03);
}
.ai-input-row textarea {
  flex: 1; min-height: 38px; max-height: 120px;
  padding: 9px 14px; border-radius: 12px;
  background: var(--tint1); color: var(--text);
  border: 1px solid var(--border);
  font-size: 14px; font-family: inherit;
  resize: none; outline: none;
  line-height: 1.5;
  transition: border-color .2s;
}
.ai-input-row textarea:focus { border-color: rgba(108, 92, 255, .5); }
.ai-input-row button {
  padding: 0 18px; height: 38px; border-radius: 12px;
  background: var(--grad); color: #fff; border: none;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.ai-input-row button:hover { opacity: .92; }
.ai-input-row button:active { transform: scale(.97); }

/* 移动端：底部大面板 */
@media (max-width: 640px) {
  .ai-panel {
    left: 12px; right: 12px; bottom: 12px;
    width: auto; max-height: 72vh;
  }
}

/* 全局 AI 悬浮球 */
.ai-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 52px; height: 52px; z-index: 9998;
  border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(108,92,255,.55);
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.ai-fab:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(108,92,255,.7); }
.ai-fab:active { transform: scale(.95); }
.ai-fab svg { transition: transform .3s; }
.ai-fab:hover svg { transform: rotate(15deg); }
[data-theme="light"] .ai-fab { box-shadow: 0 6px 20px rgba(108,92,255,.4); }

/* inline AI 按钮（表单内） */
.ai-inline-row { display: flex; align-items: center; }
.ai-inline-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(108,92,255,.15);
  border: 1px solid rgba(108,92,255,.4);
  color: var(--soft); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: background .2s, transform .15s, opacity .2s;
}
.ai-inline-btn:hover:not(:disabled) { background: rgba(108,92,255,.25); }
.ai-inline-btn:active:not(:disabled) { transform: scale(.97); }
.ai-inline-btn:disabled { opacity: .5; cursor: not-allowed; }
.ai-inline-hint { font-size: 13px; color: var(--soft); }

/* ============================================================
   以下：Liquid Glass 视觉增强层（参考琉璃志设计语言）
   增量追加，不替换上方任何现有样式或变量
   ============================================================ */

/* ---------- 1. 浮动光斑背景层 ---------- */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.bg-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); will-change: transform;
}
.bg-orb-1 { width: 520px; height: 520px; left: -140px; top: -120px;
  background: radial-gradient(circle, rgba(108,92,255,.38), transparent 68%);
  animation: drift1 22s ease-in-out infinite alternate; }
.bg-orb-2 { width: 460px; height: 460px; right: -120px; top: 26%;
  background: radial-gradient(circle, rgba(255,92,138,.28), transparent 68%);
  animation: drift2 27s ease-in-out infinite alternate; }
.bg-orb-3 { width: 420px; height: 420px; left: 28%; bottom: -180px;
  background: radial-gradient(circle, rgba(0,195,217,.26), transparent 68%);
  animation: drift3 24s ease-in-out infinite alternate; }
.bg-dust {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.40), transparent 70%);
  animation: drift3 26s ease-in-out infinite alternate;
}
.bg-dust-1 { width: 130px; height: 130px; left: 42%; top: 70%; }
.bg-dust-2 { width: 90px;  height: 90px;  left: 53%; top: 78%; }
.bg-dust-3 { width: 170px; height: 170px; left: 46%; top: 84%; }

@keyframes drift1 { from{ transform: translate(0,0) scale(1); } to{ transform: translate(90px,60px) scale(1.12); } }
@keyframes drift2 { from{ transform: translate(0,0) scale(1.06); } to{ transform: translate(-80px,-50px) scale(.96); } }
@keyframes drift3 { from{ transform: translate(0,0) scale(.96); } to{ transform: translate(60px,-70px) scale(1.1); } }

[data-theme="light"] .bg-orb-1 { background: radial-gradient(circle, rgba(108,92,255,.22), transparent 68%); }
[data-theme="light"] .bg-orb-2 { background: radial-gradient(circle, rgba(255,92,138,.18), transparent 68%); }
[data-theme="light"] .bg-orb-3 { background: radial-gradient(circle, rgba(0,195,217,.16), transparent 68%); }
[data-theme="light"] .bg-dust { background: radial-gradient(circle, rgba(255,255,255,.60), transparent 70%); }

/* ---------- 2. 鼠标跟随柔光（仅大屏 + hover 设备启用）---------- */
.mouse-cur {
  display: none; position: fixed; width: 560px; height: 560px;
  left: 0; top: 0; opacity: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(108,92,255,.14), transparent 62%);
  transition: opacity .4s;
}
[data-theme="light"] .mouse-cur { background: radial-gradient(circle, rgba(108,92,255,.10), transparent 62%); }

/* ---------- 3. 统一玻璃基类 ---------- */
.glass {
  position: relative;
  background: linear-gradient(152deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 20px 60px -30px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -16px 30px -22px rgba(0,0,0,.5);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(130% 110% at 12% 8%, rgba(255,255,255,.22), transparent 46%),
    linear-gradient(135deg, rgba(255,255,255,.10), transparent 42%);
}
[data-theme="light"] .glass {
  background: linear-gradient(152deg, rgba(255,255,255,.78), rgba(255,255,255,.46));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow:
    0 20px 60px -34px rgba(40,64,102,.35),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -14px 28px -20px rgba(31,54,84,.14);
}
[data-theme="light"] .glass::after {
  background:
    radial-gradient(130% 110% at 12% 8%, rgba(255,255,255,.5), transparent 46%),
    linear-gradient(135deg, rgba(255,255,255,.2), transparent 42%);
}
.glass-hover { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease; }
.glass-hover:hover { transform: translateY(-5px); }

/* ---------- 4. 入场动画 ---------- */
.fade-in { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) backwards; }
.fade-soft { animation: fadeIn .7s ease backwards; }
@keyframes fadeUp { from{ opacity: 0; transform: translateY(16px); } to{ opacity: 1; transform: none; } }
@keyframes fadeIn { from{ opacity: 0; } to{ opacity: 1; } }

/* ---------- 5. 导航栏：浮动 pill 玻璃态覆盖 ---------- */
body.liquid-mode .site-header {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 50;
  width: min(1100px, calc(100% - 36px));
  border-radius: 999px;
  padding: 4px 6px;
  background: linear-gradient(152deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow:
    0 16px 48px -24px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.2);
  animation: fadeSoft .6s ease backwards;
}
body.liquid-mode[data-theme="light"] .site-header {
  background: linear-gradient(152deg, rgba(255,255,255,.82), rgba(255,255,255,.5));
  border: 1px solid rgba(255,255,255,.95);
  box-shadow:
    0 16px 48px -28px rgba(40,64,102,.35),
    inset 0 1px 0 rgba(255,255,255,.95);
}
body.liquid-mode .nav-wrap {
  height: 52px;
  border-radius: 999px;
}
body.liquid-mode .main-nav > a,
body.liquid-mode .nav-drop > a {
  padding: 7px 14px; border-radius: 999px; font-size: 14px;
}
body.liquid-mode .main-nav > a:hover,
body.liquid-mode .nav-drop > a:hover {
  background: rgba(255,255,255,.10);
}
body.liquid-mode .nav-search {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
}
body.liquid-mode[data-theme="light"] .nav-search {
  background: rgba(20,26,60,.05);
  border: 1px solid rgba(20,26,60,.10);
}
body.liquid-mode .page-main {
  padding-top: 96px;
  position: relative; z-index: 1;
}
body.liquid-mode footer { position: relative; z-index: 1; }

/* ---------- 6. body 层叠修正 ---------- */
body.page-wrapper { position: relative; }
body.page-wrapper > * { position: relative; z-index: 1; }
body.page-wrapper .bg-layer,
body.page-wrapper .mouse-cur { z-index: 0; position: fixed; }

/* ---------- 7. 主题卡片玻璃化 ---------- */
.liquid-mode .theme-card {
  background: linear-gradient(152deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 14px 40px -20px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.liquid-mode .theme-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 22px 56px -24px rgba(108,92,255,.45),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.liquid-mode[data-theme="light"] .theme-card {
  background: linear-gradient(152deg, rgba(255,255,255,.75), rgba(255,255,255,.42));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow:
    0 14px 40px -20px rgba(40,64,102,.3);
}

/* ---------- 8. Hero 玻璃强化 ---------- */
.liquid-mode .hb-card {
  background: linear-gradient(152deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow:
    0 28px 70px -30px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.liquid-mode[data-theme="light"] .hb-card {
  background: linear-gradient(152deg, rgba(255,255,255,.8), rgba(255,255,255,.48));
  border: 1px solid rgba(255,255,255,.95);
  box-shadow:
    0 28px 70px -34px rgba(40,64,102,.4);
}

/* ---------- 9. 分类 Tab 玻璃化 ---------- */
.liquid-mode .cat-tabs-wrap {
  position: relative; z-index: 1;
}
.liquid-mode .cat-tabs {
  background: linear-gradient(152deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 999px;
  padding: 6px;
}
.liquid-mode[data-theme="light"] .cat-tabs {
  background: linear-gradient(152deg, rgba(255,255,255,.82), rgba(255,255,255,.5));
  border: 1px solid rgba(255,255,255,.92);
}

/* ---------- 10. 移动端适配 ---------- */
@media (max-width: 860px) {
  body.liquid-mode .site-header {
    top: 10px;
    width: calc(100% - 20px);
    border-radius: 20px;
    padding: 8px 14px;
  }
  body.liquid-mode .nav-wrap { height: auto; padding: 4px 0; flex-wrap: wrap; gap: 8px; }
  body.liquid-mode .main-nav { order: 3; width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
  body.liquid-mode .page-main { padding-top: 110px; }
}
@media (max-width: 640px) {
  .bg-orb-1 { width: 320px; height: 320px; left: -80px; top: -60px; }
  .bg-orb-2 { width: 280px; height: 280px; right: -60px; top: 20%; }
  .bg-orb-3 { width: 260px; height: 260px; left: 20%; bottom: -120px; }
}

/* ---------- 11. 按钮玻璃化 ---------- */
.liquid-mode .btn-primary,
.liquid-mode .btn-solid {
  background: linear-gradient(135deg, rgba(234,246,255,.95), rgba(217,247,238,.9));
  color: #0b1f2a; font-weight: 700;
  border: 1px solid rgba(255,255,255,.8);
  box-shadow:
    0 14px 36px -14px rgba(120,220,220,.55),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .25s, box-shadow .25s, background .25s;
}
.liquid-mode .btn-primary:hover,
.liquid-mode .btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px -16px rgba(120,220,220,.7), inset 0 1px 0 rgba(255,255,255,.9);
}
.liquid-mode .btn-ghost {
  background: linear-gradient(152deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
  transition: background .25s, transform .25s;
}
.liquid-mode .btn-ghost:hover {
  background: rgba(255,255,255,.14);
  transform: translateY(-2px);
}
.liquid-mode[data-theme="light"] .btn-primary,
.liquid-mode[data-theme="light"] .btn-solid {
  background: linear-gradient(135deg, #eaf6ff, #d9f7ee);
}
.liquid-mode[data-theme="light"] .btn-ghost {
  background: linear-gradient(152deg, rgba(255,255,255,.7), rgba(255,255,255,.35));
  border: 1px solid rgba(255,255,255,.9);
  color: #14202e;
}

/* ---------- 12. auth-card 玻璃化（登录/注册/上传/找回） ---------- */
.liquid-mode .auth-card {
  background: linear-gradient(152deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-radius: 24px;
  box-shadow:
    0 28px 70px -30px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.2),
    inset 0 -14px 28px -20px rgba(0,0,0,.4);
  animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) backwards;
}
.liquid-mode[data-theme="light"] .auth-card {
  background: linear-gradient(152deg, rgba(255,255,255,.82), rgba(255,255,255,.5));
  border: 1px solid rgba(255,255,255,.95);
  box-shadow:
    0 28px 70px -34px rgba(40,64,102,.4),
    inset 0 1px 0 rgba(255,255,255,.95);
}

/* ---------- 13. detail-desc-card / comment-card 玻璃化 ---------- */
.liquid-mode .detail-desc-card {
  background: linear-gradient(152deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 22px;
  box-shadow:
    0 20px 50px -28px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.15);
}
.liquid-mode[data-theme="light"] .detail-desc-card {
  background: linear-gradient(152deg, rgba(255,255,255,.8), rgba(255,255,255,.48));
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 20px 50px -28px rgba(40,64,102,.35);
}

/* ---------- 14. flash 消息玻璃化 ---------- */
.liquid-mode .flash {
  background: linear-gradient(152deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 14px;
}

/* ---------- 15. empty 空状态玻璃化 ---------- */
.liquid-mode .empty {
  background: linear-gradient(152deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.liquid-mode[data-theme="light"] .empty {
  background: linear-gradient(152deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
  border: 1px dashed rgba(20,26,60,.18);
}

/* ---------- 16. 帖子卡片 glass 化（社区 index）---------- */
.liquid-mode .cmt-item,
.liquid-mode .community-item,
.liquid-mode .topic-item,
.liquid-mode .announce-detail {
  background: linear-gradient(152deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.11);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 18px;
}
.liquid-mode[data-theme="light"] .cmt-item,
.liquid-mode[data-theme="light"] .community-item,
.liquid-mode[data-theme="light"] .announce-detail {
  background: linear-gradient(152deg, rgba(255,255,255,.78), rgba(255,255,255,.48));
  border: 1px solid rgba(255,255,255,.9);
}

/* ---------- 17. section / feed-section 外层加入场动画 ---------- */
.liquid-mode .feed-section,
.liquid-mode .section,
.liquid-mode .section-card {
  animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) backwards;
}
.liquid-mode .feed-section { animation-delay: .1s; }
.liquid-mode .section:nth-of-type(2) { animation-delay: .2s; }
.liquid-mode .section:nth-of-type(3) { animation-delay: .28s; }

/* ---------- 18. cat-tab 玻璃胶囊按钮 ---------- */
.liquid-mode .cat-tab {
  border-radius: 999px;
  padding: 7px 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: transparent;
  transition: background .25s, border-color .25s, color .25s;
}
.liquid-mode .cat-tab:hover {
  background: rgba(255,255,255,.08);
}
.liquid-mode .cat-tab.active {
  background: rgba(108,92,255,.15);
  border-color: rgba(108,92,255,.45);
  color: var(--soft);
}
.liquid-mode[data-theme="light"] .cat-tab {
  border: 1px solid rgba(20,26,60,.12);
}
.liquid-mode[data-theme="light"] .cat-tab.active {
  background: rgba(108,92,255,.1);
  border-color: rgba(108,92,255,.35);
}

/* ---------- 19. footer 玻璃化 ---------- */
.liquid-mode footer.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, transparent, rgba(10,13,24,.4));
  backdrop-filter: blur(8px);
}
.liquid-mode[data-theme="light"] footer.site-footer {
  background: linear-gradient(180deg, transparent, rgba(238,240,248,.6));
  border-top: 1px solid rgba(20,26,60,.08);
}

/* ---------- 20. Hero kicker pill + em 渐变标题 ---------- */
.liquid-mode .hb-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; letter-spacing: 2px;
  padding: 8px 18px; border-radius: 999px;
  background: linear-gradient(152deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 22px;
  color: var(--ink-2);
}
.liquid-mode .hb-badge::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #8fd8ff, #7ef0c8);
  box-shadow: 0 0 12px #7ef0c8;
}
.liquid-mode .hb-info h1 .grad-text,
.liquid-mode .hb-info h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(92deg, #8fd8ff, #7ef0c8 70%);
  -webkit-background-clip: text;
  background-clip: text;
}
.liquid-mode .hb-info h1 {
  font-family: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  font-weight: 900;
  letter-spacing: 2px;
}
.liquid-mode .hb-sub {
  font-size: 17px;
  letter-spacing: .5px;
}

/* ---------- 21. 标题类用衬线字体 ---------- */
.liquid-mode h1,
.liquid-mode h2,
.liquid-mode h3,
.liquid-mode .sec-head h2,
.liquid-mode .detail-desc-card h3,
.liquid-mode .auth-card h1 {
  font-family: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ---------- 22. 入场动画序列（给 hero + 主要 section 加延迟） ---------- */
.liquid-mode .hero-banner { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .05s backwards; }
.liquid-mode .cat-tabs-wrap { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .15s backwards; }
.liquid-mode .feed-section { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .22s backwards; }

/* ---------- 23. rank / about 等通用玻璃化 ---------- */
.liquid-mode .rank-card,
.liquid-mode .about-card,
.liquid-mode .announce-detail,
.liquid-mode .user-public-header,
.liquid-mode .user-center-section {
  background: linear-gradient(152deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 20px;
}
.liquid-mode[data-theme="light"] .rank-card,
.liquid-mode[data-theme="light"] .about-card,
.liquid-mode[data-theme="light"] .announce-detail {
  background: linear-gradient(152deg, rgba(255,255,255,.8), rgba(255,255,255,.48));
  border: 1px solid rgba(255,255,255,.9);
}

/* ---------- 24. auth-wrap 居中容器加间距修正 ---------- */
.liquid-mode .auth-wrap { padding-top: 40px; padding-bottom: 40px; }

/* ---------- 25. 通知 / 消息列表玻璃化 ---------- */
.liquid-mode .notif-item,
.liquid-mode .rank-item {
  background: linear-gradient(152deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
}

/* ---------- 减少动态效果（尊重用户偏好）---------- */
@media (prefers-reduced-motion: reduce) {
  .bg-orb, .bg-dust { animation: none !important; }
  .fade-in, .fade-soft { animation: none !important; }
}
