/*
 * SimpleBlue - 白色简洁优雅风格 v2.0
 * 左中右三栏布局，大量留白，精致排版
 */

/* CSS 变量 */
:root {
  --primary: #1A1A1A;
  --primary-light: #F8F8F8;
  --bg: #FFFFFF;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #666666;
  --text-muted: #999999;
  --text-light: #BBBBBB;
  --border: #E8E8E8;
  --border-light: #F2F2F2;
  --radius: 2px;
  --font-serif: 'Songti SC', 'STSong', 'SimSun', 'NSimSun', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Georgia', 'Times New Roman', serif;
  --font-display: 'Songti SC', 'STSong', 'SimSun', 'NSimSun', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Georgia', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 暗色主题变量（点击品牌 L 切换） ===== */
html[data-theme="dark"] {
  --primary: #E8E8E8;
  --primary-light: #1C1C1E;
  --bg: #0D0D0F;
  --bg-card: #161618;
  --text: #E8E8E8;
  --text-secondary: #A8A8A8;
  --text-muted: #7A7A7A;
  --text-light: #555555;
  --border: #2A2A2E;
  --border-light: #1E1E22;
}

/* 暗色主题下背景与文字平滑过渡 */
html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--text);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--text-secondary);
}

img {
  max-width: 100%;
  height: auto;
}

/* 排版 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.4;
  margin: 2rem 0 1rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1.5rem;
}

blockquote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  border-left: 2px solid var(--border);
  background: var(--primary-light);
  font-style: italic;
  color: var(--text-secondary);
}

blockquote p:last-child {
  margin-bottom: 0;
}

code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  font-size: 0.9em;
  background: var(--primary-light);
  padding: 0.2em 0.5em;
  border-radius: var(--radius);
}

pre {
  background: var(--primary-light);
  padding: 2rem;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  margin: 2.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
}

th, td {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--primary-light);
  font-weight: 500;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4rem auto;
  width: 40px;
}

/* 容器 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -2rem;
}

[class*='col-'] {
  padding: 0 2rem;
}

.col-mb-12 { flex: 0 0 100%; max-width: 100%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-offset-1 { margin-left: 8.333333%; }

/* 主体区域 */
#body {
  min-height: 100vh;
  padding: 4rem 0;
}

/* ========== 左侧栏 ========== */
#left-sidebar {
  position: relative;
}

.left-sidebar-inner {
  position: sticky;
  top: 4rem;
  padding-right: 2rem;
}

/* 站点品牌 */
.site-brand {
  margin-bottom: 3rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 500;
  font-style: italic;
  font-family: var(--font-display);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.brand-mark:hover {
  background: var(--text);
  color: var(--bg);
}

.brand-name {
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  font-family: var(--font-sans);
}

/* 侧边导航 */
.side-nav {
  margin-bottom: 3rem;
}

.side-nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.side-nav-item:hover,
.side-nav-item.active {
  color: var(--text);
}

.side-nav-item.active {
  border-bottom-color: var(--border);
}

.nav-dot {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
  margin-right: 0.75rem;
  transition: var(--transition);
}

.side-nav-item:hover .nav-dot,
.side-nav-item.active .nav-dot {
  background: var(--text);
}

/* 侧边搜索 */
.side-search {
  margin-bottom: 3rem;
}

#side-search-form {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  transition: var(--transition);
}

#side-search-form:focus-within {
  border-bottom-color: var(--text);
}

.side-search-input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
  padding: 0.25rem 0;
}

.side-search-input::placeholder {
  color: var(--text-light);
}

.side-search-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  transition: var(--transition);
}

.side-search-btn:hover {
  color: var(--text);
}

/* 装饰线 */
.side-deco-line {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin-bottom: 2rem;
}

/* 功能链接 */
.side-functions {
  margin-bottom: 2rem;
}

.side-functions-title {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.side-title-link {
  color: var(--text-muted);
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.side-title-link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

.side-functions-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-function-item {
  border-bottom: 1px solid var(--border-light);
}

.side-function-item:last-child {
  border-bottom: none;
}

.side-function-link {
  display: flex;
  align-items: center;
  padding: 0.625rem 0;
  transition: var(--transition);
}

.function-icon {
  font-size: 0.7rem;
  color: var(--text-light);
  font-family: var(--font-sans);
  margin-right: 0.75rem;
  min-width: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.function-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.side-function-link:hover .function-text {
  color: var(--text);
}

/* 站点统计 */
.side-stats {
  font-family: var(--font-sans);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 300;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* 置顶区域通用 */
.pinned-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-light);
  font-family: var(--font-sans);
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
}

.sidebar-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

/* 置顶文章区域 */
.pinned-post-section {
  margin-bottom: 2rem;
}

.pinned-post {
  padding: 1rem 0;
}

.pinned-post-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  font-family: var(--font-display);
}

.pinned-post-title a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.pinned-post-title a:hover {
  border-bottom-color: var(--text);
}

.pinned-post-excerpt {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.pinned-post-link {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  transition: var(--transition);
}

.pinned-post-link:hover {
  color: var(--text);
}

/* 置顶分类区域 */
.pinned-category-section {
  margin-top: 2rem;
}

.pinned-category-title {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  font-family: var(--font-sans);
}

/* 字号调整 */
.font-size-control {
  margin-bottom: 0;
}

.font-size-buttons {
  display: flex;
  gap: 0.5rem;
}

.font-size-btn {
  flex: 1;
  padding: 0.5rem 0.25rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius);
}

.font-size-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.font-size-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* 字号调整全局样式 */
html[data-font-size="small"] {
  font-size: 15px;
}

html[data-font-size="normal"] {
  font-size: 17px;
}

html[data-font-size="large"] {
  font-size: 19px;
}

/* ===== 个人留言板 ===== */
.guestbook-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.guestbook-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 500;
  font-family: var(--font-display);
}

.guestbook-desc {
  margin: 0 0 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 留言提示 */
.guestbook-notice {
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.guestbook-notice.success {
  background: #D4EDDA;
  color: #155724;
  border: 1px solid #C3E6CB;
}

html[data-theme="dark"] .guestbook-notice.success {
  background: #1E3A1E;
  color: #A8D5A8;
  border-color: #2A4A2A;
}

.guestbook-notice.error {
  background: #F8D7DA;
  color: #721C24;
  border: 1px solid #F5C6CB;
}

html[data-theme="dark"] .guestbook-notice.error {
  background: #3A1E1E;
  color: #D5A8A8;
  border-color: #4A2A2A;
}

/* 留言表单 */
.guestbook-form {
  margin-bottom: 3rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--text);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  padding: 0.75rem 2rem;
  border: 1px solid var(--text);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.form-submit:hover {
  background: var(--primary-light);
}

.form-submit:active {
  background: var(--text);
  color: var(--bg);
  transform: scale(0.98);
}

/* 留言列表 */
.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guestbook-empty {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.empty-text {
  font-size: 1.1rem;
}

.guestbook-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: var(--transition);
}

.guestbook-item:hover {
  border-color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .guestbook-item:hover {
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

.guestbook-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
}

.guestbook-content {
  flex: 1;
}

.guestbook-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.guestbook-name {
  font-weight: 500;
  color: var(--text);
}

.guestbook-time {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guestbook-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 分页 */
.guestbook-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  transition: var(--transition);
}

.pagination-btn:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Footer 留言板链接 */
.footer-divider {
  margin: 0 0.5rem;
  color: var(--text-muted);
}

.footer-guestbook-link {
  color: var(--text-secondary);
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.footer-guestbook-link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* 私密留言提示 */
.guestbook-tips {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--primary-light);
  border-left: 3px solid var(--text);
  border-radius: var(--radius);
}

.guestbook-tips p {
  margin: 0 0 0.5rem;
  font-weight: 500;
  color: var(--text);
}

.guestbook-tips ul {
  margin: 0;
  padding-left: 1.5rem;
}

.guestbook-tips li {
  margin-bottom: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* 留言管理页面 */
.guestbook-admin {
  padding: 2rem;
}

.guestbook-email {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.guestbook-meta {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* 响应式 */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .guestbook-form {
    padding: 1.5rem;
  }

  .guestbook-item {
    padding: 1rem;
  }

  .guestbook-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .guestbook-pagination {
    flex-direction: column;
    gap: 1rem;
  }

  .guestbook-tips {
    padding: 1rem;
  }
}

.pinned-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pinned-category-item {
  display: flex;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.pinned-category-item:last-child {
  border-bottom: none;
}

.pinned-category-number {
  font-size: 0.7rem;
  color: var(--text-light);
  font-family: var(--font-sans);
  margin-right: 0.75rem;
  min-width: 1.5rem;
}

.pinned-category-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: var(--transition);
}

.pinned-category-link:hover {
  color: var(--text);
}

.pinned-category-empty {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.5rem 0;
}

/* ========== 中间栏 ========== */
#main {
  position: relative;
}

.main-content-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

/* 文章卡片 */
.post-card {
  position: relative;
  margin-bottom: 5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-light);
}

.post-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* 文章序号 */
.post-index {
  position: absolute;
  left: -4rem;
  top: 0;
  width: 3rem;
}

.index-number {
  font-size: 0.75rem;
  color: var(--text-light);
  font-family: var(--font-sans);
  letter-spacing: 0.1em;
}

/* 文章头部 */
.post-header {
  margin-bottom: 2rem;
}

.post-title {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.3;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.post-title a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.post-title a:hover {
  border-bottom-color: var(--text);
}

.post-meta {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.meta-date {
  letter-spacing: 0.05em;
}

.meta-divider {
  margin: 0 0.75rem;
  color: var(--border);
}

.meta-category a,
.meta-comments {
  color: var(--text-muted);
  transition: var(--transition);
}

.meta-category a:hover,
.meta-comments:hover {
  color: var(--text);
}

/* 文章摘要 */
.post-excerpt {
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.post-excerpt p {
  margin-bottom: 1rem;
}

/* 品牌标志链接 */
.brand-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.brand-link:hover .brand-mark {
  background: var(--text);
  color: var(--bg);
}

/* 文章顶部栏：序号 + 收藏点赞 */
.post-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.post-actions-top {
  display: flex;
  gap: 0.75rem;
}

.post-actions-top .action-btn {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
}

/* 文章详情页顶部栏 */
.post-full .post-top-bar {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.post-full .post-top-bar .post-index {
  position: static;
  width: auto;
}

/* 分页样式 */
.pagination-wrapper {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  font-family: var(--font-sans);
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.pagination-link:hover {
  border-color: var(--text);
  color: var(--text);
}

.pagination-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.pagination-prev:hover .pagination-arrow {
  transform: translateX(-3px);
}

.pagination-next:hover .pagination-arrow {
  transform: translateX(3px);
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

/* 浏览记录『查看全部』 */
.sidebar-more {
  padding: 0.5rem 0;
  text-align: right;
}

.sidebar-more-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  transition: var(--transition);
}

.sidebar-more-link:hover {
  color: var(--text);
}

/* 阅读更多 */
.read-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text);
  font-family: var(--font-sans);
  transition: var(--transition);
  margin-top: 1rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text);
  font-family: var(--font-sans);
  transition: var(--transition);
}

.read-more:hover {
  color: var(--text-secondary);
}

.read-more-text {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.125rem;
  transition: var(--transition);
}

.read-more:hover .read-more-text {
  border-bottom-color: var(--text);
}

.read-more-arrow {
  margin-left: 0.5rem;
  transition: var(--transition);
}

.read-more:hover .read-more-arrow {
  transform: translateX(4px);
}

/* 操作按钮 */
.action-buttons {
  display: flex;
  gap: 1rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.action-btn:disabled:hover {
  border-color: var(--border);
  color: var(--text-secondary);
}

/* 收藏按钮 */
.favorite-btn .favorite-icon {
  font-size: 0.9rem;
  transition: var(--transition);
}

.favorite-btn.favorited {
  border-color: #D4A574;
  color: #D4A574;
}

.favorite-btn.favorited:hover {
  border-color: #D4A574;
  color: #D4A574;
}

/* 点赞按钮 */
.like-btn .like-icon {
  font-size: 0.9rem;
  transition: var(--transition);
}

.like-btn.liked {
  border-color: #C45C5C;
  color: #C45C5C;
}

.like-btn.liked:hover {
  border-color: #C45C5C;
  color: #C45C5C;
}

.like-btn .like-count {
  min-width: 1rem;
  text-align: center;
}

/* 侧边栏列表 */
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  display: flex;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-number {
  font-size: 0.7rem;
  color: var(--text-light);
  font-family: var(--font-sans);
  margin-right: 0.75rem;
  min-width: 1.5rem;
}

.sidebar-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: var(--transition);
}

.sidebar-link:hover {
  color: var(--text);
}

.sidebar-empty {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 0.5rem 0;
}

/* 分页 */
.pagination-wrapper {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.page-navigator {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-family: var(--font-sans);
}

.page-navigator li a {
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.page-navigator li a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

.page-navigator li.current a {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 6rem 0;
  color: var(--text-muted);
}

/* ========== 右侧栏 ========== */
#right-sidebar {
  position: relative;
}

.right-sidebar-inner {
  position: sticky;
  top: 4rem;
  padding-left: 2rem;
}

/* 小部件通用 */
.widget {
  margin-bottom: 3rem;
}

.widget-title {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-sans);
}

/* 关于小部件 */
.about-content {
  font-family: var(--font-sans);
}

.about-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-links {
  display: flex;
  gap: 0.75rem;
}

.about-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition);
}

.about-link:hover {
  border-color: var(--text);
  color: var(--text);
}

/* 最新文章列表 */
.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-post-item {
  display: flex;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.recent-post-item:last-child {
  border-bottom: none;
}

.recent-post-number {
  font-size: 0.7rem;
  color: var(--text-light);
  font-family: var(--font-sans);
  margin-right: 0.75rem;
  min-width: 1.5rem;
}

.recent-post-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: var(--transition);
}

.recent-post-link:hover {
  color: var(--text);
}

/* 分类列表 */
.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  border-bottom: 1px solid var(--border-light);
}

.category-item:last-child {
  border-bottom: none;
}

.category-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  transition: var(--transition);
}

.category-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.category-count {
  font-size: 0.75rem;
  color: var(--text-light);
  font-family: var(--font-sans);
}

.category-link:hover .category-name {
  color: var(--text);
}

/* 归档列表 */
.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-item {
  border-bottom: 1px solid var(--border-light);
}

.archive-item:last-child {
  border-bottom: none;
}

.archive-link {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  transition: var(--transition);
}

.archive-link:hover {
  color: var(--text);
}

/* 侧边栏装饰 */
.sidebar-deco {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.deco-circle {
  width: 6px;
  height: 6px;
  background: var(--border);
  border-radius: 50%;
  margin-bottom: 1rem;
}

.deco-line {
  width: 40px;
  height: 1px;
  background: var(--border);
}

/* ========== 页脚 ========== */
#footer {
  margin-top: 6rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

#footer a {
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

#footer a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ========== 文章内页 ========== */
.post-full .post-title {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.post-full .post-meta {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.post-full .post-content {
  font-size: 1.1rem;
  line-height: 2.05;
}

.post-full .post-content h2,
.post-full .post-content h3,
.post-full .post-content h4 {
  margin-top: 3rem;
}

.post-full .post-content img {
  margin: 2.5rem 0;
}

/* 标签 */
.tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-sans);
}

.tags a {
  display: inline-block;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.375rem 0.875rem;
  background: var(--primary-light);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tags a:hover {
  background: var(--border);
  color: var(--text);
}

/* 文章导航 */
.post-nav {
  margin: 4rem 0;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
}

.post-nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 45%;
  transition: var(--transition);
}

.post-nav a:hover {
  color: var(--text);
}

/* 评论区 */
#comments {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-light);
}

#comments h3 {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  font-family: var(--font-display);
  font-weight: 500;
}

/* 评论列表 */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list li {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.comment-list li:last-child {
  border-bottom: none;
}

.comment-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2rem;
  width: 3px;
  height: 3px;
  background: var(--border);
  border-radius: 50%;
}

.comment-author {
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 500;
}

.comment-author a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.comment-author a:hover {
  border-bottom-color: var(--text);
}

.comment-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  margin-top: 0.25rem;
}

.comment-content {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.comment-content p {
  margin-bottom: 0.75rem;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-reply {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
}

.comment-reply a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.comment-reply a:hover {
  color: var(--text);
}

.comment-reply a::after {
  content: '→';
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.comment-reply a:hover::after {
  opacity: 1;
}

/* 评论分页 */
.comment-list + .page-navigator {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* 评论表单 */
.respond {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.respond h3 {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.cancel-comment-reply {
  margin-bottom: 1rem;
}

.cancel-comment-reply a {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  transition: var(--transition);
}

.cancel-comment-reply a:hover {
  color: var(--text);
}

/* 评论表单字段 */
#comment-form p {
  margin-bottom: 1.5rem;
}

#comment-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
}

#comment-form label.required::after {
  content: ' *';
  color: #C45C5C;
}

#comment-form input[type='text'],
#comment-form input[type='email'],
#comment-form input[type='url'],
#comment-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition);
  background: var(--bg);
}

#comment-form input:focus,
#comment-form textarea:focus {
  outline: none;
  border-color: var(--text);
}

#comment-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.7;
}

#comment-form .submit {
  padding: 0.875rem 2.5rem;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

#comment-form .submit:hover {
  border-color: var(--text);
  color: var(--text);
}

.comment-hint {
  margin-left: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: var(--font-sans);
}

/* 登录状态提示 */
#comment-form > p:first-child {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  padding: 1rem;
  background: var(--primary-light);
  border-radius: var(--radius);
}

#comment-form > p:first-child a {
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

#comment-form > p:first-child a:hover {
  border-bottom-color: var(--text);
}

/* 404 页面 */
.error-page {
  text-align: center;
  padding: 8rem 0;
}

.error-page h1 {
  font-size: 6rem;
  margin-bottom: 1rem;
  color: var(--border);
  font-weight: 300;
}

.error-page p {
  color: var(--text-muted);
}

/* 归档页面 */
.archive-header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.archive-title {
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.archive-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.archive-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.archive-list li:last-child {
  border-bottom: none;
}

.archive-list .date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* 响应式 */
@media (max-width: 1024px) {
  .col-2, .col-3, .col-7 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #left-sidebar, #right-sidebar {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-light);
  }

  .left-sidebar-inner, .right-sidebar-inner {
    position: static;
    padding: 0;
  }

  .post-index {
    position: static;
    width: auto;
    margin-bottom: 0.5rem;
  }

  .main-content-wrapper {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  .row {
    margin: 0 -1.5rem;
  }

  [class*='col-'] {
    padding: 0 1.5rem;
  }

  #body {
    padding: 2rem 0;
  }

  .post-card {
    margin-bottom: 4rem;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .post-full .post-title {
    font-size: 1.75rem;
  }

  .site-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .brand-mark {
    margin-bottom: 0;
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .side-nav-item {
    padding: 0.5rem 0;
  }

  .post-nav {
    flex-direction: column;
    gap: 1.5rem;
  }

  .post-nav a {
    max-width: 100%;
  }
}

/* 辅助类 */
.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Footer 留言板链接 */
.footer-divider {
  margin: 0 0.5rem;
  color: var(--text-muted);
}

.footer-guestbook-link {
  color: var(--text-secondary);
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.footer-guestbook-link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* 右下角浮动留言板按钮 */
.guestbook-float-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  border-radius: 50px;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

html[data-theme="dark"] .guestbook-float-btn {
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.guestbook-float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .guestbook-float-btn:hover {
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.15);
}

.guestbook-float-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.guestbook-float-btn svg {
  flex-shrink: 0;
}

.guestbook-float-text {
  font-weight: 500;
}

/* 响应式：移动端只显示图标 */
@media (max-width: 768px) {
  .guestbook-float-btn {
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.875rem;
  }

  .guestbook-float-text {
    display: none;
  }
}
