* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow: hidden;
  height: 100vh;
}

.wrapper {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ---------- 侧边栏样式 ---------- */
.sidebar {
  width: 15px !important;
  background-color: #e6e9ef;
  transition: width 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-right: 2px solid #b0b7c4;
  cursor: pointer;
  height: 100vh;
  flex-shrink: 0;
}

.sidebar::after {
  content: '▶';
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #666;
  background: white;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  line-height: 14px;
  text-align: center;
  border: 1px solid #999;
  opacity: 0.8;
  z-index: 5;
}

.sidebar:hover::after {
  content: '◀';
  color: #0366d6;
  border-color: #0366d6;
}

.sidebar-inner {
  width: 250px;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  background-color: #f8f9fa;
}

.sidebar-inner::-webkit-scrollbar {
  width: 4px;
}
.sidebar-inner::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.sidebar-inner::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.sidebar:hover {
  width: 250px !important;
}
.sidebar:hover .sidebar-inner {
  opacity: 1;
}
.sidebar.pinned {
  width: 250px !important;
}
.sidebar.pinned .sidebar-inner {
  opacity: 1 !important;
}

/* 固定按钮 */
.pin-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: 1px solid #ddd;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 10;
  display: none;
  background-color: white;
}
.sidebar:hover .pin-btn,
.sidebar.pinned .pin-btn {
  display: block;
}
.pin-btn.active {
  color: #0366d6;
  border-color: #0366d6;
}

/* 侧边栏导航 */
.sidebar-nav a,
.recent-posts a {
  display: block;
  padding: 8px 0;
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #eee;
}
.sidebar-nav a:hover,
.recent-posts a:hover {
  color: #0366d6;
  padding-left: 5px;
}
.sidebar h3 {
  font-size: 14px;
  margin: 20px 0 10px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- 主内容区 ---------- */
.main-content {
  flex: 1;
  background-color: #ffffff;
  height: 100vh;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  position: relative;
}
.content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 30px 80px;
}

/* 文章列表 */
.posts-list {
  width: 100%;
}
.page-title {
  font-size: 2em;
  margin-bottom: 40px;
  color: #222;
}
.post-preview {
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}
.post-title {
  font-size: 1.8em;
  margin-bottom: 10px;
}
.post-title a {
  color: #222;
  text-decoration: none;
}
.post-title a:hover {
  color: #0366d6;
}
.post-meta {
  color: #999;
  font-size: 0.9em;
  margin-bottom: 15px;
}
.post-excerpt {
  margin-bottom: 15px;
  color: #555;
}
.read-more {
  color: #0366d6;
  text-decoration: none;
  font-size: 0.95em;
}

/* 文章详情页 */
.post-full {
  width: 100%;
}
.post-header {
  margin-bottom: 40px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}
.post-content {
  font-size: 1.1em;
  line-height: 1.8;
}
.post-content h1,
.post-content h2,
.post-content h3 {
  margin: 30px 0 15px;
}
.post-content p {
  margin-bottom: 20px;
}
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
}
.post-footer {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.post-tags a {
  color: #0366d6;
  text-decoration: none;
  margin-right: 10px;
}

/* 分页 */
.pagination {
  text-align: center;
  margin: 50px 0;
  padding: 20px 0;
}
.pagination a {
  color: #0366d6;
  text-decoration: none;
  margin: 0 10px;
}
.page-number {
  margin: 0 15px;
  color: #999;
}

/* ---------- 博主信息 ---------- */
.blogger-info {
  text-align: center;
  padding: 10px 0 15px;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}
.avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin-bottom: 10px;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.blogger-info h3 {
  margin: 5px 0;
  font-size: 16px;
  color: #333;
}
.bio {
  font-size: 12px;
  color: #777;
  margin: 5px 0 10px;
  line-height: 1.4;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}
.social-links a {
  color: #666;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s;
}
.social-links a:hover {
  color: #0366d6;
}

/* ---------- 搜索框（已注释） ---------- */
/* .search-box {...} */

/* ---------- 站点统计 ---------- */
.site-stats {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.stat-item {
  text-align: center;
  padding: 8px;
  background: #f5f7fa;
  border-radius: 6px;
  transition: transform 0.2s;
}
.stat-item:hover {
  transform: translateY(-2px);
  background: #e8ecf2;
}
.stat-value {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #0366d6;
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-size: 11px;
  color: #777;
  margin-top: 4px;
}

/* 运行天数 */
.runtime {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px dashed #eee;
  text-align: center;
  font-size: 14px;
  color: #666;
}
.runtime-label {
  margin-right: 5px;
}
.runtime-value {
  font-weight: bold;
  color: #0366d6;
  font-size: 18px;
  margin: 0 3px;
}
.runtime-unit {
  font-size: 12px;
  color: #999;
}

/* ---------- 固定在底部的字数统计 ---------- */
.fixed-wordcount {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 1000;
  padding: 8px 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
}
.fixed-wordcount-content {
  max-width: 900px;
  width: 100%;
  padding: 0 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}
.fixed-wordcount-content strong {
  color: #0366d6;
  font-size: 16px;
  margin: 0 5px 0 2px;
}
.fixed-wordcount-content span {
  margin-right: 20px;
}
.sidebar:hover ~ .main-content .fixed-wordcount,
.sidebar.pinned ~ .main-content .fixed-wordcount {
  left: 250px;
  right: 0;
}
.sidebar:hover ~ .main-content .fixed-wordcount-content,
.sidebar.pinned ~ .main-content .fixed-wordcount-content {
  max-width: calc(900px - 0px);
}
.content-wrapper {
  padding-bottom: 80px;
}

/* ---------- 分类页 ---------- */
.categories-page,
.tags-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.category-list {
  display: grid;
  gap: 15px;
  margin-top: 30px;
}

.category-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px 20px;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}
.category-item:hover {
  background: #e8ecf2;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.category-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #333;
}
.category-item h2 {
  margin: 0;
  font-size: 18px;
  color: #0366d6;
}
.post-count {
  color: #666;
  font-size: 14px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ---------- 标签页（列表样式，与分类页一致） ---------- */
.tag-list {
  display: grid;
  gap: 15px;
  margin-top: 30px;
}
.tag-list .tag-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px 20px;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}
.tag-list .tag-item:hover {
  background: #e8ecf2;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tag-list .tag-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #333;
}
.tag-list .tag-item h2 {
  margin: 0;
  font-size: 18px;
  color: #0366d6;
}
.tag-list .post-count {
  color: #666;
  font-size: 14px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 20px;
}

/* ---------- 标签云（保留作为备用，如果需要可取消注释） ----------
.tag-cloud {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 15px;
  justify-content: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}
.tag-item {
  display: inline-block;
  padding: 6px 16px;
  background: white;
  border-radius: 30px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e0e4e9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.tag-item:hover {
  background: #0366d6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(3,102,214,0.2);
  border-color: #0366d6;
}
.tag-count {
  margin-left: 6px;
  font-size: 0.8em;
  color: #999;
  background: #f0f2f5;
  padding: 2px 6px;
  border-radius: 12px;
}
.tag-item:hover .tag-count {
  background: rgba(255,255,255,0.2);
  color: white;
}
*/

/* ---------- 无数据提示 ---------- */
.no-data {
  text-align: center;
  color: #999;
  padding: 40px;
  font-size: 16px;
}