/* =========================================================
   村村通部落 · 前台样式 v3（CSDN 风格：左侧固定导航 + 顶部标签 + 三栏信息流）
   ========================================================= */
:root {
  --bg: #f4f5f5;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #252933;
  --muted: #8a919f;
  --border: #e3e5e7;

  /* 多彩调色板 */
  --c1: #6366f1;
  --c2: #ec4899;
  --c3: #06b6d4;
  --c4: #f59e0b;
  --c5: #10b981;
  --c6: #8b5cf6;

  --accent: #4f46e5;
  --accent-soft: #4f46e51a;
  --accent-2: #ec4899;

  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.04);
  --shadow-card: 0 1px 2px rgba(0,0,0,.04);
  --radius: 8px;
  --radius-sm: 6px;
  --maxw: 1440px;
  --header-h: 56px;
  --sidebar-w: 200px;
  --right-w: 340px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root:not(.locked-light) {
    --bg: #0a0b16;
    --surface: #141627;
    --surface-2: #1b1e34;
    --text: #eef0fb;
    --muted: #9aa1c4;
    --border: #262a45;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.4);
    --shadow-card: 0 1px 2px rgba(0,0,0,.3);
  }
}
body.mode-dark {
  --bg: #0a0b16; --surface: #141627; --surface-2: #1b1e34; --text: #eef0fb;
  --muted: #9aa1c4; --border: #262a45;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.4);
  --shadow-card: 0 1px 2px rgba(0,0,0,.3);
}
body.mode-light {
  --bg: #f4f5f5; --surface: #ffffff; --surface-2: #f7f8fa; --text: #252933;
  --muted: #8a919f; --border: #e3e5e7;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.04);
  --shadow-card: 0 1px 2px rgba(0,0,0,.04);
}
body.effects-off, body.effects-off * { animation: none !important; transition: none !important; }

* { box-sizing: border-box; }

body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 18px; height: var(--header-h);
}
.header-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
  display: none; width: 36px; height: 36px; font-size: 18px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-sm); cursor: pointer;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; font-size: 17px;
  border-radius: 9px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.brand-text { font-size: 17px; letter-spacing: .3px; color: var(--text); }
.top-quick-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.top-quick-nav a {
  font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: var(--radius-sm); font-weight: 600;
}
.top-quick-nav a:hover { color: var(--text); background: var(--surface-2); }

/* 搜索框 */
.header-search {
  display: flex; align-items: center; max-width: 420px; width: 100%; margin: 0 auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 6px 4px 16px; transition: border-color .2s, box-shadow .2s;
}
.header-search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}
.header-search input {
  flex: 1; border: none; background: transparent; outline: none; color: var(--text); font-size: 14px;
}
.header-search button {
  width: 34px; height: 34px; border: none; background: transparent; cursor: pointer;
  border-radius: 50%; font-size: 16px; display: grid; place-items: center;
}
.header-search button:hover { background: var(--bg); }

.header-right { display: flex; align-items: center; gap: 10px; }
.btn-create { font-weight: 700; padding: 7px 16px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 16px; cursor: pointer; transition: background .2s;
}
.icon-btn:hover { background: var(--surface-2); }

/* 用户菜单 */
.user-menu { position: relative; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-weight: 700; font-size: 14px; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lc, var(--accent)) 25%, transparent);
}
.user-dropdown {
  position: absolute; top: 48px; right: 0; width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 10px; display: none; flex-direction: column; gap: 4px;
}
.user-menu.open .user-dropdown { display: flex; }
.ud-info { padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.ud-info b { display: block; font-size: 15px; color: var(--text); }
.ud-info .lv-badge { margin-top: 6px; }
.ud-info .muted { font-size: 13px; display: block; margin-top: 4px; }
.user-dropdown a {
  padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
}
.user-dropdown a:hover { background: var(--surface-2); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 16px; border-radius: var(--radius-sm); font-size: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .12s, background .2s, border-color .2s; font-weight: 600;
}
.btn:hover { text-decoration: none; background: var(--surface-2); border-color: var(--accent); }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent;
}
.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  filter: brightness(1.08);
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------------- 公告 ---------------- */
.announce {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--text); font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.announce .container { display: flex; align-items: center; gap: 8px; }
.announce::before { content: "📢"; }

/* ---------------- 三栏布局 ---------------- */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 20px;
  padding-top: 20px; padding-bottom: 40px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.left-sidebar {
  position: sticky; top: calc(var(--header-h) + 20px);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.main-content { min-width: 0; }

/* 左侧导航 */
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: var(--text); font-size: 15px; font-weight: 600;
  transition: background .2s, color .2s;
}
.side-nav a:hover { background: var(--surface-2); color: var(--accent); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); }
.sn-icon { width: 22px; text-align: center; font-size: 17px; }
.side-divider { height: 1px; background: var(--border); margin: 10px 4px; }
.side-title { padding: 8px 12px; font-size: 12px; color: var(--muted); font-weight: 700; }

/* 移动端抽屉遮罩 */
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 25;
}
.sidebar-overlay.open { display: block; }

/* ---------------- 主内容区 ---------------- */
.top-filter-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 16px; box-shadow: var(--shadow-card);
}
.top-filter-bar a {
  padding: 6px 14px; border-radius: var(--radius-sm); font-size: 14px; color: var(--muted); font-weight: 600;
  white-space: nowrap;
}
.top-filter-bar a:hover { color: var(--text); background: var(--surface-2); }
.top-filter-bar a.active { color: var(--accent); background: var(--accent-soft); }

/* Hero（横幅） */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(115deg, var(--c1), var(--c6) 42%, var(--c2));
  background-size: 200% 200%;
  border-radius: var(--radius); padding: 42px 28px; margin-bottom: 18px;
  color: #fff; box-shadow: var(--shadow);
  animation: heroMove 14s ease infinite;
}
@keyframes heroMove {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.hero h1 { margin: 0 0 8px; font-size: 28px; font-weight: 800; }
.hero p { margin: 0; opacity: .92; font-size: 15px; }

/* 内容网格：中间 + 右侧 */
.content-grid {
  display: grid; grid-template-columns: 1fr var(--right-w); gap: 20px; align-items: start;
}
.center-col { min-width: 0; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.section-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.section-head .more { font-size: 13px; color: var(--muted); }
.section-head .more:hover { color: var(--accent); }

/* 资讯头条 */
.headline-section { margin-bottom: 24px; }
.headline-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.headline-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 150px; padding: 16px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform .15s, box-shadow .2s;
}
.headline-card::before {
  content: ""; position: absolute; inset: 0; opacity: .08;
  background: linear-gradient(135deg, var(--card, var(--accent)), transparent 70%);
}
.headline-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.headline-card.cat-tech         { --card: var(--c1); }
.headline-card.cat-reading      { --card: var(--c2); }
.headline-card.cat-productivity { --card: var(--c3); }
.headline-card.cat-life         { --card: var(--c4); }
.headline-card.cat-hot          { --card: #ef4444; }
.hc-tag {
  position: absolute; top: 12px; left: 12px;
  font-size: 12px; font-weight: 700; color: #fff; padding: 3px 10px; border-radius: 999px;
  background: var(--card, var(--accent));
}
.headline-card h4 { margin: 0 0 6px; font-size: 15px; color: var(--text); line-height: 1.45; position: relative; }
.hc-meta { margin: 0; font-size: 12px; color: var(--muted); position: relative; }

/* 文章流 */
.feed-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card); }
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  display: grid; grid-template-columns: 160px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--text);
  transition: background .2s;
}
.post-card:first-child { padding-top: 0; }
.post-card:last-child { border-bottom: none; padding-bottom: 0; }
.post-card:hover { text-decoration: none; }
.post-card:hover h3 { color: var(--accent); }
.post-card.cat-tech         { --card: var(--c1); }
.post-card.cat-reading      { --card: var(--c2); }
.post-card.cat-productivity { --card: var(--c3); }
.post-card.cat-life         { --card: var(--c4); }
.post-card.cat-hot          { --card: #ef4444; }
.pc-thumb {
  position: relative; height: 100px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--card, var(--accent)), color-mix(in srgb, var(--card, var(--accent)) 50%, transparent));
}
.pc-thumb-tag {
  position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 999px;
}
.pc-body { display: flex; flex-direction: column; min-width: 0; }
.post-card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.45; color: var(--text); }
.post-card .excerpt { margin: 0 0 10px; color: var(--muted); font-size: 14px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.post-card .meta .author { color: var(--text); font-weight: 600; }
.post-card .meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }

/* ---------------- 首页积分榜 ---------------- */
.home-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-card); margin-bottom: 18px;
}
.leaderboard-section .section-head { align-items: flex-start; }
.my-rank {
  font-size: 13px; color: var(--muted); white-space: nowrap;
  background: var(--surface-2); padding: 6px 12px; border-radius: 999px;
}
.my-rank b { color: var(--accent); }
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: grid; grid-template-columns: 36px 40px 1fr auto auto;
  align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .12s;
}
.lb-row:hover { background: var(--surface); border-color: var(--border); transform: translateX(2px); }
.lb-rank {
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; font-size: 13px; font-weight: 800; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border);
}
.lb-avatar {
  width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--lc, var(--accent)) 22%, transparent);
}
.lb-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-user b { font-size: 14px; color: var(--text); }
.lb-stat { text-align: right; min-width: 60px; }
.lb-stat .lb-points { display: block; font-size: 16px; font-weight: 800; color: var(--accent); }
.lb-stat span { font-size: 12px; }
.lb-sign { display: block; }

/* 前三名 */
.lb-row.top-1 { background: linear-gradient(90deg, color-mix(in srgb, #fbbf24 14%, var(--surface-2)), var(--surface-2)); border-color: color-mix(in srgb, #fbbf24 40%, transparent); }
.lb-row.top-1 .lb-rank { background: #fbbf24; color: #fff; border-color: #fbbf24; }
.lb-row.top-2 { background: linear-gradient(90deg, color-mix(in srgb, #94a3b8 14%, var(--surface-2)), var(--surface-2)); border-color: color-mix(in srgb, #94a3b8 40%, transparent); }
.lb-row.top-2 .lb-rank { background: #94a3b8; color: #fff; border-color: #94a3b8; }
.lb-row.top-3 { background: linear-gradient(90deg, color-mix(in srgb, #f59e0b 14%, var(--surface-2)), var(--surface-2)); border-color: color-mix(in srgb, #f59e0b 40%, transparent); }
.lb-row.top-3 .lb-rank { background: #f59e0b; color: #fff; border-color: #f59e0b; }

/* ---------------- 右侧边栏 ---------------- */
.right-sidebar {
  display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: calc(var(--header-h) + 20px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.rs-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-card);
}
.rs-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; }

/* 用户卡 */
.user-card .uc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.uc-avatar {
  width: 48px; height: 48px; border-radius: 50%; color: #fff; font-size: 20px; font-weight: 700;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc, var(--accent)) 20%, transparent);
}
.uc-info { display: flex; flex-direction: column; gap: 4px; }
.uc-info b { font-size: 15px; }
.uc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 14px; }
.uc-stats b { display: block; font-size: 18px; color: var(--text); }
.uc-stats span { font-size: 12px; color: var(--muted); }
.uc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.uc-actions .btn { padding: 7px 0; }

/* 游客卡 */
.guest-card .gc-title { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.guest-card .btn { width: 100%; margin-top: 10px; }

/* 列表 */
.rs-list { list-style: none; margin: 0; padding: 0; }
.rs-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rs-list li:last-child { border-bottom: none; }
.rs-list a { color: var(--text); font-size: 14px; line-height: 1.45; }
.rs-list a:hover { color: var(--accent); }
.rs-list .rank {
  width: 18px; height: 18px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 4px;
  flex: none;
}
.rs-list .rank.top { color: #fff; background: var(--accent); }

/* 标签 */
.rs-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-tag {
  font-size: 13px; color: var(--muted); background: var(--surface-2);
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border);
}
.rs-tag:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

/* ---------------- 签到提示 ---------------- */
.sign-prompt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--accent-2) 12%, var(--surface)));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px;
}
.sign-prompt strong { display: block; font-size: 15px; }
.sign-form { display: flex; align-items: center; gap: 8px; }

.sign-card {
  max-width: 520px; margin: 10px auto 40px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-card);
}
.sign-card .sign-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.sign-card .sign-stat div { padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.sign-card .sign-stat b { display: block; font-size: 28px; color: var(--accent); }
.sign-card .sign-stat span { font-size: 12px; color: var(--muted); }
.sign-card .hint { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ---------------- 通用页面 ---------------- */
.page-title { font-size: 24px; margin: 0 0 16px; font-weight: 800; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.loading { text-align: center; color: var(--muted); padding: 48px 0; }

/* 文章详情 */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }
.article .post-meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.article h1 { font-size: clamp(22px, 4vw, 30px); margin: 0 0 18px; line-height: 1.35; font-weight: 800; }
.article .content { font-size: 16px; }
.article .content h2 { font-size: 22px; margin: 28px 0 12px; }
.article .content h3 { font-size: 18px; margin: 22px 0 10px; }
.article .content p { margin: 0 0 16px; }
.article .content ul, .article .content ol { margin: 0 0 16px; padding-left: 22px; }
.article .content li { margin: 6px 0; }
.article .content blockquote { margin: 18px 0; padding: 12px 18px; border-left: 4px solid var(--accent);
  background: var(--surface-2); color: var(--muted); border-radius: 0 10px 10px 0; }
.article .content code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: 14px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.article .content pre { background: #0f1117; color: #e6e8f0; padding: 16px; border-radius: 12px; overflow-x: auto; margin: 16px 0; border: 1px solid #23263a; }
.article .content pre code { background: none; padding: 0; color: inherit; }
.article .content img { max-width: 100%; border-radius: 12px; }
.article .content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.article .content a:hover { text-decoration: none; }
.article .content hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.article .content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; }
.article .content th, .article .content td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.article .content th { background: var(--surface-2); }

/* 评论 */
.comments { max-width: 760px; margin-top: 24px; }
.comments h3 { font-size: 18px; }
.comments textarea { width: 100%; padding: 11px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 14px; resize: vertical; }
.comments textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.comment-list { list-style: none; padding: 0; margin: 14px 0 0; }
.comment-list li { padding: 14px; border-bottom: 1px dashed var(--border); background: var(--surface); border-radius: var(--radius); margin-bottom: 10px; }
.comment-list li p { margin: 4px 0 0; }

/* 认证框 */
.auth-box {
  max-width: 420px; margin: 40px auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.auth-box h1 { font-size: 22px; margin: 0 0 18px; }
.auth-box label, .form-grid label { display: block; font-size: 14px; margin-bottom: 14px; font-weight: 600; }
.auth-box input, .form-grid input, .form-grid textarea, .form-grid select {
  width: 100%; margin-top: 6px; padding: 10px 13px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.auth-box input:focus, .form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.error { color: #ef4444; background: #fef2f2; border: 1px solid #fecaca; padding: 9px 13px; border-radius: var(--radius); font-size: 14px; }
.success { color: #10b981; background: #ecfdf5; border: 1px solid #a7f3d0; padding: 9px 13px; border-radius: var(--radius); font-size: 14px; }

/* 关于 / 友链 */
.about { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }
.about .content { font-size: 16px; }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.fl-card {
  display: block; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-card); color: var(--text);
  transition: transform .15s, box-shadow .2s;
}
.fl-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.fl-card span { display: block; margin-top: 6px; font-size: 13px; }

/* 搜索页 */
.search-page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.search-bar input { flex: 1; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text); font-size: 14px; }
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* 积分商品 */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 18px 0; }
.product-card {
  position: relative; padding: 16px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-card); transition: transform .15s, box-shadow .2s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card .pc-head { display: flex; justify-content: space-between; align-items: center; }
.product-card .pc-cost {
  font-weight: 800; color: var(--accent); background: var(--accent-soft);
  padding: 3px 11px; border-radius: 999px; font-size: 13px;
}
.product-card h3 { margin: 0; font-size: 16px; }
.product-card .pc-desc { margin: 0; color: var(--muted); font-size: 14px; flex: 1; line-height: 1.6; }
.product-card.owned { border-color: var(--c5); }
.pc-cover {
  width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; margin-bottom: 4px;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: var(--shadow-card);
}
.pc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-cover-ph { width: 100%; height: 100%; display: grid; place-items: center; }
.pc-cover-ph::after { content: "🎁"; font-size: 30px; opacity: .9; }
.my-products { margin-top: 24px; }
.my-products h2 { font-size: 18px; margin: 0 0 14px; }

/* 投稿 / 我的投稿 */
.submit-box {
  max-width: 660px; margin: 8px auto 36px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card);
}
.submit-box label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.submit-box input, .submit-box textarea, .submit-box select {
  width: 100%; margin-top: 6px; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text); font-family: inherit; font-size: 14px;
}
.submit-box input:focus, .submit-box textarea:focus, .submit-box select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.submit-box .hint { font-size: 13px; color: var(--muted); margin: -6px 0 12px; }
.locked-note {
  max-width: 560px; margin: 30px auto; text-align: center; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card); color: var(--muted);
}
.locked-note b { color: var(--accent); }
.mypost {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow-card); margin-bottom: 12px;
}
.mypost .mt { font-size: 15px; font-weight: 700; }
.mypost .ms { font-size: 12px; color: var(--muted); }
.st-badge { font-size: 12px; font-weight: 700; padding: 2px 11px; border-radius: 999px; white-space: nowrap; }
.st-pending   { background: #fef3c7; color: #b45309; }
.st-published { background: #dcfce7; color: #15803d; }
.st-draft     { background: #e5e7eb; color: #374151; }

/* 等级徽章 */
.lv-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700;
  color: #fff; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--lc, #94a3b8);
}

/* 页脚 */
.site-footer { border-top: 1px solid var(--border);
  padding: 28px 0; text-align: center; font-size: 13px; color: var(--muted); background: var(--surface); }
.site-footer p { margin: 4px 0; }
.site-footer .fl a { margin: 0 6px; color: var(--accent); }
.site-footer .beian a { color: var(--accent); margin: 0 4px; }

/* 背景切换器 */
.bg-switch { position: fixed; right: 18px; bottom: 18px; z-index: 40; }
.bg-switch-btn {
  width: 46px; height: 46px; border: none; cursor: pointer; font-size: 20px; color: #fff;
  border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform .15s;
}
.bg-switch-btn:hover { transform: scale(1.08) rotate(-8deg); }
.bg-switch-panel {
  position: absolute; right: 0; bottom: 56px; width: 172px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; box-shadow: var(--shadow); display: none; flex-direction: column; gap: 8px;
}
.bg-switch.open .bg-switch-panel { display: flex; }
.bg-switch-title { font-size: 12px; font-weight: 700; color: var(--muted); }
.bg-opt {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; cursor: pointer;
  border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--surface-2);
  font-size: 14px; color: var(--text); transition: border-color .2s, transform .15s;
}
.bg-opt:hover { transform: translateX(2px); border-color: var(--accent); }
.bg-opt.active { border-color: var(--accent); background: var(--accent-soft); }
.bg-dot { width: 18px; height: 18px; border-radius: 6px; display: inline-block; flex: none; }
.bg-dot.bg-starry { background: radial-gradient(circle at 30% 30%, #2a3570, #05060f); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.bg-dot.bg-aurora { background: linear-gradient(135deg, var(--c1), var(--c2)); }
.bg-dot.bg-light  { background: linear-gradient(135deg, #e6eaf6, #ffffff); }
.bg-dot.bg-dark   { background: linear-gradient(135deg, #1b1e34, #0a0b16); }

/* 星空背景增强（仅在 bg-starry 显示） */
.cosmos { position: fixed; inset: 0; z-index: -1; pointer-events: none; display: none; }
body.bg-starry .cosmos { display: block; }
.cosmos .nebula {
  position: absolute; inset: -22vmax; filter: blur(22px); opacity: .85;
  background:
    radial-gradient(34vmax 34vmax at 18% 22%, rgba(99,102,241,.40), transparent 60%),
    radial-gradient(28vmax 28vmax at 82% 16%, rgba(236,72,153,.30), transparent 60%),
    radial-gradient(40vmax 40vmax at 66% 82%, rgba(6,182,212,.26), transparent 60%),
    radial-gradient(24vmax 24vmax at 34% 72%, rgba(139,92,246,.34), transparent 60%),
    radial-gradient(20vmax 20vmax at 50% 45%, rgba(168,85,247,.18), transparent 55%);
  animation: nebulaDrift 30s ease-in-out infinite alternate;
}
@keyframes nebulaDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(2.5vmax,-2vmax,0) scale(1.12); }
}
.cosmos .constellation { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .8; }
.cosmos .clines line { stroke-dasharray: 3 4; animation: clineFlow 6s linear infinite; }
@keyframes clineFlow { to { stroke-dashoffset: -28; } }
.cosmos .cstar { animation: cstar 3.4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.cosmos .cstar:nth-child(2n)   { animation-delay: .6s; animation-duration: 2.8s; }
.cosmos .cstar:nth-child(3n)   { animation-delay: 1.2s; animation-duration: 4.1s; }
.cosmos .cstar:nth-child(4n)   { animation-delay: 1.8s; animation-duration: 3.1s; }
@keyframes cstar { from { opacity: .35; } to { opacity: 1; } }

/* 流星雨（首页独立层） */
.meteor-shower {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  opacity: .95;
}
body.mode-light .meteor-shower,
body.bg-light .meteor-shower { opacity: .72; }
.meteor {
  position: absolute;
  width: 160px; height: 2.5px;
  background: linear-gradient(90deg, rgba(255,255,255,1), rgba(255,255,255,.45) 50%, rgba(255,255,255,.08) 85%, transparent);
  border-radius: 2px;
  --m-angle: -35deg;
  transform: rotate(var(--m-angle)) translate3d(0,0,0);
  opacity: 0;
  animation: meteor-fall linear infinite;
  box-shadow: 0 0 12px 2px rgba(255,255,255,.55);
  will-change: transform, opacity;
}
.meteor::before {
  content: ""; position: absolute; left: -1px; top: -2.5px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 14px 3px rgba(255,255,255,.95), 0 0 26px 6px rgba(255,255,255,.35);
}
@keyframes meteor-fall {
  0%   { transform: rotate(var(--m-angle)) translate3d(60px,-60px,0); opacity: 0; }
  6%   { opacity: 1; }
  88%  { opacity: .65; }
  100% { transform: rotate(var(--m-angle)) translate3d(-520px, 520px, 0); opacity: 0; }
}

body.bg-starry {
  --bg: #05060f; --surface: rgba(20,24,48,.78); --surface-2: rgba(30,36,70,.6);
  --text: #e8ecff; --muted: #9aa3c7; --border: rgba(120,130,200,.28);
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.55);
  background: radial-gradient(130% 120% at 50% -10%, #131a44 0%, #080a1c 55%, #04050d 100%);
}
body.bg-starry .site-header,
body.bg-starry .feed-section,
body.bg-starry .article,
body.bg-starry .rs-card,
body.bg-starry .headline-card,
body.bg-starry .about,
body.bg-starry .search-page,
body.bg-starry .submit-box,
body.bg-starry .mypost,
body.bg-starry .product-card,
body.bg-starry .auth-box,
body.bg-starry .sign-card,
body.bg-starry .locked-note,
body.bg-starry .comments li,
body.bg-starry .top-filter-bar,
body.bg-starry .home-card { background: var(--surface); }

body.bg-aurora::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 12% 8%, color-mix(in srgb, var(--c1) 22%, transparent), transparent 60%),
    radial-gradient(34vmax 34vmax at 88% 18%, color-mix(in srgb, var(--c2) 18%, transparent), transparent 60%),
    radial-gradient(40vmax 40vmax at 70% 92%, color-mix(in srgb, var(--c3) 16%, transparent), transparent 60%);
  filter: blur(8px); opacity: .9;
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(2vmax,-2vmax,0) scale(1.08); }
}
body.bg-aurora .site-header,
body.bg-aurora .feed-section,
body.bg-aurora .article,
body.bg-aurora .rs-card,
body.bg-aurora .headline-card,
body.bg-aurora .about,
body.bg-aurora .search-page,
body.bg-aurora .submit-box,
body.bg-aurora .mypost,
body.bg-aurora .product-card,
body.bg-aurora .auth-box,
body.bg-aurora .sign-card,
body.bg-aurora .locked-note,
body.bg-aurora .comments li,
body.bg-aurora .top-filter-bar,
body.bg-aurora .home-card { background: var(--surface); }

body.bg-light { background: var(--bg); }
body.bg-light::before { display: none; }
body.bg-dark { background: var(--bg); }
body.bg-dark::before { display: none; }

/* ---------------- H5 响应式 ---------------- */
@media (max-width: 1100px) {
  .app-layout { grid-template-columns: var(--sidebar-w) 1fr; }
  .right-sidebar { display: none; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .app-layout { grid-template-columns: 1fr; padding-top: 14px; }
  .left-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 35;
    background: var(--surface); border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform .25s ease;
    padding: 16px; max-height: none;
  }
  .left-sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .header-search { max-width: 280px; }
  .top-quick-nav { display: none; }
  .headline-grid { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 120px 1fr; gap: 12px; }
  .pc-thumb { height: 80px; }
  .leaderboard-section .section-head { flex-direction: column; gap: 10px; }
  .my-rank { white-space: normal; }
}
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .header-inner { gap: 10px; }
  .brand-text { display: none; }
  .header-search { max-width: 160px; }
  .header-search input { padding-left: 10px; }
  .header-right .btn:not(.btn-create) { padding: 6px 10px; font-size: 12px; }
  .btn-create span { display: none; }
  .btn-create { padding: 6px 10px; }
  .user-dropdown { right: -40px; }
  .hero { padding: 28px 18px; }
  .hero h1 { font-size: 22px; }
  .post-card { grid-template-columns: 1fr; }
  .pc-thumb { height: 120px; }
  .sign-prompt { flex-direction: column; align-items: flex-start; }
  .lb-row { grid-template-columns: 28px 32px 1fr auto; gap: 8px; padding: 8px; }
  .lb-sign { display: none; }
  .lb-rank { width: 22px; height: 22px; font-size: 12px; }
  .lb-avatar { width: 30px; height: 30px; font-size: 12px; }
  .lb-user b { font-size: 13px; }
  .home-card { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   首页高端化 v4：Hero + Podium + 玻璃卡片 + 快速入口
   ========================================================= */

/* 玻璃拟态 */
.glass {
  background: color-mix(in srgb, var(--surface) 78%, transparent) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}

/* 大号按钮 / 幽灵按钮 */
.btn-lg { padding: 11px 24px; font-size: 15px; border-radius: 10px; }
.btn-ghost {
  background: color-mix(in srgb, #fff 14%, transparent);
  border-color: color-mix(in srgb, #fff 34%, transparent);
  color: #fff;
}
.btn-ghost:hover { background: color-mix(in srgb, #fff 24%, transparent); border-color: #fff; }

/* Hero 横幅 */
.home-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr .9fr; gap: 28px; align-items: center;
  padding: 44px 40px; margin-bottom: 20px; border-radius: 18px;
  background:
    radial-gradient(60% 120% at 90% 10%, color-mix(in srgb, var(--accent-2) 28%, transparent), transparent 60%),
    radial-gradient(50% 100% at 10% 90%, color-mix(in srgb, var(--c3) 22%, transparent), transparent 55%),
    linear-gradient(115deg, var(--accent), var(--c6) 42%, var(--accent-2));
  background-size: 200% 200%;
  color: #fff; box-shadow: var(--shadow);
  animation: heroMove 16s ease infinite;
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
}
.home-hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: .7; pointer-events: none;
}
@keyframes heroMove {
  0%,100% { background-position: 0% 50%, 0% 50%, 0% 50%; }
  50%     { background-position: 100% 50%, 100% 50%, 100% 50%; }
}
.hero-text { position: relative; z-index: 1; }
.hero-tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
  background: color-mix(in srgb, #fff 18%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  color: #fff;
}
.hero-text h1 { margin: 0 0 12px; font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; line-height: 1.15; }
.hero-highlight { background: linear-gradient(90deg, #fff 0%, #fde68a 50%, #fff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-desc { margin: 0 0 22px; font-size: 16px; opacity: .9; max-width: 460px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; }
.hero-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.hs-item {
  padding: 18px; border-radius: 14px; text-align: center;
  background: color-mix(in srgb, #fff 12%, transparent);
  border: 1px solid color-mix(in srgb, #fff 16%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .15s, background .2s;
}
.hs-item:hover { transform: translateY(-3px); background: color-mix(in srgb, #fff 18%, transparent); }
.hs-item b { display: block; font-size: 28px; font-weight: 800; }
.hs-item span { font-size: 13px; opacity: .85; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hb {
  font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, #fff 14%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, transparent);
  color: #fff;
}

/* 快速入口 */
.quick-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px;
}
.qa-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); color: var(--text);
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.qa-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.qa-icon { font-size: 26px; }
.qa-title { font-size: 15px; font-weight: 800; }
.qa-desc { font-size: 12px; color: var(--muted); }
.qa-1 { background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 10%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--c1) 30%, var(--border)); }
.qa-2 { background: linear-gradient(135deg, color-mix(in srgb, var(--c2) 10%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--c2) 30%, var(--border)); }
.qa-3 { background: linear-gradient(135deg, color-mix(in srgb, var(--c3) 10%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--c3) 30%, var(--border)); }
.qa-4 { background: linear-gradient(135deg, color-mix(in srgb, var(--c4) 10%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--c4) 30%, var(--border)); }

/* 首页卡片增强 */
.home-card {
  border-radius: 16px; padding: 22px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); margin-bottom: 20px;
}
.section-head { margin-bottom: 18px; }
.section-head h3 { font-size: 19px; }

/* 领奖台 */
.podium {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 22px; align-items: end;
}
.podium-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 12px 14px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: transform .15s, box-shadow .2s;
}
.podium-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.podium-item.rank-1 { background: linear-gradient(180deg, color-mix(in srgb, #fbbf24 18%, var(--surface)), var(--surface-2)); border-color: color-mix(in srgb, #fbbf24 45%, var(--border)); padding-top: 24px; }
.podium-item.rank-2 { background: linear-gradient(180deg, color-mix(in srgb, #94a3b8 16%, var(--surface)), var(--surface-2)); border-color: color-mix(in srgb, #94a3b8 40%, var(--border)); }
.podium-item.rank-3 { background: linear-gradient(180deg, color-mix(in srgb, #f59e0b 16%, var(--surface)), var(--surface-2)); border-color: color-mix(in srgb, #f59e0b 40%, var(--border)); }
.podium-ring { position: relative; }
.podium-avatar {
  width: 58px; height: 58px; border-radius: 50%; color: #fff; font-size: 22px; font-weight: 700;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc, var(--accent)) 22%, transparent);
}
.podium-rank {
  position: absolute; bottom: -4px; right: -4px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff;
  background: var(--accent); border: 2px solid var(--surface);
}
.podium-item.rank-1 .podium-rank { background: #fbbf24; }
.podium-item.rank-2 .podium-rank { background: #94a3b8; }
.podium-item.rank-3 .podium-rank { background: #f59e0b; }
.podium-info { text-align: center; }
.podium-name { font-size: 15px; font-weight: 800; }
.podium-level { font-size: 12px; color: var(--muted); margin-top: 2px; }
.podium-points { font-size: 18px; font-weight: 800; color: var(--accent); margin-top: 6px; }
.podium-bar {
  width: 100%; height: 6px; border-radius: 999px; margin-top: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .35;
}
.podium-item.rank-1 .podium-bar { opacity: .7; height: 10px; }
.podium-item.rank-2 .podium-bar { opacity: .5; height: 7px; }
.podium-item.rank-3 .podium-bar { opacity: .5; height: 7px; }

/* 积分榜列表微调 */
.leaderboard-section .section-head { align-items: center; }
.my-rank { font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); }

/* 商品卡增强（仅首页商城区块） */
.shop-section .product-grid { margin: 0; }
.shop-section .product-card {
  position: relative; overflow: hidden;
  padding: 0; display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-card);
  transition: transform .15s, box-shadow .2s;
}
.shop-section .product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.shop-section .product-card .pc-cover {
  position: relative; aspect-ratio: 16 / 9; margin: 0; border-radius: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
}
.shop-section .pc-cover-ph { width: 100%; height: 100%; display: grid; place-items: center; }
.shop-section .pc-cover-ph span { font-size: 40px; }
.shop-section .pc-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 12px; font-weight: 800; color: #fff;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(4px);
}
.shop-section .product-card .pc-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.shop-section .product-card .pc-body h3 { font-size: 16px; margin: 0; }
.shop-section .product-card .pc-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.shop-section .product-card .btn {
  width: 100%; margin-top: auto;
  color: var(--text); background: var(--surface); border-color: var(--border);
}
.shop-section .product-card .btn-primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.shop-section .product-card .btn-primary:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  filter: brightness(1.08);
}
.shop-section .product-card.owned { border-color: var(--c5); }

/* 百度热搜 */
.hot-news-list {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-card);
}
.hot-news-item {
  display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--text); background: var(--surface-2); border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .12s;
}
.hot-news-item:hover {
  text-decoration: none; background: var(--surface); border-color: var(--border); transform: translateX(3px);
}
.hn-rank {
  width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--muted); background: var(--surface); border-radius: 6px; border: 1px solid var(--border);
}
.hn-rank.top { color: #fff; background: var(--accent); border-color: var(--accent); }
.hn-title { font-size: 15px; font-weight: 600; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-heat { font-size: 12px; color: var(--accent); font-weight: 700; background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.hn-arrow { font-size: 13px; color: var(--muted); }
.hot-news-item:hover .hn-arrow { color: var(--accent); }

/* 推荐文章 */
.feed-section .post-list { gap: 0; }

/* 公告卡片 */
.notice-card .notice-text { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text); }

/* 深色模式下的 Hero 与快速入口 */
body.mode-dark .home-hero,
body.bg-dark .home-hero,
body.bg-starry .home-hero {
  border-color: color-mix(in srgb, #fff 12%, transparent);
}
body.mode-dark .qa-card,
body.bg-dark .qa-card,
body.bg-starry .qa-card { background: var(--surface); }

/* 响应式 */
@media (max-width: 1100px) {
  .home-hero { grid-template-columns: 1fr; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 420px; margin: 0 auto; width: 100%; }
}
@media (max-width: 860px) {
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .podium { gap: 10px; }
  .podium-avatar { width: 48px; height: 48px; font-size: 18px; }
  .podium-name { font-size: 13px; }
}
@media (max-width: 640px) {
  .home-hero { padding: 28px 20px; border-radius: 14px; }
  .hero-text h1 { font-size: 28px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hs-item { padding: 14px; }
  .hs-item b { font-size: 22px; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .qa-card { padding: 14px; }
  .podium { grid-template-columns: 1fr; }
  .podium-item.rank-2, .podium-item.rank-3 { display: none; }
  .podium-item.rank-1 { padding-top: 18px; }
  .home-card { padding: 16px; border-radius: 14px; }
}
