* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
  background-color: var(--fj-bg-root);
  color: var(--fj-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul { list-style: none; }
.is-hidden { display: none !important; }
.fj-container {
  max-width: var(--fj-page-max-width, 1200px);
  margin: 0 auto;
  padding: 0 var(--fj-page-padding-x, 32px);
}
/* ========== 首页黄金三栏（侧栏 140px | 帖文流 max 590px | 右栏 280px）========== */
main.fj-site-main.fj-layout {
  /* 仅首页：在全局 token 基础上再收侧栏 50px、放宽中间帖文 50px */
  --fj-golden-sidebar-width: 140px;
  --fj-home-feed-column-max: 590px;
  display: grid;
  grid-template-columns: var(--fj-golden-sidebar-width, 140px) minmax(0, 1fr) var(--fj-golden-rail-width, 280px);
  gap: var(--fj-golden-layout-gap, 48px);
  align-items: start;
  width: 100%;
  padding-top: 8px;
  box-sizing: border-box;
}

main.fj-site-main.fj-layout > aside:first-of-type {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

main.fj-site-main.fj-layout > section {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 帖文区 max-width 由首页 main 上的 --fj-home-feed-column-max 控制，左右留白对称 */
.fj-home-feed-column {
  width: 100%;
  max-width: var(--fj-home-feed-column-max, 590px);
}

.fj-home-feed-column .fj-post-card,
.fj-home-feed-column .fj-post-skeleton {
  margin-left: 0;
  margin-right: 0;
}

@media (max-width: 1024px) {
  main.fj-site-main.fj-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  main.fj-site-main.fj-layout > aside:first-of-type {
    position: static;
  }
  main.fj-site-main.fj-layout .fj-sidebar-right {
    position: static;
  }
}
.fj-header {
  position: sticky; top: 0; z-index: 100; height: 64px;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--fj-border-subtle);
}
[data-theme="light"] .fj-header {
  background-color: var(--fj-bg-root);
  border-bottom: 1px solid var(--fj-border-subtle);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.fj-logo { font-weight: 700; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 8px; line-height: 1; }
.fj-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-image: url("/luntan/assets/logo-real.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* 顶栏搜索框与 Ctrl+K 徽标统一定义在 fj-site-chrome.css，避免首页与其它页样式分叉 */
.fj-nav-link { color: var(--fj-text-secondary); font-size: 0.9rem; font-weight: 500; transition: color var(--fj-duration-fast); }
.fj-nav-link:hover { color: var(--fj-text-primary); }
.fj-btn {
  padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
  transition: transform var(--fj-duration-fast) var(--fj-ease-out), background var(--fj-duration-fast) var(--fj-ease-out);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.fj-btn:active { transform: scale(0.96); }
.fj-btn-primary { background: var(--fj-orange-500); color: #fff; }
.fj-btn-primary:hover { background: var(--fj-orange-400); }
.fj-btn-ghost { background: transparent; color: var(--fj-text-secondary); border: 1px solid var(--fj-border-base); }
.fj-btn-ghost:hover { background: var(--fj-bg-hover); color: var(--fj-text-primary); }
.fj-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: static;
  top: auto;
}
body:not(.authed) .fj-auth-only { display: none !important; }
.fj-nav-item {
  padding: 8px 12px; border-radius: 6px; color: var(--fj-text-secondary); font-size: 0.95rem;
  display: flex; align-items: center; gap: 12px; transition: all var(--fj-duration-normal) var(--fj-ease-out);
}
.fj-nav-item i,
.fj-nav-item span:first-child {
  width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-style: normal;
}
.fj-nav-item:hover { color: var(--fj-text-primary); background: var(--fj-bg-hover); }
.fj-nav-item.active { color: var(--fj-text-primary); font-weight: 500; position: relative; }
.fj-nav-item.active::before {
  content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; background: var(--fj-orange-500); border-radius: 2px;
}
.fj-nav-title { font-size: 0.75rem; font-weight: 600; color: var(--fj-text-tertiary); text-transform: uppercase; margin: 16px 0 8px 12px; letter-spacing: 1px; }
.fj-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.fj-feed-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--fj-border-subtle);
  margin-bottom: 24px;
  width: 100%;
}

.fj-feed-tabs .fj-tab {
  padding: 0 0 12px 0;
  margin: 0;
  color: var(--fj-text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  border-bottom: none;
  background: none;
}

.fj-feed-tabs .fj-tab:hover {
  color: var(--fj-text-primary);
}

.fj-feed-tabs .fj-tab.active {
  color: var(--fj-text-primary);
  font-weight: 600;
}

.fj-feed-tabs .fj-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--fj-orange-500);
  border-radius: 2px 2px 0 0;
}
.fj-post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.fj-post-skeleton {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 24px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid var(--fj-post-card-border, rgba(255, 255, 255, 0.08));
  box-shadow: var(--fj-post-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.2));
  background: var(--fj-post-card-bg, color-mix(in srgb, var(--fj-bg-surface) 88%, transparent));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
[data-theme="light"] .fj-post-skeleton {
  --fj-post-card-border: #e4e4e7;
  --fj-post-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --fj-post-card-bg: color-mix(in srgb, #ffffff 78%, rgba(255, 255, 255, 0.5));
}
.fj-post-skeleton-main { display: grid; gap: 10px; }
.fj-skeleton-line {
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
  background-size: 220% 100%;
  animation: fjSkeletonPulse 1.2s linear infinite;
}
[data-theme="light"] .fj-skeleton-line {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.05));
  background-size: 220% 100%;
}
.fj-skeleton-line.title { width: min(520px, 92%); height: 20px; }
.fj-skeleton-line.desc { width: 100%; height: 14px; }
.fj-skeleton-line.desc.short { width: 78%; }
.fj-post-skeleton-stats { width: 88px; display: grid; gap: 8px; align-content: center; }
.fj-skeleton-line.stat { width: 72px; height: 13px; justify-self: end; }
.fj-home-empty {
  border: 1px dashed var(--fj-border-base);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
  padding: 32px 24px;
  text-align: center;
}
.fj-home-empty-icon {
  margin: 0 auto 16px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  background-image: url("/luntan/assets/logo-real.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.fj-home-empty-title { font-size: 1rem; font-weight: 600; color: var(--fj-text-primary); }
.fj-home-empty-desc { margin-top: 8px; color: var(--fj-text-secondary); font-size: 0.9rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.fj-home-empty-actions { margin-top: 24px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.fj-home-empty-actions .fj-btn {
  min-width: 0;
  width: min(100%, 280px);
}

/* 空态「前往官网」：与页尾 .fj-footer-link.highlight 同色系的次要按钮，覆盖 a:link/:visited 默认蓝 */
.fj-btn.fj-btn-fenjue-external {
  background: color-mix(in srgb, var(--fj-orange-500) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--fj-orange-500) 42%, var(--fj-border-base));
  color: var(--fj-orange-500);
  text-decoration: none;
}
.fj-btn.fj-btn-fenjue-external:link,
.fj-btn.fj-btn-fenjue-external:visited,
.fj-btn.fj-btn-fenjue-external:any-link {
  color: var(--fj-orange-500);
}
.fj-btn.fj-btn-fenjue-external:hover {
  color: var(--fj-orange-400);
  background: color-mix(in srgb, var(--fj-orange-500) 16%, transparent);
  border-color: color-mix(in srgb, var(--fj-orange-500) 55%, var(--fj-border-base));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fj-orange-500) 20%, transparent);
}
.fj-btn.fj-btn-fenjue-external:active {
  color: var(--fj-orange-400);
}
[data-theme="light"] .fj-home-empty {
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .fj-home-empty-icon {
  background-color: rgba(255, 107, 53, 0.08);
}
.fj-post-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 24px;
  margin: 0 calc(-1 * var(--fj-page-padding-x, 32px));
  border-radius: 12px;
  border: 1px solid var(--fj-post-card-border, rgba(255, 255, 255, 0.08));
  box-shadow: var(--fj-post-card-shadow, 0 1px 2px rgba(0, 0, 0, 0.2));
  background: var(--fj-post-card-bg, color-mix(in srgb, var(--fj-bg-surface) 88%, transparent));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    transform var(--fj-duration-normal) var(--fj-ease-out),
    box-shadow var(--fj-duration-normal) var(--fj-ease-out),
    border-color var(--fj-duration-normal) var(--fj-ease-out);
  animation: linearFadeUp 500ms var(--fj-ease-out) forwards;
  opacity: 0;
}
[data-theme="light"] .fj-post-card {
  --fj-post-card-border: #e4e4e7;
  --fj-post-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --fj-post-card-bg: color-mix(in srgb, #ffffff 78%, rgba(255, 255, 255, 0.5));
}
.fj-post-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.06);
  border-color: color-mix(in srgb, var(--fj-post-card-border, #e4e4e7) 70%, var(--fj-orange-500) 30%);
}
[data-theme="dark"] .fj-post-card:hover {
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    0 0 0 1px color-mix(in srgb, #fff 10%, transparent);
  border-color: color-mix(in srgb, rgba(255, 255, 255, 0.12) 80%, var(--fj-orange-500) 20%);
}

.fj-post-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.fj-post-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.35;
  color: var(--fj-text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}
[data-theme="light"] .fj-post-title {
  color: #18181b;
}
.fj-post-excerpt {
  font-size: 0.875rem;
  line-height: 1.625;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #a1a1aa;
}
[data-theme="light"] .fj-post-excerpt {
  color: #71717a;
}
.fj-post-meta {
  margin-top: 2px;
}
.fj-post-meta-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 0.8125rem;
  color: var(--fj-text-tertiary);
}
.fj-post-author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  flex-shrink: 0;
  background-color: var(--fj-bg-hover);
  border: 1px solid var(--fj-border-base);
  background-size: cover;
  background-position: center;
}
.fj-post-author-name {
  font-weight: 500;
  color: var(--fj-text-secondary);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fj-post-meta-dot {
  color: var(--fj-text-tertiary);
  user-select: none;
}
.fj-post-meta-time {
  color: var(--fj-text-tertiary);
}
.fj-post-meta-board {
  margin-left: 2px;
}
.fj-tag { padding: 2px 8px; border-radius: 4px; font-weight: 500; font-size: 0.75rem; background: var(--fj-bg-surface); border: 1px solid var(--fj-border-base); color: var(--fj-text-secondary); }
.fj-tag.primary { background: var(--fj-orange-bg); color: var(--fj-orange-500); border-color: transparent; }
.fj-post-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-family: inherit;
  color: #a1a1aa;
}
[data-theme="light"] .fj-post-stats {
  color: #a1a1aa;
}
.fj-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 1.25rem;
  line-height: 1;
}
.fj-stat-item i {
  width: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-style: normal;
}
.fj-sidebar-right {
  position: sticky;
  top: 24px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

#boardCreatePostBtn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  box-sizing: border-box;
  box-shadow: 0 4px 14px var(--fj-orange-glow);
}
.fj-guest-sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.fj-guest-card {
  background-color: var(--fj-bg-surface); border: 1px solid var(--fj-border-base);
  border-radius: 12px; padding: 20px; box-shadow: var(--fj-shadow-card); text-align: center;
}
[data-theme="light"] .fj-guest-card {
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08), 0 2px 10px rgba(15, 23, 42, 0.04);
}
.fj-guest-avatar {
  width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 50%;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.2);
  display: flex; align-items: center; justify-content: center;
  background-image: url("/luntan/assets/logo-real.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.fj-guest-avatar::before { content: ""; }
.fj-guest-title { font-size: 1.1rem; font-weight: 600; color: var(--fj-text-primary); margin-bottom: 8px; }
.fj-guest-desc { font-size: 0.85rem; color: var(--fj-text-secondary); margin-bottom: 18px; line-height: 1.5; }
.fj-guest-actions { display: flex; flex-direction: column; gap: 8px; }
.fj-guest-actions .fj-btn { width: 100%; }
.fj-guest-actions .fj-btn-primary {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.88rem;
}
.fj-guest-login-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: var(--fj-text-secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--fj-duration-fast) var(--fj-ease-out);
}
.fj-guest-login-link:hover { color: var(--fj-text-primary); }
.fj-widget-title { font-size: 0.85rem; font-weight: 600; color: var(--fj-text-primary); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.fj-widget-title i {
  width: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-style: normal;
}
.fj-tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.fj-tag-cloud-item { padding: 4px 12px; font-size: 0.8rem; background: var(--fj-bg-hover); color: var(--fj-text-secondary); border-radius: 999px; transition: all 0.2s; }
.fj-tag-cloud-item:hover { color: var(--fj-orange-500); background: var(--fj-orange-bg); }
.fj-sidebar-widget { margin-bottom: 32px; }
.fj-creator-list { display: flex; flex-direction: column; gap: 16px; }
.fj-creator-item { display: flex; align-items: center; justify-content: space-between; }
.fj-creator-info { display: flex; align-items: center; gap: 12px; }
.fj-creator-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--fj-bg-hover);
  border: 1px solid var(--fj-border-base); display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; background-size: cover; background-position: center; background-repeat: no-repeat;
}
.fj-creator-name { font-size: 0.9rem; font-weight: 500; }
.fj-creator-badge { font-size: 0.7rem; color: var(--fj-orange-500); background: var(--fj-orange-bg); padding: 2px 6px; border-radius: 4px; }
.fj-btn-primary { width: 100%; padding: 10px; border-radius: 8px; background: var(--fj-orange-500); color: #fff; font-weight: 600; font-size: 0.9rem; transition: transform var(--fj-duration-normal) var(--fj-ease-out); text-align: center; margin-bottom: 24px; display: block; }
.fj-btn-primary:active { transform: scale(0.96); }
#topAvatarLink {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--fj-orange-500);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@keyframes linearFadeUp { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fjSkeletonPulse { from { background-position: 200% 0; } to { background-position: -20% 0; } }
