/* ============================================================
   论坛之家 · 全站设计系统（温润赤陶暖杏）
   提取自设计参考稿，全站统一引用
   ============================================================ */

/* ---------- 本地自托管字体：Plus Jakarta Sans（可变字重 · latin 子集 · 单文件 27KB） ----------
   设计要点：
   - 只用它承担「拉丁字母 / 数字 / 标点」，中文全部交给系统字体（苹方 / 微软雅黑）
   - 该字体是可变字体，200-800 全字重共用同一个 woff2，所以只放一个文件
   - 同域加载 → 走 CF 缓存，无第三方请求，国内无阻塞、无 FOUT 延迟
   - font-display: swap 保证字体未就绪时先用系统字体渲染，绝不白屏 */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/PlusJakartaSans-Variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Terracotta & Warm Amber (温润赤陶与暖杏赭石) */
  --bg-page: #fbf8f5;
  --surface: #ffffff;
  --surface-subtle: #f8f4ee;
  --surface-hover: #fbf7f2;
  --surface-sunken: #faf6f1;

  /* Warm Espresso & Charcoal Text Hierarchy */
  --ink-primary: #1c1917;
  --ink-secondary: #44403c;
  --ink-tertiary: #78716c;
  --ink-muted: #a8a29e;

  /* Terracotta & Warm Amber Accents */
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --accent-light: #fff7ed;
  --accent-light-border: #fed7aa;
  --accent-border: rgba(194, 65, 12, 0.22);
  --accent-glow: rgba(194, 65, 12, 0.18);
  --accent-gradient: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  --accent-warm-secondary: #d97706;

  /* Warm Sand Borders & Subtle Dividers */
  --border-light: #ede7de;
  --border-subtle: #e2dad0;

  /* Warm-tinted diffused shadows */
  --shadow-xs: 0 1px 2px rgba(68, 45, 30, 0.03);
  --shadow-card: 0 1px 3px rgba(68, 45, 30, 0.04), 0 4px 14px rgba(68, 45, 30, 0.035);
  --shadow-card-hover: 0 10px 25px -4px rgba(194, 65, 12, 0.12), 0 4px 12px -2px rgba(68, 45, 30, 0.05);
  --shadow-popover: 0 12px 32px -4px rgba(41, 27, 21, 0.12), 0 0 0 1px rgba(68, 45, 30, 0.04);

  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-full: 9999px;

  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 深色主题（静谧深咖）：左栏卡片切换，localStorage 记忆，全站生效 ---------- */
:root[data-theme="dark"] {
  --bg-page: #17130f;
  --surface: #211b15;
  --surface-subtle: #272019;
  --surface-hover: #2c241c;
  --surface-sunken: #1d1712;

  --ink-primary: #f3ede5;
  --ink-secondary: #d3c9bd;
  --ink-tertiary: #a3988a;
  --ink-muted: #7a6f62;

  --accent: #e8793a;
  --accent-hover: #f08a50;
  --accent-light: #2d1e12;
  --accent-light-border: #4d321b;
  --accent-border: rgba(232, 121, 58, 0.3);
  --accent-glow: rgba(232, 121, 58, 0.2);

  --border-light: #2f2820;
  --border-subtle: #3b3128;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 14px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 10px 25px -4px rgba(232, 121, 58, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.3);
  --shadow-popover: 0 12px 32px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* 深色下 body 的暖光渐变换成炭底微光 */
:root[data-theme="dark"] body {
  background-color: #17130f;
  background-image:
    radial-gradient(at 15% 10%, rgba(232, 121, 58, 0.07) 0px, transparent 50%),
    radial-gradient(at 85% 8%, rgba(217, 119, 6, 0.05) 0px, transparent 45%),
    radial-gradient(at 50% 90%, rgba(194, 65, 12, 0.04) 0px, transparent 60%);
}

/* 深色下毛玻璃顶栏换深底 */
:root[data-theme="dark"] .site-header-wrapper {
  background: rgba(24, 19, 15, 0.88);
  border-bottom-color: #2f2820;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  cursor: url('/images/cursor.cur'), auto;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(at 15% 10%, rgba(254, 215, 170, 0.25) 0px, transparent 50%),
    radial-gradient(at 85% 8%, rgba(253, 186, 116, 0.18) 0px, transparent 45%),
    radial-gradient(at 50% 90%, rgba(251, 146, 60, 0.08) 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--ink-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ------------------------------------------------------------
   全站自定义滚动条（细条 + 暖色，深色模式同步；hover 品牌橙）
   Firefox 用 scrollbar-width/scrollbar-color；WebKit 用 ::-webkit-*
   ------------------------------------------------------------ */
html {
  scrollbar-width: thin;
  scrollbar-color: #d6cfc7 transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: #d6cfc7;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: #c2410c; }
::-webkit-scrollbar-corner { background: transparent; }

/* 深色模式滚动条 */
:root[data-theme="dark"] {
  scrollbar-color: #3b3128 transparent;
}
:root[data-theme="dark"] ::-webkit-scrollbar-thumb { background-color: #3b3128; }
:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background-color: #e8793a; }

/* 横向溢出保险：clip 不产生滚动容器（不影响 sticky），只裁掉意外横滚 */
html, body { overflow-x: hidden; overflow-x: clip; }

/* 文本输入区域恢复默认光标（自定义箭头指针不适合输入场景） */
input, textarea, select, [contenteditable="true"] {
  cursor: auto;
}

/* 文本选择 */
::selection {
  background-color: rgba(194, 65, 12, 0.18);
}

/* ---------------- Topbar（毛玻璃顶栏） ---------------- */
.site-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #eee8df;
}

.site-topbar {
  max-width: 1500px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.35);
  font-weight: 800;
  font-size: 19px;
  overflow: hidden;
}
.brand-logo-icon img { width: 100%; height: 100%; object-fit: cover; }

.brand-text { display: flex; flex-direction: column; }

.brand-title {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.2;
}

.brand-pill {
  font-size: 9.5px;
  padding: 1.5px 7px;
  border-radius: var(--radius-full);
  background: #fff7ed;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid var(--accent-light-border);
}

.brand-tagline {
  font-size: 11.5px;
  color: var(--ink-tertiary);
  font-weight: 400;
  margin-top: 2px;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.btn-new-post {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(194, 65, 12, 0.32);
  transition: var(--transition);
}

.btn-new-post:hover {
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(194, 65, 12, 0.42);
}

.btn-icon-subtle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  position: relative;
  border: 1px solid var(--border-light);
  background: var(--surface);
  transition: var(--transition);
  text-decoration: none;
}

.btn-icon-subtle:hover {
  background: var(--surface-subtle);
  color: var(--accent);
  border-color: var(--accent-light-border);
}

.notify-ping {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: var(--radius-full);
  background: #ea580c;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  display: none;
}
.notify-ping.show { display: block; }

/* ---------- 通知悬浮卡片（铃铛点击弹出，全站通用） ---------- */
.notify-panel {
  position: fixed;
  z-index: 900;
  width: min(360px, calc(100vw - 24px));
  max-height: min(480px, calc(100vh - 100px));
  display: none;
  flex-direction: column;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border-light, #ede7de);
  border-radius: 14px;
  box-shadow: 0 16px 40px -6px rgba(41, 27, 21, 0.16), 0 0 0 1px rgba(68, 45, 30, 0.04);
  overflow: hidden;
  animation: notifyPanelIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.notify-panel.show { display: flex; }
@keyframes notifyPanelIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notify-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light, #ede7de);
  flex: none;
}
.notify-panel-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-primary, #1c1917);
  display: flex;
  align-items: center;
  gap: 7px;
}
.notify-unread-chip {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full, 9999px);
  background: #ea580c;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.notify-unread-chip.zero { display: none; }
.notify-mark-all {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #c2410c);
  padding: 4px 6px;
  border-radius: 8px;
  transition: var(--transition, all 0.2s ease);
}
.notify-mark-all:hover { background: var(--surface-subtle, #f8f4ee); }
.notify-mark-all:disabled { color: var(--ink-muted, #a8a29e); cursor: default; background: none; }

.notify-list { overflow-y: auto; flex: 1; }
.notify-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light, #ede7de);
  transition: background 0.15s ease;
  position: relative;
}
.notify-item:last-child { border-bottom: none; }
.notify-item:hover { background: var(--surface-hover, #fbf7f2); }
.notify-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ea580c;
  flex: none;
  margin-top: 6px;
  opacity: 0;
}
.notify-item.unread .notify-item-dot { opacity: 1; }
.notify-item-body { flex: 1; min-width: 0; }
.notify-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary, #44403c);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notify-item.unread .notify-item-title { color: var(--ink-primary, #1c1917); font-weight: 700; }
.notify-item-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--ink-muted, #a8a29e);
  display: flex;
  align-items: center;
  gap: 6px;
}
.notify-item-type { color: var(--accent, #c2410c); }

.notify-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-muted, #a8a29e);
  font-size: 13px;
}
.notify-empty .notify-empty-icon { font-size: 30px; display: block; margin-bottom: 10px; opacity: 0.6; }

.notify-panel-foot {
  flex: none;
  padding: 10px 16px;
  border-top: 1px solid var(--border-light, #ede7de);
  text-align: center;
}
.notify-load-more {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent, #c2410c);
  padding: 4px 14px;
  border-radius: var(--radius-full, 9999px);
  transition: var(--transition, all 0.2s ease);
}
.notify-load-more:hover { background: var(--surface-subtle, #f8f4ee); }
.notify-load-more:disabled { color: var(--ink-muted, #a8a29e); cursor: default; background: none; }

/* 通知详情模态框补充（复用 .trae-modal-* 基础样式） */
.trae-modal-box.notify-detail { max-width: 420px; text-align: left; }
.notify-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.notify-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff7ed;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: none;
}
.notify-detail-type { font-size: 12px; font-weight: 700; color: var(--accent, #c2410c); }
.notify-detail-time { font-size: 11px; color: var(--ink-muted, #a8a29e); margin-top: 2px; }
.notify-detail-title { font-size: 15px; font-weight: 700; color: var(--ink-primary, #1c1917); line-height: 1.6; margin-bottom: 10px; word-break: break-word; }
.notify-detail-tip { font-size: 12px; color: var(--ink-muted, #a8a29e); line-height: 1.7; padding: 10px 12px; background: var(--surface-subtle, #f8f4ee); border-radius: 10px; word-break: break-word; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 12px 3px 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.user-chip:hover {
  border-color: #d7cdbf;
  box-shadow: var(--shadow-xs);
}

.user-chip-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffedd5;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
  object-fit: cover;
}
.user-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-chip-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popover);
  padding: 6px;
  display: none;
  z-index: 150;
}

.user-dropdown.show { display: block; }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8.5px 12px;
  font-size: 13px;
  border-radius: 8px;
  color: var(--ink-secondary);
  font-weight: 500;
  transition: var(--transition);
}
.user-dropdown a:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.login-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
  transition: var(--transition);
}
.login-chip:hover {
  border-color: var(--accent-light-border);
  background: var(--accent-light);
}

/* ---------------- 三栏布局 ---------------- */
.layout-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 32px 60px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 276px;
  gap: 24px;
  align-items: start;
}

/* ---------------- 超宽屏适配（2K/4K/8K 逐级放宽容器） ----------------
   普通屏（≤1600px）维持 1500px 上限不变；顶栏 .site-topbar 同步放宽保持对齐 */
@media (min-width: 1600px) {
  .layout-container, .site-topbar { max-width: 1660px; }
}
@media (min-width: 2000px) {
  .layout-container, .site-topbar { max-width: 1920px; }
}
@media (min-width: 2560px) {
  .layout-container, .site-topbar { max-width: 2320px; }
}
@media (min-width: 3840px) {
  /* 4K/8K 超大屏：流式铺满 92% 视宽，不再封顶 */
  .layout-container { max-width: none; width: 92vw; }
  .site-topbar { max-width: none; width: 92vw; }
}

.layout-container.two-col { grid-template-columns: 216px minmax(0, 1fr); }

.card-box {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ---------------- 左侧栏 ---------------- */
.left-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-menu-box { padding: 8px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  color: var(--ink-tertiary);
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-link:hover { background: var(--surface-subtle); color: var(--ink-primary); }
.nav-link:hover svg { color: var(--accent); }

.nav-link.active { background: #ffedd5; color: var(--accent); font-weight: 600; }
.nav-link.active svg { color: var(--accent); }

.nav-counter {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: var(--radius-full);
  background: #fed7aa;
  color: var(--accent);
  line-height: 1.2;
}

.topics-box { padding: 16px 18px; }

.sidebar-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sidebar-block-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-block-title svg { color: var(--accent); }

.tag-cloud-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.tag-pill:hover {
  background: #ffedd5;
  border-color: #fed7aa;
  color: var(--accent);
}

.tag-pill.active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.28);
}

/* 站点信息（参考稿 sidebar-footer：左栏侧边底部） */
.sidebar-footer {
  padding: 4px 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 11.5px;
  color: var(--ink-tertiary);
}
.sidebar-footer-links a:hover { color: var(--accent); }
.sidebar-footer-links span { color: var(--border-subtle); }

.sidebar-copyright {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ---------------- 中栏 ---------------- */
.center-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

/* Hero 装饰轮播 */
.hero-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 280px;
  box-shadow: var(--shadow-card);
  background: #1c130e;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}
.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.88);
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 19, 14, 0.95) 0%, rgba(67, 30, 16, 0.82) 50%, rgba(194, 65, 12, 0.28) 100%);
}

.hero-inner-content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 46px;
  max-width: 620px;
  color: #ffffff;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(254, 215, 170, 0.22);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(254, 215, 170, 0.35);
  font-size: 11.5px;
  font-weight: 600;
  color: #ffedd5;
  margin-bottom: 12px;
}

.hero-inner-content h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.4px;
  margin-bottom: 10px;
  color: #ffffff;
}

.hero-inner-content p {
  font-size: 13.5px;
  color: #fed7aa;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-bullets {
  position: absolute;
  left: 46px;
  bottom: 22px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 7px;
}

.bullet {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: var(--transition);
}
.bullet.active { width: 26px; background: #fed7aa; }

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 20px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-counter-num {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.5px;
}

.hero-arrow-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.hero-arrow-btn:hover { background: rgba(255, 255, 255, 0.35); }

/* 标签页筛选条 */
.tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.tab-group {
  display: flex;
  align-items: center;
  gap: 28px;
}

.tab-item {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-tertiary);
  padding: 10px 2px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.tab-item:hover { color: var(--ink-secondary); }
.tab-item.active { color: var(--accent); }

.tab-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--accent);
}

.tab-filter-meta {
  font-size: 12.5px;
  color: var(--ink-tertiary);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ---------------- 信息流卡片 ---------------- */
.feed-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.featured-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.standard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition);
  cursor: pointer;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: #fed7aa;
}

.featured-card .post-thumb-wrap { aspect-ratio: 16 / 9; }
.standard-card .post-thumb-wrap { aspect-ratio: 16 / 10; }

.post-thumb-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #ede7de;
}

.post-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.post-card:hover .post-thumb-img { transform: scale(1.03); }

.post-thumb-fallback {
  width: 100%;
  height: 100%;
  min-height: 140px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 55%, #fed7aa 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
}

.post-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  letter-spacing: 0.2px;
  z-index: 2;
}

.post-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-heading {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-primary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}
.featured-card .post-heading { font-size: 16.5px; }
.post-card:hover .post-heading { color: var(--accent); }

.post-excerpt {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--ink-tertiary);
  margin-top: auto;
  gap: 10px;
  white-space: nowrap;
}

.author-unit {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: #ede7de;
  flex-shrink: 0;
}

.author-avatar-letter {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(194, 65, 12, 0.09);
  color: #c2410c;
}

.author-name {
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-date { white-space: nowrap; flex-shrink: 0; }

.stat-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-item svg { width: 13px; height: 13px; }
.stat-item.liked { color: #c2410c; }

/* 查看更多 */
.more-articles-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 10px 28px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--transition);
}
.more-articles-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ---------------- 数字分页 ---------------- */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 14px;
}

.page-nav-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  text-decoration: none;
}

.page-nav-btn:hover:not(.active):not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.page-nav-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.32);
  pointer-events: none;
}

.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-nav-ellipsis {
  padding: 0 6px;
  color: var(--ink-tertiary);
  font-size: 13px;
}

/* ---------------- 右侧栏 ---------------- */
.right-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-box { padding: 20px 18px; }

.profile-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

.profile-avatar-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #ffedd5;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.profile-text-info { min-width: 0; }

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-name-row h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
}

.tier-chip {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: var(--radius-full);
  background: #fef3c7;
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.level-chip {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 6px;
  border-radius: var(--radius-full);
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid var(--accent-light-border);
}

.profile-bio {
  font-size: 11.5px;
  color: var(--ink-tertiary);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.metric-item b {
  display: block;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink-primary);
  letter-spacing: -0.3px;
}

.metric-item span {
  font-size: 11.5px;
  color: var(--ink-tertiary);
}

.btn-outline-full {
  width: 100%;
  padding: 8.5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}

.btn-outline-full:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff7ed;
}

.tools-box { padding: 18px 16px; }

.tool-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}
.tool-item-row:hover { background: var(--surface-subtle); }

.tool-icon-squircle {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(68, 45, 30, 0.12);
}

.tool-details { flex: 1; min-width: 0; }

.tool-name-txt {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1.3;
}

.tool-desc-txt {
  font-size: 11px;
  color: var(--ink-tertiary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-invite-card {
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  background: linear-gradient(145deg, #291b15 0%, #1c130e 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 6px 18px rgba(41, 27, 21, 0.35);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(254, 215, 170, 0.12);
}

.community-invite-card::after {
  content: "";
  position: absolute;
  right: -25px;
  top: -25px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.community-invite-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #ffffff;
}

.community-invite-card p {
  font-size: 12px;
  color: #fed7aa;
  line-height: 1.55;
}

.community-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.community-member-count {
  font-size: 11px;
  opacity: 0.85;
  color: #fed7aa;
}

.community-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6.5px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.community-pill-btn:hover {
  background: #fff7ed;
  color: #c2410c;
  transform: translateX(2px);
}

/* 游客注册邀请卡 */
.guest-invite-card {
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 6px 18px rgba(194, 65, 12, 0.3);
}

.guest-invite-card h4 { font-size: 15.5px; font-weight: 800; }
.guest-invite-card p { font-size: 12px; color: #ffedd5; line-height: 1.6; }

/* ---------------- 自定义模态框（Modal） ---------------- */
.trae-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(28, 19, 14, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: traeModalIn 0.2s ease forwards;
}

@keyframes traeModalIn { to { opacity: 1; } }
@keyframes traeModalPop {
  from { transform: scale(0.92) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.trae-modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-popover);
  max-width: 400px;
  width: 100%;
  padding: 26px 24px 20px;
  animation: traeModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

.trae-modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px;
}
.trae-modal-icon.info { background: #fff7ed; color: #c2410c; }
.trae-modal-icon.success { background: #ecfdf5; color: #059669; }
.trae-modal-icon.warn { background: #fff7ed; color: #c2410c; }
.trae-modal-icon.error { background: #fef2f2; color: #ba1a1a; }

.trae-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
  text-align: center;
  margin-bottom: 8px;
}

.trae-modal-message {
  font-size: 13.5px;
  color: var(--ink-secondary);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 20px;
  word-break: break-word;
  white-space: pre-line;
}

.trae-modal-actions {
  display: flex;
  gap: 10px;
}

.trae-modal-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  transition: var(--transition);
}

.trae-modal-btn.primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(194, 65, 12, 0.3);
}
.trae-modal-btn.primary:hover { filter: brightness(1.08); }

.trae-modal-btn.ghost {
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border-light);
}
.trae-modal-btn.ghost:hover { background: var(--surface-hover); color: var(--ink-primary); }

.trae-modal-btn.danger {
  background: #ba1a1a;
  color: #ffffff;
}
.trae-modal-btn.danger:hover { filter: brightness(1.1); }

/* Toast 轻提示 */
.trae-toast-wrap {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.trae-toast {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(28, 19, 14, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-popover);
  animation: traeToastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 80vw;
}

.trae-toast.success { background: rgba(5, 150, 105, 0.95); }
.trae-toast.error { background: rgba(186, 26, 26, 0.95); }
.trae-toast.out { opacity: 0; transition: opacity 0.3s ease; }

@keyframes traeToastIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 主题切换动画：View Transitions API 圆形扩散（纯炫耀用），不支持的浏览器自动降级为直切 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { display: none; }
}

/* 切换进行中：禁掉页面所有 CSS transition，避免整页元素同时过渡抢帧导致卡顿 */
html.theme-animating,
html.theme-animating *,
html.theme-animating *::before,
html.theme-animating *::after {
  transition: none !important;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1280px) {
  .layout-container { grid-template-columns: 216px minmax(0, 1fr); }
  .right-sidebar { display: none; }
}

@media (max-width: 1024px) {
  .layout-container { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 40px; }
  .left-sidebar { display: none; }
  .site-topbar { padding: 10px 16px; gap: 12px; }
  .brand-tagline { display: none; }
  .standard-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-pair { grid-template-columns: 1fr; }
  .hero-inner-content { padding: 0 24px; }
  .hero-bullets { left: 24px; }
}

@media (max-width: 640px) {
  .standard-grid { grid-template-columns: 1fr; }
  .user-chip-name { display: none; }
  .btn-new-post span { display: none; }
  .btn-new-post { padding: 8px 12px; }
  .hero-container { height: 220px; }
  .hero-inner-content h1 { font-size: 20px; }
}

/* ---------------- 左栏「每日图签 + 主题模式」卡片（样式取自参考稿 Theme Preview Card） ---------------- */
.theme-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}

.theme-card-cover {
  position: relative;
  width: 100%;
  height: 110px;
  overflow: hidden;
}

.theme-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.92);
  transition: transform 0.5s ease;
}

.theme-card:hover .theme-card-cover img { transform: scale(1.04); }

.theme-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(90, 35, 10, 0.82) 0%, rgba(60, 30, 12, 0.2) 55%, transparent 100%);
}

.theme-card-quote {
  position: absolute;
  bottom: 9px;
  left: 12px;
  right: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.4px;
  text-shadow: 0 1px 4px rgba(60, 20, 5, 0.45);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-card-quote-en {
  display: block;
  margin-top: 2px;
  font-style: italic;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-card-body {
  padding: 12px;
  background: var(--surface-subtle);
}

.theme-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.theme-card-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-tertiary);
}

.theme-card-current {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent-light-border);
}

.theme-switch button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5.5px 0;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-tertiary);
  background: transparent;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.theme-switch button.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 1px 3px var(--accent-glow);
}

:root[data-theme="dark"] .theme-switch button.active {
  background: var(--accent-light);
}
