/* ============================================================
   博客前台样式 — 现代极简杂志风
   设计理念：大留白、优雅排版、柔和配色、无图标
   ============================================================ */

/* ===== 主题变量 ===== */
:root {
  --bg: #ffffff;
  --bg-elevated: #fafafa;
  --bg-subtle: #f4f4f5;
  --text: #18181b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --border: #e4e4e7;
  --border-light: #f4f4f5;
  --primary: #3b5bdb;
  --primary-hover: #364fc7;
  --primary-soft: #eef2ff;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.1);
  --maxw: 760px;
  --maxw-wide: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #0c0c0d;
  --bg-elevated: #18181b;
  --bg-subtle: #27272a;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: #27272a;
  --border-light: #18181b;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-soft: #1e1b4b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

/* ===== 基础重置 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  transition: background .3s ease, color .3s ease;
}
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--maxw-wide); margin: 0 auto; padding: 0 24px; }

/* ===== 阅读进度条 ===== */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--primary); z-index: 9999; transition: width .1s linear;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header { background: rgba(12,12,13,.8); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px;padding:0; }
.logo{display: flex;height: 40px;}
.logo .logo-img{display: block;height: 40px;
  width: 60px;
  overflow: hidden;
  background-position: left center;
  background-size: contain;
  background-repeat: no-repeat;
  background-image: url('../img/logo.png');}
.logo .logo-text{display: block;
    float: left;
    font-size: 24px;
    color: #333;
    overflow: hidden;
    font-weight: 200;margin-left: 10px;font-style: normal;}
[data-theme="dark"] .logo .logo-img{background-image: url('../img/logo-white.png');}
[data-theme="dark"] .logo .logo-text{color:#fefefe;}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  position: relative; padding: 4px 0;
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: var(--primary); transition: width .2s ease;
}
.nav a:hover::after { width: 100%; }
.header-right {
  display: flex; align-items: center; gap: 4px;
}
.header-right > a, .header-right > button {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--text-secondary);
  font-size: 24px; cursor: pointer;
  border-radius: 10px;
  transition: all .2s ease;
  text-decoration: none;
  position: relative;
}
.header-right > a:hover, .header-right > button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.header-right > button.active {
  color: var(--primary);
  background: var(--primary-soft);
}
.header-right .member-login { color: var(--primary);background: var(--primary-soft);}
.header-right .member-btn-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.header-right .theme-toggle .icon-sun,
.header-right .theme-toggle .icon-moon { position: absolute; }
.header-right .theme-toggle .icon-moon { display: none; }
.header-right .menu-toggle { display: none; }

/* 搜索图标按钮 */
.search-icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: none; background: transparent;
  color: var(--text-secondary); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease;
}
.search-icon-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

/* 展开式搜索框 */
.header-search-bar {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  animation: searchSlideDown .25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.header-search-bar.active {
  display: block;
}
@keyframes searchSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.header-search-form {
  display: flex; align-items: center; gap: 10px;
  position: relative;
}
.header-search-form .search-icon {
  position: absolute; left: 16px; top:8px;color: var(--text-muted);
  font-size: 18px; pointer-events: none;
}
.header-search-form input {
  flex: 1;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text);
  font-size: 15px; outline: none; transition: all .2s ease;
}
.header-search-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.header-search-form input::placeholder { color: var(--text-muted); }
.search-submit {
  padding: 12px 24px;
  border: none; border-radius: 10px;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: opacity .2s ease;
  white-space: nowrap;
}
.search-submit:hover { opacity: 0.9; }
.search-close {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-secondary); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s ease; flex-shrink: 0;
}
.search-close:hover {
  border-color: var(--primary); color: var(--primary);
}

@media (max-width: 600px) {
  .header-search-bar { padding: 10px 0; }
  .header-search-form {
    flex-wrap: wrap;
    gap: 8px;
  }
  .header-search-form .search-icon {
    left: 14px;
    font-size: 16px;
  }
  .header-search-form input {
    flex: 1 1 100%;
    order: 1;
    padding: 11px 14px 11px 40px;
    font-size: 14px;
    border-radius: 8px;
  }
  .search-submit {
    flex: 1;
    order: 2;
    padding: 11px 16px;
    font-size: 14px;
    border-radius: 8px;
  }
  .search-close {
    order: 3;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* 会员面板 */
.member-panel {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  animation: searchSlideDown .25s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.member-panel.active { display: block; }
.member-panel-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.member-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.member-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.member-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.member-group {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.member-actions a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  text-decoration: none;
  transition: all .2s ease;
}
.member-actions a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.member-actions a.logout {
  color: #e74c3c;
}
.member-actions a.logout:hover {
  background: rgba(231, 76, 60, .1);
}

@media (max-width: 600px) {
  .member-panel-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .member-actions { width: 100%; }
  .member-actions a { flex: 1; justify-content: center; }
}

/* ===== 主内容区 ===== */
.main { padding: 36px 0 80px; min-height: 60vh; }

/* ===== 每日一言（引号包裹） ===== */
.daily-hitokoto {
  padding: 20px 0;
  position: relative;
  background: var(--bg-elevated);
}
.daily-hitokoto .hitokoto-icon { display: none; }
.hitokoto-text {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  font-size: 19px;
  line-height: 2;
  color: var(--text);
  margin: 0 48px 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  text-align: left;
}
.hitokoto-text::first-letter {
  font-size: 48px;
  font-weight: 700;
  float: left;
  line-height: 1;
  margin: 6px 10px 0 0;
  color: var(--primary);
}
.daily-hitokoto::before {
  content: '「';
  position: absolute;
  left: -26px;
  top: -4px;
  font-size: 40px;
  color: var(--primary);
  opacity: 0.3;
  font-family: "Noto Serif SC", "Songti SC", serif;
  line-height: 1;
}
.daily-hitokoto::after {
  content: '」';
  position: absolute;
  right: -26px;
  bottom: -4px;
  font-size: 40px;
  color: var(--primary);
  opacity: 0.3;
  font-family: "Noto Serif SC", "Songti SC", serif;
  line-height: 1;
}
.hitokoto-from {
  font-family: "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  font-size: 13px;
  color: var(--text-soft);
  margin: 16px 48px 0 0;
  text-align: right;
  letter-spacing: 0.05em;
}
.hitokoto-from::before {
  content: '— ';
  opacity: 0.5;
}
@media (max-width: 600px) {
  .daily-hitokoto { padding: 12px 0;margin-top:10px }
  .hitokoto-text { font-size: 16px; margin: 0 28px 8px; line-height: 1.9; }
  .hitokoto-from { margin-right: 28px; font-size: 12px; }
}

/* ===== 文章列表 ===== */
.post-list { display: flex; flex-direction: column; gap: 0; }
.post-card {
  padding: 36px 0; border-bottom: 1px solid var(--border-light);
  display: flex; gap: 28px; align-items: flex-start;
}
.post-card:last-child { border-bottom: none; }
.post-card .cover { flex: 0 0 200px; }
.post-card .cover img {
  width: 200px; height: 140px; object-fit: cover;
  border-radius: var(--radius); transition: transform .3s ease;
}
.post-card:hover .cover img { transform: scale(1.03); }
.post-body { flex: 1; min-width: 0; }
.post-cat {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--primary); text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 8px;
}
.post-title {
  font-size: 22px; font-weight: 700; line-height: 1.35;
  letter-spacing: -.01em; margin-bottom: 10px;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--primary); }
.post-excerpt {
  color: var(--text-secondary); font-size: 15px; line-height: 1.7;
  margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta {
  display: flex;align-items: center; gap: 16px;
  font-size: 13px; color: var(--text-muted);flex-wrap: wrap;
}
.post-meta span { display: flex; align-items: center; gap: 4px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.post-tags a {
  font-size: 12px; color: var(--text-secondary);
  padding: 3px 10px; background: var(--bg-subtle); border-radius: 12px;
  transition: all .2s ease;
}
.post-tags a:hover { background: var(--primary-soft); color: var(--primary); }

/* ===== 分页 ===== */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 48px;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  transition: all .2s ease;
}
.pagination a { color: var(--text-secondary); border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current {
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
}

/* ===== 文章详情 ===== */
.post-detail { background: transparent; }
.post-detail .post-title {
  font-size: 36px; font-weight: 800; line-height: 1.25;
  letter-spacing: -.02em; margin-bottom: 20px;
}
.post-detail .post-meta {
  padding-bottom: 24px; margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.post-cover {
  width: 100%; border-radius: var(--radius-lg); margin: 0 0 36px;
  aspect-ratio: 16/9; object-fit: cover;
}
.post-content { font-size: 17px; line-height: 1.85; color: var(--text); }
.post-content > * { margin-bottom: 24px; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-weight: 700; line-height: 1.35; letter-spacing: -.01em;
  margin-top: 40px; margin-bottom: 16px;
}
.post-content h1 { font-size: 30px; }
.post-content h2 { font-size: 26px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.post-content h3 { font-size: 22px; }
.post-content h4 { font-size: 18px; }
.post-content p { margin-bottom: 20px; }
.post-content a { text-decoration: underline; text-underline-offset: 3px; }
.post-content img { border-radius: var(--radius); margin: 24px 0; }
.post-content pre {
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; overflow-x: auto;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.6;
  margin: 24px 0;
}
.post-content code {
  font-family: var(--font-mono); font-size: 14px;
  background: var(--bg-subtle); padding: 2px 6px; border-radius: 4px;
}
.post-content pre code { background: none; padding: 0; }
.post-content blockquote {
  border-left: 3px solid var(--primary); padding: 8px 0 8px 20px;
  margin: 24px 0; color: var(--text-secondary); font-style: italic;
}
.post-content ul, .post-content ol { padding-left: 24px; margin: 16px 0; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; }
.post-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14px;
}
.post-content th, .post-content td {
  padding: 10px 14px; border: 1px solid var(--border); text-align: left;
}
.post-content th { background: var(--bg-subtle); font-weight: 600; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

/* 文章标签 */
.post-detail .post-tags { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }

/* ===== 点赞与分享 ===== */
.post-actions {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin: 48px 0; padding: 32px;
  background: var(--bg-subtle); border-radius: var(--radius-lg);
}
.like-btn {
  padding: 12px 28px; border-radius: 24px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text); transition: all .2s ease;
}
.like-btn:hover { border-color: var(--danger); color: var(--danger); transform: translateY(-1px); }
.like-btn.liked { background: #fef2f2; border-color: var(--danger); color: var(--danger); }
.share-box { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.share-box button {
  padding: 8px 16px; border-radius: 18px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-secondary); transition: all .2s ease;
}
.share-box button:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 打赏 ===== */
.reward-box {
  text-align: center; margin: 40px 0; padding: 32px;
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
}
.reward-box > p { color: var(--text-secondary); margin-bottom: 20px; font-size: 15px; }
.reward-qrcodes { display: flex; justify-content: center; gap: 40px; }
.reward-item { text-align: center; }
.qrcode-placeholder {
  width: 130px; height: 130px; background: var(--bg-subtle);
  border: 2px dashed var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  margin-bottom: 10px;
}
.reward-item span { font-size: 13px; color: var(--text-secondary); }

/* ===== 上下篇导航 ===== */
.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 48px 0;
}
.post-nav a, .post-nav span {
  display: block; padding: 20px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-elevated);
  font-size: 14px; transition: all .2s ease;
}
.post-nav a:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.post-nav .prev { text-align: left; }
.post-nav .next { text-align: right; }
.post-nav .disabled { color: var(--text-muted); background: var(--bg-subtle); }

/* ===== 相关文章 ===== */
.related-posts {
  margin: 48px 0; padding: 32px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.related-posts h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.related-posts li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.related-posts li:last-child { border-bottom: none; }
.related-cover { width: 70px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.related-posts a { flex: 1; color: var(--text); font-size: 14px; font-weight: 500; }
.related-posts a:hover { color: var(--primary); }
.related-views { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ===== 热门文章侧边栏 ===== */
.hot-posts {
  margin: 48px 0; padding: 28px;
  background: var(--bg-subtle); border-radius: var(--radius-lg);
}
.hot-posts h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.hot-posts li { padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.hot-posts li:last-child { border-bottom: none; }
.hot-posts a { color: var(--text-secondary); font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.hot-posts a:hover { color: var(--primary); }
.hot-views { font-size: 12px; color: var(--text-muted); }

/* ===== 系列导航 ===== */
.series-nav {
  background: var(--primary-soft); border-radius: var(--radius);
  padding: 20px 24px; margin: 24px 0;
}
.series-nav h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.series-nav ol { padding-left: 20px; }
.series-nav li { padding: 4px 0; font-size: 14px; }
.series-nav li.current { color: var(--primary); font-weight: 600; }
.series-nav li a { color: var(--text-secondary); }
.series-nav li a:hover { color: var(--primary); }

/* ===== 密码保护 ===== */
.password-protect {
  text-align: center; padding: 80px 24px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.password-protect h2 { font-size: 24px; margin-bottom: 12px; }
.password-protect p { color: var(--text-secondary); margin-bottom: 24px; }
.password-protect form { display: flex; gap: 10px; justify-content: center; }
.password-protect input {
  padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; width: 260px; background: var(--bg); color: var(--text); outline: none;
}
.password-protect input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.password-protect button {
  padding: 12px 28px; background: var(--primary); color: #fff;
  border-radius: var(--radius); font-size: 15px; font-weight: 600;
}
.password-protect button:hover { background: var(--primary-hover); }

/* ===== 评论区 ===== */
.comment-area { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--border); }
.comment-area > h3 { font-size: 22px; font-weight: 700; margin-bottom: 28px; }
.comment-list { margin-bottom: 40px; }
.comment-item { padding: 20px 0; border-bottom: 1px solid var(--border-light); }
.comment-item:last-child { border-bottom: none; }
.c-author {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px;
}
.c-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.c-time { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.reply-btn {
  font-size: 12px; color: var(--text-muted); padding: 2px 8px;
  border-radius: 4px; transition: all .2s ease; cursor: pointer;
  background: none; border: none;
}
.reply-btn:hover { background: var(--bg-subtle); color: var(--primary); }
.c-content { font-size: 15px; color: var(--text-secondary); line-height: 1.7; padding-left: 42px; }
.comment-replies { margin-top: 12px; margin-left: 20px; padding-left: 16px; border-left: 2px solid var(--border); }
.comment-replies .comment-item { padding: 12px 0; border-bottom: 1px dashed var(--border-light); }
.comment-replies .comment-item:last-child { border-bottom: none; }
.reply-notice {
  background: var(--primary-soft); padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.reply-notice button { font-size: 12px; color: var(--primary); background: none; border: none; cursor: pointer; }

/* 评论表单 */
.comment-form { background: var(--bg-subtle); padding: 24px; border-radius: var(--radius); }
.comment-form input, .comment-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; background: var(--bg-elevated);
  color: var(--text); margin-bottom: 12px; outline: none; transition: all .2s ease;
  box-sizing: border-box;
}
.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.comment-form textarea { min-height: 100px; resize: vertical; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-input { flex: 1; margin-bottom: 0 !important; }
.captcha-img { width: 120px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--border); cursor: pointer; object-fit: cover; flex-shrink: 0; }
.comment-form button[type="submit"] {
  margin-top: 16px; padding: 12px 32px; background: var(--primary); color: #fff;
  border-radius: var(--radius); font-size: 15px; font-weight: 600; transition: all .2s ease;
  border: none; cursor: pointer;
}
.comment-form button[type="submit"]:hover { background: var(--primary-hover); transform: translateY(-1px); }
.comment-form button[type="submit"]:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* 会员评论 */
.c-avatar-link { display: inline-flex; flex-shrink: 0; }
.c-avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.c-name { display: inline-flex; align-items: center; gap: 6px; }
.c-author-link { color: var(--text); text-decoration: none; font-weight: 600; }
.c-author-link:hover { color: var(--primary); }
.c-badge {
  font-size: 11px; padding: 1px 6px; border-radius: 3px;
  background: var(--primary-soft); color: var(--primary); font-weight: 500;
}
.delete-btn {
  font-size: 12px; color: var(--text-muted); padding: 2px 8px;
  border-radius: 4px; transition: all .2s ease; cursor: pointer;
  background: none; border: none;
}
.delete-btn:hover { background: #fff1f0; color: #ff4d4f; }
.comment-user-info {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.comment-user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.comment-user-name { font-size: 15px; font-weight: 600; color: var(--text); }
.comment-login-tip {
  background: var(--bg-subtle); padding: 32px; border-radius: var(--radius);
  text-align: center;
}
.comment-login-tip p { color: var(--text-muted); margin-bottom: 16px; font-size: 15px; }
.comment-login-tip .btn {
  display: inline-block; padding: 10px 28px; background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); text-decoration: none; font-size: 14px; font-weight: 600;
}
.comment-login-tip .btn:hover { background: var(--primary-hover); }

/* 我的评论列表 */
.my-comment-list { display: flex; flex-direction: column; gap: 16px; }
.my-comment-item {
  background: var(--bg-subtle); padding: 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.my-comment-meta {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap;
}
.my-comment-post a { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 14px; }
.my-comment-post a:hover { text-decoration: underline; }
.my-comment-time { font-size: 12px; color: var(--text-muted); }
.my-comment-status {
  font-size: 11px; padding: 2px 8px; border-radius: 3px; font-weight: 500;
}
.my-comment-status.approved { background: #f6ffed; color: #52c41a; }
.my-comment-status.pending { background: #fffbe6; color: #faad14; }
.my-comment-status.spam { background: #fff1f0; color: #ff4d4f; }
.my-comment-content {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px;
}
.my-comment-actions { display: flex; gap: 16px; }
.my-comment-actions a {
  font-size: 13px; color: var(--text-muted); text-decoration: none;
}
.my-comment-actions a:hover { color: var(--primary); }
.my-comment-actions a.btn-danger:hover { color: #ff4d4f; }

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 13px; color: var(--text-muted); margin-bottom: 24px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }

/* ===== 页面标题 ===== */
.page-title { font-size: 32px; font-weight: 800; margin-bottom: 32px; letter-spacing: -.02em; }

/* ===== 标签云 ===== */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud a {
  padding: 8px 18px; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 20px; font-size: 14px; color: var(--text-secondary);
  transition: all .2s ease;
}
.tag-cloud a:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }

/* ===== 归档页 ===== */
.archive-year { font-size: 24px; font-weight: 800; margin: 40px 0 16px; color: var(--text); }
.archive-month { font-size: 16px; font-weight: 600; margin: 24px 0 12px; color: var(--text-secondary); }
.archive-list li { padding: 8px 0; display: flex; align-items: baseline; gap: 16px; }
.archive-list .date { font-size: 13px; color: var(--text-muted); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.archive-list a { color: var(--text); font-size: 15px; }
.archive-list a:hover { color: var(--primary); }

/* ===== 搜索页 ===== */
.search-result-info { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.search-result-info strong { color: var(--primary); }

/* ===== 系列专题页 ===== */
.series-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px; margin-top: 24px;
}
.series-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; transition: all .3s ease;
}
.series-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.series-cover { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.series-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.series-card h3 a { color: var(--text); }
.series-card h3 a:hover { color: var(--primary); }
.series-count { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.series-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.series-detail { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }
.series-cover-large { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); margin-bottom: 28px; }
.series-detail h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.series-meta { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.series-description { padding: 20px; background: var(--bg-subtle); border-radius: var(--radius); margin-bottom: 32px; font-size: 15px; color: var(--text-secondary); line-height: 1.8; }
.series-article-list { counter-reset: series; }
.series-article-list li {
  display: flex; align-items: center; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.series-num {
  width: 32px; height: 32px; background: var(--primary-soft); color: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.series-article-list a { flex: 1; color: var(--text); font-size: 15px; font-weight: 500; }
.series-article-list a:hover { color: var(--primary); }
.series-date { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }

/* ===== 友情链接 ===== */
.friend-links {
  padding: 16px 0; border-bottom: 1px solid var(--border);
  margin-bottom: 20px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px;
}
.fl-title { color: var(--text-muted); font-weight: 600; margin-right: 4px; }
.friend-links a { color: var(--text-secondary); padding: 0px 10px; border-radius: 4px; transition: all .2s ease; }
.friend-links a:hover { background: var(--primary-soft); color: var(--primary); }

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--border); padding: 40px 0;
  background: var(--bg-elevated);
}
.footer-links { display: none; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.footer-bar-links {display: flex; justify-content: space-between;font-size: 13px; color: var(--text-muted); }
.footer-bar-links a { color: var(--text-muted); }
.footer-bar-links a:hover { color: var(--primary); }
.footer-bar-links .footer-bar-left{display: flex;gap:10px;
    align-items: center;} 
#workboard img.boardsign {
  width: 100%;
  margin: 0 auto;
  max-width: 130px;
  border-radius: 0px;
}
#runtimeTextTip{text-align: center; font-size: 13px; color: var(--text-muted);}
/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; width: 44px; height: 44px;
  border-radius: 10px; background: var(--bg-elevated); border: 1px solid var(--primary-soft);
  color: var(--primary);
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); opacity: 0; visibility: hidden;
  transition: all .3s ease; z-index: 99;font-size: 24px;
}
.back-to-top svg { display: block; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); }

/* ===== 文章目录浮动侧边栏 ===== */
.article-toc {
  position: fixed; top: 50%; right: 40px; transform: translateY(-50%);
  width: 220px; max-height: 60vh; overflow-y: auto;
  font-size: 13px; display: none;
}
.article-toc ul { list-style: none; }
.article-toc li { margin: 6px 0; padding-left: 12px; border-left: 2px solid var(--border); }
.article-toc li.active { border-left-color: var(--primary); }
.article-toc a { color: var(--text-muted); }
.article-toc li.active a { color: var(--primary); font-weight: 600; }
.article-toc a:hover { color: var(--primary); }

/* ===== 404页面 ===== */
.error-page { text-align: center; padding: 80px 24px; }
.error-page h1 { font-size: 96px; font-weight: 800; color: var(--primary); margin-bottom: 16px; letter-spacing: -.04em; }
.error-page p { font-size: 18px; color: var(--text-secondary); margin-bottom: 32px; }
.error-page a {
  display: inline-block; padding: 12px 32px; background: var(--primary); color: #fff;
  border-radius: var(--radius); font-weight: 600; transition: all .2s ease;
}
.error-page a:hover { background: var(--primary-hover); transform: translateY(-2px); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 60px 24px; color: var(--text-muted); font-size: 15px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .article-toc { display: none !important; }
  .back-to-top { right: 20px; bottom: 20px; }
}

@media (max-width: 768px) {
  .main { padding: 32px 0 60px; }
  .container, .container-wide { padding: 0 16px; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; z-index: 99;
    flex-direction: column; background: var(--bg-elevated); padding: 16px;
    border-bottom: 1px solid var(--border); gap: 0; box-shadow: 0 4px 12px rgba(0,0,0,.08);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border-light); }
  .nav a:last-child { border-bottom: none; }
  .header-right .menu-toggle { display: flex; }
  .post-card { flex-direction: column; gap: 16px; padding: 28px 0; }
  .post-card .cover { flex: none; }
  .post-card .cover img { width: 100%; height: 180px; }
  .post-title { font-size: 19px; }
  .post-detail .post-title { font-size: 28px; }
  .post-content { font-size: 16px; }

  .post-actions { flex-direction: column; gap: 16px; padding: 24px; }
  .reward-qrcodes { flex-direction: column; align-items: center; gap: 24px; }
  .post-nav { grid-template-columns: 1fr; }
  .series-grid { grid-template-columns: 1fr; }
  .series-detail { padding: 24px; }
  .password-protect form { flex-direction: column; align-items: center; }
  .password-protect input { width: 100%; max-width: 260px; }
  .captcha-row { flex-direction: column; align-items: stretch; }
  .page-title { font-size: 26px; }
  .menu-toggle{font-size: 26px;}
  .member-link{font-size: 24px;}
  .theme-toggle{font-size: 24px;border:none;background: none;}

  .footer-bar-links{flex-direction: column-reverse;
    justify-content: space-between;}
  .footer-bar-links .footer-bar-left {
    gap: 8px; 
    flex-direction: column;
}
}

/* 用户主页 */
.user-profile-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #4a5568) 100%);
  padding: 48px 0;
  margin: -32px calc(50% - 50vw) 32px;
  width: 100vw;
}
.user-profile-inner {
  display: flex;
  align-items: center;
  gap: 32px;
}
.user-avatar-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 4px solid rgba(255,255,255,.3);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.user-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-info { flex: 1; color: #fff; }
.user-name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
}
.user-group {
  display: inline-block;
  background: rgba(255,255,255,.2);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 13px;
  margin-bottom: 12px;
}
.user-bio {
  font-size: 15px;
  opacity: .9;
  margin: 0 0 16px;
  line-height: 1.6;
}
.user-stats {
  display: flex;
  gap: 32px;
}
.user-stats .stat-item {
  display: flex;
  flex-direction: column;
}
.user-stats .stat-num {
  font-size: 22px;
  font-weight: 700;
}
.user-stats .stat-label {
  font-size: 13px;
  opacity: .8;
}

@media (max-width: 768px) {
  .user-profile-header { padding: 32px 0; }
  .user-profile-inner { flex-direction: column; text-align: center; gap: 20px; }
  .user-avatar-lg { width: 90px; height: 90px; }
  .user-name { font-size: 22px; }
  .user-stats { justify-content: center; gap: 24px; }
  .user-stats .stat-num { font-size: 18px; }
}


/* Bilibili 播放器 */
.bilibili-player-wrapper {
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.bilibili-player-wrapper .player-loading {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}
.bilibili-player-wrapper video {
  width: 100%;
  display: none;
}
.bilibili-player-wrapper .plyr {
  border-radius: 8px;
}

/* ===== 无限滚动加载 ===== */
.infinite-load { margin-top: 24px; }
.load-loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: var(--text-muted, #999);
  font-size: 14px;
}
.load-more-btn {
  display: none;
  width: 100%;
  padding: 14px;
  background: var(--bg-subtle, #f5f7fa);
  border: 1px solid var(--border, #e8eaed);
  border-radius: var(--radius, 8px);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary, #666);
  transition: all 0.2s;
}
.load-more-btn:hover {
  background: var(--primary, #2d6cdf);
  color: #fff;
  border-color: var(--primary, #2d6cdf);
}
.load-end {
  display: none;
  text-align: center;
  padding: 20px;
  color: var(--text-muted, #999);
  font-size: 13px;
}

/* 评论加载更多 */
.comment-infinite-load {
  text-align: center;
  margin-top: 16px;
}
.comment-loading {
  display: none;
  padding: 12px;
  color: var(--text-muted, #999);
  font-size: 13px;
}
.comment-load-more {
  display: inline-block;
  padding: 10px 24px;
  background: var(--bg-subtle, #f5f7fa);
  border: 1px solid var(--border, #e8eaed);
  border-radius: var(--radius, 8px);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary, #666);
  transition: all 0.2s;
}
.comment-load-more:hover {
  background: var(--primary, #2d6cdf);
  color: #fff;
  border-color: var(--primary, #2d6cdf);
}
.comment-load-end {
  display: none;
  padding: 12px;
  color: var(--text-muted, #999);
  font-size: 13px;
}

