/* ==================== 现代博客样式 - Modern Clean Design ==================== */

/* -------------------- CSS 变量 -------------------- */
:root {
  /* 主色调 - 清新蓝 */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-subtle: #eff6ff;
  
  /* 文字色 */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #ffffff;
  
  /* 背景色 */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-active: #e2e8f0;
  
  /* 边框 */
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* 圆角 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* 过渡 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 间距 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  font-weight: 400;
}

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

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

a:hover {
  color: var(--primary-dark);
}

/* -------------------- 容器 -------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* -------------------- 头部导航 -------------------- */
header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition);
}

header.scrolled {
  box-shadow: var(--shadow);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-4);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
  color: var(--primary);
  text-decoration: none;
}

/* 导航 */
.nav-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex: 1;
  justify-content: flex-end;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.main-nav a {
  padding: var(--space-2) var(--space-4);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all var(--transition);
  transform: translateX(-50%);
  border-radius: 2px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: var(--primary-subtle);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 60%;
}

/* 用户区域 */
.user-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.user-area a {
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.user-area a:hover {
  background: var(--bg-hover);
}

.user-area .btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
}

.user-area .btn-primary:hover {
  background: var(--primary-dark);
}

/* 汉堡菜单 */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  padding: 8px;
  gap: 5px;
}

.menu-toggle:hover {
  background: var(--bg-hover);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* -------------------- 面包屑 -------------------- */
#breadcrumb {
  background: var(--bg-card);
  padding: var(--space-3) 0;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-light);
}

#breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

#breadcrumb a:hover {
  color: var(--primary);
}

#breadcrumb span {
  margin: 0 var(--space-2);
}

/* -------------------- 主内容 -------------------- */
main {
  min-height: calc(100vh - 300px);
  padding: var(--space-8) 0;
}

/* 单栏内容布局 */
.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* -------------------- 首页布局 -------------------- */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
  padding: 0 var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

/* -------------------- 文章卡片 -------------------- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.post-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-slow);
  border: 1px solid var(--border-light);
}

.post-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.post-item .post-cover {
  display: block;
  overflow: hidden;
}

.post-item .post-cover img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform var(--transition-slow);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.post-item:hover .post-cover img {
  transform: scale(1.05);
}

.post-item .post-content {
  padding: var(--space-6);
}

.post-item h2 {
  margin-bottom: var(--space-3);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.4;
}

.post-item h2 a {
  color: var(--text-primary);
  background: linear-gradient(to right, var(--primary), var(--primary)) no-repeat;
  background-size: 0 2px;
  background-position: 0 100%;
  transition: background-size var(--transition);
}

.post-item h2 a:hover {
  color: var(--primary);
  text-decoration: none;
  background-size: 100% 2px;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* 文章摘要 - 限制3行显示 */
.post-summary {
  color: var(--text-secondary);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-weight: 500;
  font-size: 0.95rem;
  transition: gap var(--transition-fast);
}

.read-more:hover {
  gap: var(--space-3);
}

.read-more::after {
  content: '→';
  transition: transform var(--transition-fast);
}

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

/* -------------------- 侧边栏 -------------------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: sticky;
  top: 88px;
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}

.widget:hover {
  box-shadow: var(--shadow-md);
}

.widget h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--primary-light);
  color: var(--text-primary);
}

/* 分类列表 */
.category-list {
  list-style: none;
}

.category-list li {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

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

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.category-list a:hover {
  color: var(--primary);
  padding-left: var(--space-2);
}

.category-list .count {
  font-size: 0.8rem;
  background: var(--bg-hover);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.category-list a:hover .count {
  background: var(--primary-light);
  color: var(--primary);
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  display: inline-flex;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-page);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.tag:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
  text-decoration: none;
  transform: translateY(-2px);
}

/* 最新评论 */
.comment-list {
  list-style: none;
}

.comment-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.comment-list .author {
  color: var(--primary);
  font-weight: 500;
}

.comment-list a {
  color: var(--text-secondary);
}

.comment-list a:hover {
  color: var(--primary);
}

/* -------------------- 分页 -------------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--space-3);
  background: var(--bg-card);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  text-decoration: none;
}

.pagination .current {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

.pagination .prev,
.pagination .next {
  padding: 0 var(--space-5);
}

/* -------------------- 文章详情 -------------------- */
.post-detail {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.post-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-light);
}

.post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* 文章详情页封面 - 区别于卡片封面 */
.post-detail > .post-cover {
  margin: 0 calc(-1 * var(--space-8)) var(--space-6);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.post-detail > .post-cover img {
  width: 100%;
  border-radius: 0;
}

/* 文章详情内容 - 区别于卡片内容 */
.post-detail > .post-content {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.post-detail > .post-content h2,
.post-detail > .post-content h3,
.post-detail > .post-content h4 {
  margin: var(--space-8) 0 var(--space-4);
  color: var(--text-primary);
  font-weight: 600;
}

.post-detail > .post-content h2 {
  font-size: 1.5rem;
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--border-light);
}

.post-detail > .post-content h3 {
  font-size: 1.25rem;
}

.post-detail > .post-content p {
  margin-bottom: var(--space-5);
}

.post-detail > .post-content ul,
.post-detail > .post-content ol {
  margin-bottom: var(--space-5);
  padding-left: var(--space-5);
}

.post-detail > .post-content li {
  margin-bottom: var(--space-2);
}

.post-detail > .post-content blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5);
  background: var(--primary-subtle);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
}

.post-detail > .post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-detail > .post-content code {
  background: var(--bg-hover);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.875em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--primary-dark);
}

.post-detail > .post-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: var(--space-5);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: var(--space-5) 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-detail > .post-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-detail > .post-content img {
  border-radius: var(--radius);
  margin: var(--space-5) 0;
  box-shadow: var(--shadow-md);
}

.post-detail > .post-content a {
  color: var(--primary);
  border-bottom: 1px solid var(--primary-light);
  transition: border-color var(--transition-fast);
}

.post-detail > .post-content a:hover {
  border-bottom-color: var(--primary);
  text-decoration: none;
}

.post-detail > .post-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: var(--space-8) 0;
}

/* 文章元信息 */
.post-meta-full {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--text-tertiary);
  font-size: 0.9rem;
  margin-bottom: var(--space-3);
}

.post-categories, .post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* 上下篇导航 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-light);
}

.post-nav > div:empty {
  display: none;
}

.post-nav:has(> div:empty) {
  grid-template-columns: 1fr;
}

.post-nav a {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-page);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.post-nav a:hover {
  background: var(--primary-subtle);
  border-color: var(--primary-light);
  text-decoration: none;
  transform: translateY(-2px);
}

.post-nav .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-1);
}

.post-nav .title {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  font-size: 0.95rem;
}

/* -------------------- 评论区 -------------------- */
.comments-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-top: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.comments-section h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-5);
  color: var(--text-primary);
}

.comment-form {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

.comment-form textarea {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  resize: vertical;
  min-height: 100px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--bg-page);
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: var(--bg-card);
}

.comment {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border-light);
}

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

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
}

.comment-date {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.comment-content {
  margin: var(--space-3) 0;
  line-height: 1.75;
  color: var(--text-secondary);
}

.reply-btn {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}

.reply-btn:hover {
  color: var(--primary-dark);
}

.comment-children {
  margin-left: var(--space-6);
  padding-left: var(--space-6);
  border-left: 2px solid var(--border-light);
  margin-top: var(--space-4);
}

/* -------------------- 表单 -------------------- */
.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-fast);
  background: var(--bg-page);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: var(--bg-card);
}

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

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: 400;
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}

/* 表单提示 */
.form-group .hint {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-weight: 400;
}

/* 封面图片上传 */
.cover-upload {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: var(--space-4);
  background: var(--bg-page);
  transition: all var(--transition);
}

.cover-upload:hover {
  border-color: var(--primary-light);
}

.cover-preview {
  width: 100%;
  max-width: 300px;
  min-height: 80px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-preview:empty::before {
  content: '暂无封面图片';
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.cover-preview .uploading {
  color: var(--primary);
  font-size: 0.875rem;
  padding: var(--space-4);
}

.cover-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.cover-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.btn-secondary {
  background: var(--text-secondary);
  color: var(--text-inverse);
  border-color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

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

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn:hover {
  background: var(--bg-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
}

/* -------------------- 登录页 -------------------- */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-12) var(--space-6);
  min-height: calc(100vh - 200px);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.auth-container h1 {
  text-align: center;
  margin-bottom: var(--space-6);
  font-size: 1.5rem;
  font-weight: 700;
}

.auth-switch {
  text-align: center;
  margin-top: var(--space-5);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* -------------------- 用户中心 -------------------- */
.user-profile {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.user-header {
  text-align: center;
  padding: var(--space-8);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-md);
}

.avatar-default {
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
}

.user-header h1 {
  margin-top: var(--space-4);
  font-size: 1.35rem;
}

.user-header .bio {
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

.user-header .joined {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-top: var(--space-2);
}

.user-posts {
  background: var(--bg-card);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.user-posts h2 {
  margin-bottom: var(--space-6);
  font-size: 1.25rem;
}

.post-list-simple {
  list-style: none;
}

.post-list-simple li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border-light);
  gap: var(--space-4);
}

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

.post-list-simple a {
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
}

.post-list-simple a:hover {
  color: var(--primary);
}

.post-list-simple .status {
  font-size: 0.75rem;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-tertiary);
}

.post-list-simple .date {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* 个人设置 */
.user-settings {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.user-settings h1 {
  margin-bottom: var(--space-8);
  font-size: 1.5rem;
}

.user-settings h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-6);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-light);
  font-size: 1.15rem;
}

/* -------------------- 管理后台 -------------------- */
.admin-dashboard h1 {
  margin-bottom: var(--space-8);
  font-size: 1.75rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.stat-card {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card h3 {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
  font-weight: 500;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  border-color: transparent;
}

.stat-card.highlight h3,
.stat-card.highlight .stat-value {
  color: var(--text-inverse);
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.admin-section {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.admin-section h2 {
  font-size: 1.1rem;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

/* 管理表格 */
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-table th,
.admin-table td {
  padding: var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.admin-table th {
  font-weight: 600;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--bg-page);
}

.admin-table th:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.admin-table th:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.admin-table tr {
  transition: background var(--transition-fast);
}

.admin-table tbody tr:hover {
  background: var(--bg-hover);
}

.admin-table .actions {
  display: flex;
  gap: var(--space-2);
}

.admin-table .actions a {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.admin-table .actions a:hover {
  background: var(--primary-light);
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-tabs a {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--bg-page);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-tabs a:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

.filter-tabs a.active {
  background: var(--primary);
  color: var(--text-inverse);
}

/* 状态标签 */
.status-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-published {
  background: #dcfce7;
  color: #166534;
}

.status-draft {
  background: #fef3c7;
  color: #92400e;
}

.status-pending {
  background: #dbeafe;
  color: #1e40af;
}

.status-spam {
  background: #fee2e2;
  color: #991b1b;
}

.status-archived {
  background: #f3f4f6;
  color: #374151;
}

/* 内联表单 */
.inline-form {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.inline-form input {
  flex: 1;
  min-width: 200px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.inline-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* -------------------- 搜索页面 -------------------- */
.search-page {
  max-width: 800px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.search-form input {
  flex: 1;
  padding: var(--space-4) var(--space-6);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.search-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.search-form button {
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
}

.search-result {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--primary-subtle);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

/* -------------------- 归档页面 -------------------- */
.archive-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.archive-stats {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.archive-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.archive-title {
  color: var(--primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--primary-light);
  font-size: 1.1rem;
  font-weight: 600;
}

.archive-list {
  list-style: none;
}

.archive-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  transition: background var(--transition-fast);
}

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

.archive-list li:hover {
  background: var(--bg-hover);
  margin: 0 calc(-1 * var(--space-6));
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.archive-list .date {
  color: var(--text-tertiary);
  min-width: 60px;
  font-size: 0.9rem;
}

/* -------------------- 分类/标签页面 -------------------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}

.category-card {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  text-decoration: none;
}

.category-card h2 {
  margin-bottom: var(--space-3);
  font-size: 1.15rem;
  color: var(--primary);
}

.category-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.category-card .post-count {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.category-posts, .tag-posts {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.category-posts h1, .tag-posts h1 {
  margin-bottom: var(--space-4);
  font-size: 1.5rem;
}

.category-desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-light);
}

/* -------------------- 独立页面 -------------------- */
.page-detail {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.page-detail h1 {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-light);
  font-size: 1.75rem;
}

.page-content {
  line-height: 1.8;
  font-size: 1rem;
}

.post-editor, .page-editor {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}

.post-editor h2, .page-editor h1 {
  margin-bottom: var(--space-6);
  font-size: 1.35rem;
}

.settings-form {
  max-width: 600px;
}

/* -------------------- 页脚 -------------------- */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: var(--space-10) 0;
  margin-top: var(--space-12);
}

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

footer a:hover {
  color: var(--primary);
}

footer p {
  margin-bottom: var(--space-2);
  text-align: center;
}

/* -------------------- 空状态 -------------------- */
.empty {
  text-align: center;
  color: var(--text-tertiary);
  padding: var(--space-10);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--border-color);
}

.empty-state {
  text-align: center;
  padding: var(--space-12);
  color: var(--text-tertiary);
}

.empty-state p {
  font-size: 1.1rem;
}

/* -------------------- 提示页面 -------------------- */
.notice-page {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  max-width: 500px;
  margin: 0 auto;
}

.notice-page h1 {
  margin-bottom: var(--space-6);
  font-size: 1.5rem;
  color: var(--text-primary);
}

.notice-message {
  font-size: 1.1rem;
  margin-bottom: var(--space-8);
  color: var(--text-secondary);
}

.notice-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* -------------------- 响应式设计 -------------------- */

/* 平板及以下 */
@media (max-width: 1024px) {
  .home-layout {
    grid-template-columns: 1fr 280px;
    gap: var(--space-6);
  }

  .post-detail {
    padding: var(--space-6);
  }

  .post-detail > .post-cover {
    margin: 0 calc(-1 * var(--space-6)) var(--space-5);
  }

  .post-header h1 {
    font-size: 1.75rem;
  }
}

/* 平板 */
@media (max-width: 768px) {
  :root {
    --space-10: 32px;
    --space-12: 40px;
  }
  
  html {
    font-size: 15px;
  }
  
  .container {
    padding: 0 var(--space-4);
  }
  
  /* 导航 */
  header .container {
    flex-wrap: wrap;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-wrapper {
    display: none;
    width: 100%;
    order: 3;
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .nav-wrapper.show {
    display: flex;
    animation: slideDown var(--transition-slow) ease;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .main-nav {
    flex-direction: column;
    width: 100%;
    gap: var(--space-1);
  }
  
  .main-nav a {
    width: 100%;
    text-align: center;
    padding: var(--space-3);
    border-radius: var(--radius);
  }
  
  .main-nav a::after {
    display: none;
  }
  
  .user-area {
    width: 100%;
    justify-content: center;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
  }

  /* 布局 */
  .home-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding: 0 var(--space-4);
  }

  .sidebar {
    position: static;
    order: 2;
  }

  main {
    padding: var(--space-6) 0;
  }

  .main-content {
    padding: 0 var(--space-4);
  }

  /* 文章 */
  .post-item .post-cover img {
    height: 160px;
  }

  .post-detail {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
  }

  .post-detail > .post-cover {
    margin: 0 calc(-1 * var(--space-5)) var(--space-4);
  }

  .post-header h1 {
    font-size: 1.5rem;
  }

  .post-detail > .post-content {
    font-size: 1rem;
  }

  .post-detail > .post-content h2 {
    font-size: 1.25rem;
  }

  .post-detail > .post-content h3 {
    font-size: 1.1rem;
  }

  .post-nav {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .post-nav a {
    text-align: center;
  }
  
  /* 表格 */
  .admin-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
  }
  
  /* 统计卡片 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }
  
  .stat-card {
    padding: var(--space-5);
  }
  
  .stat-value {
    font-size: 1.75rem;
  }
  
  /* 管理 */
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-tabs {
    justify-content: center;
  }
  
  /* 分类 */
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .category-posts, .tag-posts {
    padding: var(--space-6);
  }
  
  /* 归档 */
  .archive-list li:hover {
    margin: 0 calc(-1 * var(--space-6));
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
  
  /* 搜索 */
  .search-form {
    flex-direction: column;
  }
  
  .search-form button {
    width: 100%;
  }
  
  /* 登录 */
  .auth-container {
    padding: var(--space-6);
  }

  /* 用户中心 */
  .user-header {
    padding: var(--space-6);
  }

  .post-list-simple li {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .post-list-simple .date {
    order: 3;
  }

  /* 评论 */
  .comments-section {
    padding: var(--space-5);
  }

  .comment-children {
    margin-left: var(--space-3);
    padding-left: var(--space-3);
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--space-3);
  }
  
  .logo {
    font-size: 1.25rem;
  }
  
  /* 统计卡片 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
  }
  
  .stat-card {
    padding: var(--space-4);
  }
  
  .stat-card h3 {
    font-size: 0.75rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  /* 快捷操作 */
  .quick-actions {
    justify-content: stretch;
  }
  
  .quick-actions .btn {
    flex: 1;
    text-align: center;
  }
  
  /* 分页 */
  .pagination a,
  .pagination span {
    min-width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }
  
  /* 页脚 */
  footer {
    padding: var(--space-8) 0;
  }
}

/* -------------------- 动画与特效 -------------------- */

/* 淡入动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-list .post-item {
  animation: fadeIn 0.5s ease forwards;
}

.post-list .post-item:nth-child(1) { animation-delay: 0.05s; }
.post-list .post-item:nth-child(2) { animation-delay: 0.1s; }
.post-list .post-item:nth-child(3) { animation-delay: 0.15s; }
.post-list .post-item:nth-child(4) { animation-delay: 0.2s; }
.post-list .post-item:nth-child(5) { animation-delay: 0.25s; }

/* 按钮点击效果 */
.btn:active,
button:active {
  transform: scale(0.98);
}

/* 打印样式 */
@media print {
  header, footer, .sidebar, .comment-form, .quick-actions, .menu-toggle, .post-nav {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .post-detail {
    box-shadow: none;
    border: none;
    padding: 0;
  }

  .post-detail > .post-cover {
    margin: 0 0 var(--space-4) 0;
  }

  main {
    min-height: auto;
    padding: 0;
  }
}
