﻿/*
Theme Name: SkyStarry星空简约风格主题
Theme URI: https://www.blog.skyllyf.cc
Author: 林霖澐枫
Author URI: https://www.blog.skyllyf.cc
Description: 基于 FSS 设计风格的 WordPress 主题,具有精美的星空渐变背景效果。包含博客、关于页面等功能模块,支持响应式布局、深色模式和辅助功能。
Version: 4.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: skystarry
Tags: blog, portfolio, custom-background, custom-menu, featured-images, responsive-layout, translation-ready, dark-mode, accessibility-ready, full-site-editing
*/

/* ========================================
   一、初始化配色与基础结构
   ======================================== */

/* 初始化配色 */
:root {
  --primary-blue: #009FFD;
  --gradient-start: #667eea;
  --gradient-end: #764ba2;
  --nav-bg-desktop: rgba(255, 255, 255, 0);
  --nav-bg-mobile: rgba(255, 255, 255, 0);
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-tertiary: #94A3B8;
}

/* 初始化结构 */
* {
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1E293B;
  background-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* 通用链接样式 */
.site-content a,
.site-navigation a {
  color: #3B82F6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-content a:hover,
.site-navigation a:hover {
  color: #60A5FA;
}

.site-content img,
.site-content .container img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   二、通用样式区域
   (按PHP文件结构顺序排列)
   ======================================== */

/* -------------- 1. Header 区域通用样式 -------------- */

/* Canvas 背景 */
#starry-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* 导航栏 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg-desktop);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  backdrop-filter: blur(10px);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-branding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: #1E293B;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-description {
  font-size: 0.875rem;
  color: #64748B;
  margin: 0.25rem 0 0 0;
}

/* 主导航菜单 */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.main-navigation a {
  color: #1E293B;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), #6366f1);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after {
  width: 100%;
}

/* 主题切换按钮 */
.theme-toggle-wrapper {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: #64748B;
}

/* 通知栏 */

/* 搜索覆盖层 */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 9998;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-overlay.active {
  display: block;
  opacity: 1;
}

.search-container {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  z-index: 9999;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-field {
  flex: 1;
  padding: 0.875rem 1rem;
  font-size: 1.125rem;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  background: transparent;
  color: #1E293B;
  transition: border-color 0.2s ease;
}

.search-field:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-submit {
  padding: 0.875rem 1.5rem;
  background: var(--primary-blue);
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-submit:hover {
  background: #2563EB;
}

.search-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #64748B;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-close:hover {
  background: #F1F5F9;
  color: #1E293B;
}

/* 搜索结果容器 */
.search-results-container {
  position: absolute;
  top: calc(40% + 60px);
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  max-height: 50vh;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 9998;
  display: none;
  padding: 0.5rem;
}

.search-results-container.show {
  display: block;
}

.search-loading,
.search-no-results,
.search-error {
  text-align: center;
  padding: 2rem;
  color: #64748B;
  font-size: 0.9375rem;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-result-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: #F8FAFC;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  color: #1E293B;
}

.search-result-card:hover {
  background: var(--primary-blue);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.search-result-thumb {
  flex: 0 0 100px;
  width: 100px;
  height: 75px;
  border-radius: 6px;
  overflow: hidden;
  background: #E2E8F0;
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.search-result-card:hover .search-result-thumb img {
  transform: scale(1.1);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  font-size: 0.8125rem;
  color: #64748B;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-result-card:hover .search-result-meta {
  color: rgba(255, 255, 255, 0.9);
}

.search-result-author::before {
  content: '作者: ';
}

.search-result-excerpt {
  font-size: 0.875rem;
  color: #94A3B8;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-card:hover .search-result-excerpt {
  color: rgba(255, 255, 255, 0.8);
}

/* 深色模式搜索 */
[data-theme="dark"] .search-overlay {
  background: rgba(15, 23, 42, 0.98);
}

[data-theme="dark"] .search-field {
  background: transparent;
  border-color: #334155;
  color: #F1F5F9;
}

[data-theme="dark"] .search-field:focus {
  border-color: #60A5FA;
}

[data-theme="dark"] .search-submit {
  background: #60A5FA;
}

[data-theme="dark"] .search-submit:hover {
  background: #3B82F6;
}

[data-theme="dark"] .search-close {
  color: #94A3B8;
}

[data-theme="dark"] .search-close:hover {
  background: #1E293B;
  color: #F1F5F9;
}

[data-theme="dark"] .search-results-container {
  background: #1E293B;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .search-loading,
[data-theme="dark"] .search-no-results,
[data-theme="dark"] .search-error {
  color: #94A3B8;
}

[data-theme="dark"] .search-result-card {
  background: #0F172A;
  color: #F1F5F9;
}

[data-theme="dark"] .search-result-card:hover {
  background: #60A5FA;
  color: #FFFFFF;
}

[data-theme="dark"] .search-result-thumb {
  background: #334155;
}

[data-theme="dark"] .search-result-meta {
  color: #94A3B8;
}

[data-theme="dark"] .search-result-excerpt {
  color: #64748B;
}
.site-notification {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #FFFFFF;
  padding: 0.75rem 0;
  text-align: center;
  font-size: 0.875rem;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.site-notification.show {
  transform: translateY(0);
}

.notification-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.notification-close:hover {
  opacity: 1;
}

/* -------------- 2. 首页通用样式 -------------- */

/* 英雄区域 */
.hero-section {
  position: relative;
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease;
}

.hero-description {
  font-size: 1.125rem;
  color: #64748B;
  margin: 0 0 2rem 0;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-cta {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 9999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* 文章列表区域 */
.posts-section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  text-align: center;
  color: #1E293B;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.post-card {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.post-card-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
}

.post-card-title a {
  color: #1E293B;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card-title a:hover {
  color: var(--primary-blue);
}

.post-card-excerpt {
  color: #64748B;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.post-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* 分页导航 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination a {
  background: #FFFFFF;
  color: #1E293B;
  border: 1px solid #E2E8F0;
}

.pagination a:hover {
  background: var(--primary-blue);
  color: #FFFFFF;
  border-color: var(--primary-blue);
}

.pagination .current {
  background: var(--primary-blue);
  color: #FFFFFF;
}

/* -------------- 3. 单篇文章通用样式 -------------- */

/* 文章页内容区域 */
.single-post-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.entry-header {
  margin-bottom: 2rem;
  text-align: center;
}

.entry-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.entry-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #64748B;
  flex-wrap: wrap;
}

.entry-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin: 2rem 0 1rem 0;
  font-weight: 700;
  line-height: 1.3;
}

.entry-content h1 {
  font-size: 2.25rem;
}

.entry-content h2 {
  font-size: 1.875rem;
}

.entry-content h3 {
  font-size: 1.5rem;
}

.entry-content h4 {
  font-size: 1.25rem;
}

.entry-content p {
  margin: 0 0 1.5rem 0;
}

.entry-content a {
  color: var(--primary-blue);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary-blue);
}

.entry-content a:hover {
  border-bottom-style: solid;
}

.entry-content ul,
.entry-content ol {
  margin: 0 0 1.5rem 1.5rem;
}

.entry-content li {
  margin: 0.5rem 0;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary-blue);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(59, 130, 246, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #475569;
}

.entry-content code {
  background: #F1F5F9;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  color: #DC2626;
}

.entry-content pre {
  background: #1E293B;
  color: #F8FAFC;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.entry-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.entry-content th,
.entry-content td {
  border: 1px solid #E2E8F0;
  padding: 0.75rem;
  text-align: left;
}

.entry-content th {
  background: #F8FAFC;
  font-weight: 600;
}

/* 文章标签和分类 */
.entry-tags,
.entry-categories {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.entry-tags span,
.entry-categories span {
  background: #F1F5F9;
  color: #64748B;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.entry-tags span:hover,
.entry-categories span:hover {
  background: var(--primary-blue);
  color: #FFFFFF;
}

/* 文章导航 */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid #E2E8F0;
  margin-top: 2rem;
}

.nav-links {
  flex: 1;
}

.nav-previous a,
.nav-next a {
  display: block;
  text-decoration: none;
  color: #1E293B;
  transition: color 0.2s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
  color: var(--primary-blue);
}

.post-navigation-title {
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
}

/* -------------- 4. 关于页面通用样式 -------------- */

/* 关于页面容器 */
.about-page-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
  gap: 2rem;
}

.about-page-wrapper.no-toc {
  justify-content: center;
}

/* 关于页面左侧内容区 */
.about-content-left {
  flex: 0 0 70%;
  max-width: 70%;
}

.about-page-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155;
}

.about-page-content h1,
.about-page-content h2,
.about-page-content h3,
.about-page-content h4,
.about-page-content h5,
.about-page-content h6 {
  margin: 2rem 0 1rem 0;
  font-weight: 700;
  line-height: 1.3;
}

.about-page-content p {
  margin: 0 0 1.5rem 0;
}

/* 关于页面导航 */
.about-page-nav {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  border-left: 2px solid #E2E8F0;
  padding-left: 1.5rem;
}

.about-toc {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-item {
  display: block;
  color: #64748B;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  padding-left: 0;
}

.toc-item:hover {
  color: var(--primary-blue);
  border-left-color: var(--primary-blue);
}

.toc-item.level-2 {
  font-weight: 600;
}

.toc-item.level-3 {
  padding-left: 1rem;
}

.toc-item.level-4 {
  padding-left: 2rem;
}

/* 关于页面侧边栏 */
.about-sidebar {
  flex: 0 0 20%;
  max-width: 20%;
}

/* 博主信息小工具 */
.about-author-widget {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
  margin-bottom: 2rem;
}

.about-author-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
}

.about-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-author-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #1E293B;
}

.about-author-description {
  color: #64748B;
  font-size: 0.875rem;
  margin: 0 0 1.5rem 0;
}

/* 联系方式列表 */
.about-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #F8FAFC;
  border-radius: 8px;
  text-decoration: none;
  color: #1E293B;
  transition: all 0.2s ease;
}

.contact-item:hover {
  background: var(--primary-blue);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* -------------- 5. 页脚通用样式 -------------- */

.site-footer {
  background: #1E293B;
  color: #94A3B8;
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: #FFFFFF;
  font-size: 1.125rem;
  margin: 0 0 1rem 0;
}

.footer-section p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin: 0.5rem 0;
}

.footer-section a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8125rem;
}

.footer-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* -------------- 6. 灯箱通用样式 -------------- */

/* 归档页面样式 */
.archive-page {
  padding: 4rem 2rem;
}

.archive-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.archive-header {
  text-align: center;
  margin-bottom: 3rem;
}

.archive-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.archive-description {
  font-size: 1.125rem;
  color: #64748B;
  margin: 0;
}

.archive-list {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.archive-year {
  margin-bottom: 2rem;
}

.archive-year:last-child {
  margin-bottom: 0;
}

.archive-year-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: #1E293B;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-blue);
}

.archive-month {
  margin-bottom: 1.5rem;
}

.archive-month-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #64748B;
}

.archive-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.archive-post-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #F1F5F9;
  transition: all 0.2s ease;
}

.archive-post-item:last-child {
  border-bottom: none;
}

.archive-post-item:hover {
  background: #F8FAFC;
  padding-left: 1rem;
}

.archive-post-date {
  flex: 0 0 80px;
  font-size: 0.875rem;
  color: #94A3B8;
  font-weight: 500;
}

.archive-post-link {
  flex: 1;
  color: #1E293B;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.archive-post-link:hover {
  color: var(--primary-blue);
}

.archive-post-comments {
  flex: 0 0 auto;
  font-size: 0.8125rem;
  color: #94A3B8;
  background: #F1F5F9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.archive-empty {
  text-align: center;
  padding: 3rem;
  color: #64748B;
  font-size: 1.125rem;
}

/* 归档按钮样式 */

/* 留言板样式 */
.guestbook-page {
  padding: 4rem 2rem;
}

.guestbook-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.guestbook-header {
  text-align: center;
  margin-bottom: 3rem;
}

.guestbook-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.guestbook-description {
  font-size: 1.125rem;
  color: #64748B;
  margin: 0;
  line-height: 1.8;
}

.guestbook-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-radius: 12px;
}

.guestbook-stat-item {
  text-align: center;
}

.guestbook-stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.2;
}

.guestbook-stat-label {
  display: block;
  font-size: 0.9375rem;
  color: #64748B;
  margin-top: 0.5rem;
}

.guestbook-form-section {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.guestbook-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  color: #1E293B;
}

.comment-notes {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 1rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-comment {
  margin-bottom: 1rem;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label,
.comment-form-comment label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1E293B;
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%;
}

.comment-form-comment textarea {
  width: 100%;
  min-height: 150px;
}

.guestbook-submit {
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--primary-blue), #6366f1);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.guestbook-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.guestbook-comments {
  margin-top: 3rem;
}

.guestbook-comments-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  color: #1E293B;
  text-align: center;
}

.guestbook-comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guestbook-comment {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.guestbook-comment:hover {
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.guestbook-comment-inner {
  display: flex;
  gap: 1rem;
}

.guestbook-comment-avatar {
  flex: 0 0 50px;
}

.guestbook-comment-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.guestbook-comment-content {
  flex: 1;
  min-width: 0;
}

.guestbook-comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.guestbook-comment-author {
  font-weight: 600;
  color: #1E293B;
}

.guestbook-comment-author a {
  color: #1E293B;
  text-decoration: none;
}

.guestbook-comment-author a:hover {
  color: var(--primary-blue);
}

.guestbook-comment-badge {
  background: var(--primary-blue);
  color: #FFFFFF;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.guestbook-comment-date {
  font-size: 0.8125rem;
  color: #94A3B8;
}

.guestbook-comment-text {
  color: #475569;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.guestbook-comment-text p:last-child {
  margin-bottom: 0;
}

.guestbook-comment-actions {
  display: flex;
  gap: 0.5rem;
}

.guestbook-comment-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: #E2E8F0;
  color: #64748B;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.guestbook-comment-actions a:hover {
  background: var(--primary-blue);
  color: #FFFFFF;
}

.guestbook-comment-actions a svg {
  width: 14px;
  height: 14px;
}

.guestbook-no-comments {
  text-align: center;
  padding: 4rem 2rem;
  background: #F8FAFC;
  border-radius: 12px;
}

.guestbook-no-comments-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  color: #CBD5E1;
}

.guestbook-no-comments h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #1E293B;
}

.guestbook-no-comments p {
  font-size: 1.125rem;
  color: #64748B;
  margin: 0;
}

.guestbook-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.guestbook-pagination a,
.guestbook-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.guestbook-pagination a {
  background: #FFFFFF;
  color: #1E293B;
  border: 1px solid #E2E8F0;
}

.guestbook-pagination a:hover {
  background: var(--primary-blue);
  color: #FFFFFF;
  border-color: var(--primary-blue);
}

.guestbook-pagination span.current {
  background: var(--primary-blue);
  color: #FFFFFF;
}

/* 深色模式留言板 */
[data-theme="dark"] .guestbook-title {
  background: linear-gradient(135deg, #60A5FA, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .guestbook-description {
  color: #94A3B8;
}

[data-theme="dark"] .guestbook-stats {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(167, 139, 250, 0.1));
}

[data-theme="dark"] .guestbook-form-section {
  background: #1E293B;
}

[data-theme="dark"] .guestbook-form-title {
  color: #F1F5F9;
}

[data-theme="dark"] .comment-notes {
  color: #94A3B8;
}

[data-theme="dark"] .comment-form-author label,
[data-theme="dark"] .comment-form-email label,
[data-theme="dark"] .comment-form-url label,
[data-theme="dark"] .comment-form-comment label {
  color: #F1F5F9;
}

[data-theme="dark"] .guestbook-submit {
  background: linear-gradient(135deg, #60A5FA, #A78BFA);
}

[data-theme="dark"] .guestbook-comments-title {
  color: #F1F5F9;
}

[data-theme="dark"] .guestbook-comment {
  background: #0F172A;
}

[data-theme="dark"] .guestbook-comment:hover {
  background: #1E293B;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .guestbook-comment-author {
  color: #F1F5F9;
}

[data-theme="dark"] .guestbook-comment-author a {
  color: #F1F5F9;
}

[data-theme="dark"] .guestbook-comment-author a:hover {
  color: #60A5FA;
}

[data-theme="dark"] .guestbook-comment-date {
  color: #64748B;
}

[data-theme="dark"] .guestbook-comment-text {
  color: #E2E8F0;
}

[data-theme="dark"] .guestbook-comment-actions a {
  background: #1E293B;
  color: #94A3B8;
}

[data-theme="dark"] .guestbook-comment-actions a:hover {
  background: #60A5FA;
  color: #FFFFFF;
}

[data-theme="dark"] .guestbook-no-comments {
  background: #0F172A;
}

[data-theme="dark"] .guestbook-no-comments h3 {
  color: #F1F5F9;
}

[data-theme="dark"] .guestbook-no-comments p {
  color: #94A3B8;
}

[data-theme="dark"] .guestbook-pagination a {
  background: #1E293B;
  color: #F1F5F9;
  border-color: #334155;
}

[data-theme="dark"] .guestbook-pagination a:hover {
  background: #60A5FA;
  border-color: #60A5FA;
}
.archive-toggle {
  padding: 0;
  background: none;
  border: none;
  color: #1E293B;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.archive-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary-blue);
}

/* 深色模式归档 */
[data-theme="dark"] .archive-title {
  background: linear-gradient(135deg, #60A5FA, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .archive-description {
  color: #94A3B8;
}

[data-theme="dark"] .archive-list {
  background: #1E293B;
}

[data-theme="dark"] .archive-year-title {
  color: #F1F5F9;
  border-bottom-color: #60A5FA;
}

[data-theme="dark"] .archive-month-title {
  color: #94A3B8;
}

[data-theme="dark"] .archive-post-item:hover {
  background: #0F172A;
}

[data-theme="dark"] .archive-post-link {
  color: #F1F5F9;
}

[data-theme="dark"] .archive-post-link:hover {
  color: #60A5FA;
}

[data-theme="dark"] .archive-post-date {
  color: #64748B;
}

[data-theme="dark"] .archive-post-comments {
  background: #0F172A;
  color: #64748B;
}

[data-theme="dark"] .archive-empty {
  color: #94A3B8;
}

[data-theme="dark"] .archive-toggle {
  color: #F1F5F9;
}

[data-theme="dark"] .archive-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #60A5FA;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFFFFF;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFFFFF;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* 图片灯箱触发器 */
.lightbox-trigger {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.lightbox-trigger:hover {
  transform: scale(1.02);
}

/* -------------- 7. 侧边栏通用样式 -------------- */

.sidebar {
  width: 300px;
  padding: 0 0 2rem;
}

.widget {
  background: transparent;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #1E293B;
  border-bottom: 2px solid #E2E8F0;
  padding-bottom: 0.5rem;
}

.widget-content {
  font-size: 0.875rem;
  color: #64748B;
}

.recent-post-item {
  display: block;
  padding: 0.5rem 0;
  color: #64748B;
  text-decoration: none;
  border-bottom: 1px solid #F1F5F9;
  transition: color 0.2s ease;
}

.recent-post-item:last-child {
  border-bottom: none;
}

.recent-post-item:hover {
  color: var(--primary-blue);
}

/* -------------- 8. 表单通用样式 -------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: transparent;
  color: #1E293B;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button,
input[type="submit"],
input[type="button"] {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-blue);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-4px);
  background: #6366f1;
}

/* -------------- 9. 动画通用样式 -------------- */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 页面加载动画 */
.page-loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #FFFFFF;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loading.loaded {
  opacity: 0;
  visibility: hidden;
}

.page-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #F1F5F9;
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 页面内容淡入动画 */
.site-main {
  animation: fadeIn 0.6s ease;
}

/* ========================================
   三、页面特有CSS类区域
   (按页面分类,按页面结构顺序排列)
   ======================================== */

/* -------------- 首页特有样式 -------------- */

/* 英雄区域装饰 */
.hero-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-decoration::before,
.hero-decoration::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--gradient-end));
  opacity: 0.1;
}

.hero-decoration::before {
  width: 400px;
  height: 400px;
  top: -200px;
  right: -200px;
}

.hero-decoration::after {
  width: 300px;
  height: 300px;
  bottom: -150px;
  left: -150px;
}

/* 精选图片灯箱区域 */
.featured-lightbox {
  padding: 4rem 0;
  background: rgba(248, 250, 252, 0.5);
}

.lightbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.lightbox-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.lightbox-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.lightbox-item:hover img {
  transform: scale(1.1);
}

.lightbox-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-item:hover::after {
  opacity: 1;
}

/* -------------- 单篇文章特有样式 -------------- */

/* 文章特色图片 */
.post-thumbnail-wrapper {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}

.post-thumbnail-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* 二维码分享区域 */
.qr-share-section {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.qr-share-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #1E293B;
}

.qr-code-container {
  display: inline-block;
  padding: 1rem;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* -------------- 关于页面特有样式 -------------- */

/* 关于页面目录高亮 */
.toc-item.active {
  color: var(--primary-blue);
  font-weight: 600;
  border-left-color: var(--primary-blue);
}

/* -------------- 深色模式样式 (按页面结构排列) -------------- */

/* 深色模式通用样式 */
[data-theme="dark"] {
  --text-primary: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-tertiary: #94A3B8;
  --nav-bg-desktop: rgba(15, 23, 42, 0.9);
  --nav-bg-mobile: rgba(15, 23, 42, 0.9);
}

[data-theme="dark"] body {
  background-color: #0F172A;
  color: #F1F5F9;
}

[data-theme="dark"] .site-title a {
  background: linear-gradient(135deg, #60A5FA, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .site-description {
  color: #94A3B8;
}

[data-theme="dark"] .main-navigation a {
  color: #F1F5F9;
}

[data-theme="dark"] .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .site-header.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 深色模式首页样式 */
[data-theme="dark"] .hero-title {
  background: linear-gradient(135deg, #60A5FA, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .hero-description {
  color: #94A3B8;
}

[data-theme="dark"] .post-card {
  background: #1E293B;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .post-card-title a {
  color: #F1F5F9;
}

[data-theme="dark"] .post-card-title a:hover {
  color: #60A5FA;
}

[data-theme="dark"] .post-card-excerpt {
  color: #94A3B8;
}

[data-theme="dark"] .post-card-meta {
  color: #64748B;
}

[data-theme="dark"] .pagination a {
  background: #1E293B;
  color: #F1F5F9;
  border-color: #334155;
}

[data-theme="dark"] .pagination a:hover {
  background: #60A5FA;
  border-color: #60A5FA;
}

/* 深色模式单篇文章样式 */
[data-theme="dark"] .entry-title {
  color: #F1F5F9;
}

[data-theme="dark"] .entry-meta {
  color: #94A3B8;
}

[data-theme="dark"] .entry-content {
  color: #E2E8F0;
}

[data-theme="dark"] .entry-content h1,
[data-theme="dark"] .entry-content h2,
[data-theme="dark"] .entry-content h3,
[data-theme="dark"] .entry-content h4,
[data-theme="dark"] .entry-content h5,
[data-theme="dark"] .entry-content h6 {
  color: #F1F5F9;
}

[data-theme="dark"] .entry-content a {
  color: #60A5FA;
  border-bottom-color: #60A5FA;
}

[data-theme="dark"] .entry-content blockquote {
  background: rgba(96, 165, 250, 0.1);
  border-left-color: #60A5FA;
  color: #CBD5E1;
}

[data-theme="dark"] .entry-content code {
  background: #1E293B;
  color: #FCA5A5;
}

[data-theme="dark"] .entry-content th,
[data-theme="dark"] .entry-content td {
  border-color: #334155;
}

[data-theme="dark"] .entry-content th {
  background: #1E293B;
}

[data-theme="dark"] .entry-tags span,
[data-theme="dark"] .entry-categories span {
  background: #1E293B;
  color: #94A3B8;
}

[data-theme="dark"] .entry-tags span:hover,
[data-theme="dark"] .entry-categories span:hover {
  background: #60A5FA;
  color: #FFFFFF;
}

[data-theme="dark"] .nav-previous a,
[data-theme="dark"] .nav-next a {
  color: #F1F5F9;
}

[data-theme="dark"] .post-navigation {
  border-top-color: #334155;
}

/* 深色模式关于页面样式 */
[data-theme="dark"] .about-page-content {
  color: #E2E8F0;
}

[data-theme="dark"] .about-page-content h1,
[data-theme="dark"] .about-page-content h2,
[data-theme="dark"] .about-page-content h3,
[data-theme="dark"] .about-page-content h4,
[data-theme="dark"] .about-page-content h5,
[data-theme="dark"] .about-page-content h6 {
  color: #F1F5F9;
}

[data-theme="dark"] .toc-item {
  color: #94A3B8;
  border-left-color: #334155;
}

[data-theme="dark"] .about-page-nav {
  border-left-color: #334155;
}

[data-theme="dark"] .about-author-widget {
  background: #1E293B;
}

[data-theme="dark"] .about-author-name {
  color: #F1F5F9;
}

[data-theme="dark"] .about-author-description {
  color: #94A3B8;
}

[data-theme="dark"] .contact-item {
  background: #1E293B;
  color: #F1F5F9;
}

[data-theme="dark"] .contact-item:hover {
  background: #60A5FA;
  color: #FFFFFF;
}

[data-theme="dark"] .section-title {
  color: #F1F5F9;
}

/* 深色模式侧边栏样式 */
[data-theme="dark"] .widget {
  background: transparent;
}

[data-theme="dark"] .widget-title {
  color: #F1F5F9;
  border-bottom-color: #334155;
}

[data-theme="dark"] .widget-content {
  color: #94A3B8;
}

[data-theme="dark"] .recent-post-item {
  color: #94A3B8;
  border-bottom-color: #1E293B;
}

[data-theme="dark"] .recent-post-item:hover {
  color: #60A5FA;
}

/* 深色模式表单样式 */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: transparent;
  border-color: #334155;
  color: #F1F5F9;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: #60A5FA;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* 深色模式二维码区域样式 */
[data-theme="dark"] .qr-share-section {
  background: #1E293B;
}

[data-theme="dark"] .qr-share-title {
  color: #F1F5F9;
}

[data-theme="dark"] .qr-code-container {
  background: #0F172A;
}

/* 深色模式精选图片区域 */
[data-theme="dark"] .featured-lightbox {
  background: rgba(15, 23, 42, 0.5);
}

/* ========================================
   四、媒体查询样式
   (每个媒体查询内部按1、2、3规则整理)
   ======================================== */

/* 4K 显示器 (1920px+) */
@media (min-width: 1920px) {
  /* 基础结构 */
  .container {
    max-width: 1400px;
  }

  /* 首页样式 */
  .hero-title {
    font-size: 4rem;
  }

  .posts-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    max-width: 1600px;
  }

  /* 单篇文章样式 */
  .single-post-wrapper {
    max-width: 900px;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 4rem;
  }
}

/* 大显示器 (1601-1919px) */
@media (min-width: 1601px) and (max-width: 1919px) {
  /* 基础结构 */
  .container {
    max-width: 1300px;
  }

  /* 首页样式 */
  .hero-title {
    font-size: 3.5rem;
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    max-width: 1500px;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 3.5rem;
  }
}

/* 标准桌面 (1441-1600px) */
@media (min-width: 1441px) and (max-width: 1600px) {
  /* 基础结构 */
  .container {
    max-width: 1200px;
  }

  /* 首页样式 */
  .hero-title {
    font-size: 3.25rem;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 3.25rem;
  }
}

/* 笔记本电脑 (1201-1440px) */
@media (min-width: 1201px) and (max-width: 1440px) {
  /* 基础结构 */
  .container {
    max-width: 1100px;
  }

  /* 首页样式 */
  .hero-title {
    font-size: 3rem;
  }

  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    gap: 1.5rem;
  }

  .about-content-left {
    flex: 0 0 65%;
    max-width: 65%;
  }

  .about-sidebar {
    flex: 0 0 25%;
    max-width: 25%;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 3rem;
  }
}

/* 平板横屏 (1025-1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
  /* 基础结构 */
  .container {
    max-width: 1000px;
    padding: 0 1.5rem;
  }

  /* 头部样式 */
  .site-branding {
    padding: 0.875rem 1.5rem;
  }

  .site-title {
    font-size: 1.25rem;
  }

  /* 首页样式 */
  .hero-title {
    font-size: 2.75rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    padding: 3rem 1.5rem;
    flex-direction: column;
  }

  .about-content-left {
    flex: 1;
    max-width: 100%;
  }

  .about-sidebar {
    flex: 1;
    max-width: 100%;
  }

  .about-page-nav {
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-top: 2rem;
  }

  /* 单篇文章样式 */
  .single-post-wrapper {
    padding: 3rem 1.5rem;
  }

  .entry-title {
    font-size: 2.25rem;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 2.75rem;
  }
}

/* 平板竖屏 (769-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* 基础结构 */
  .container {
    max-width: 900px;
    padding: 0 1.25rem;
  }

  body {
    font-size: 15px;
  }

  /* 头部样式 */
  .site-branding {
    padding: 0.75rem 1.25rem;
  }

  .site-title {
    font-size: 1.125rem;
  }

  /* 移动端菜单按钮 */
  .mobile-menu-toggle {
    display: flex;
  }

  .main-navigation ul {
    display: none;
  }

  .main-navigation.mobile-active ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .main-navigation.mobile-active a {
    padding: 0.75rem;
    border-bottom: 1px solid #E2E8F0;
  }

  /* 深色模式移动菜单 */
  [data-theme="dark"] .main-navigation.mobile-active ul {
    background: rgba(15, 23, 42, 0.98);
  }

  [data-theme="dark"] .main-navigation.mobile-active a {
    border-bottom-color: #334155;
  }

  /* 移动端隐藏元素 */
  .post-single-sidebar,
  .single-post-author-box,
  .about-page-nav,
  .about-sidebar {
    display: none !important;
  }

  /* 移动端搜索结果调整 */
  .search-container {
    top: 30%;
  }

  .search-results-container {
    top: calc(30% + 60px);
    max-height: 45vh;
  }

  /* 首页样式 */
  .hero-section {
    padding: 6rem 1.25rem 3rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .post-card-content {
    padding: 1.25rem;
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    padding: 2.5rem 1.25rem;
    flex-direction: column;
  }

  .about-content-left,
  .about-sidebar {
    flex: 1;
    max-width: 100%;
  }

  .about-page-nav {
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-top: 1.5rem;
  }

  /* 单篇文章样式 */
  .single-post-wrapper {
    padding: 2.5rem 1.25rem;
  }

  .entry-title {
    font-size: 2rem;
  }

  .entry-meta {
    gap: 1rem;
    font-size: 0.8125rem;
  }

  /* 灯箱样式 */
  .lightbox img {
    max-width: 95vw;
    max-height: 95vh;
  }

  /* 返回顶部按钮 */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 2.5rem;
  }
}

/* 大屏手机 (577-768px) */
@media (min-width: 577px) and (max-width: 768px) {
  /* 基础结构 */
  .container {
    padding: 0 1rem;
  }

  body {
    font-size: 15px;
  }

  /* 头部样式 */
  .site-branding {
    padding: 0.625rem 1rem;
  }

  .site-title {
    font-size: 1rem;
  }

  .site-description {
    font-size: 0.75rem;
  }

  /* 移动端菜单按钮 */
  .mobile-menu-toggle {
    display: flex;
  }

  .main-navigation ul {
    display: none;
  }

  .main-navigation.mobile-active ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  /* 深色模式移动菜单 */
  [data-theme="dark"] .main-navigation.mobile-active ul {
    background: rgba(15, 23, 42, 0.98);
  }

  /* 首页样式 */
  .hero-section {
    padding: 5rem 1rem 2.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 0.9375rem;
  }

  .hero-cta {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .post-card-thumbnail {
    height: 180px;
  }

  .post-card-content {
    padding: 1.25rem;
  }

  .post-card-title {
    font-size: 1.125rem;
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    padding: 2rem 1rem;
    flex-direction: column;
  }

  .about-content-left,
  .about-sidebar {
    flex: 1;
    max-width: 100%;
  }

  .about-page-nav {
    position: static;
    max-height: none;
    overflow-y: visible;
    margin-top: 1.5rem;
  }

  /* 单篇文章样式 */
  .single-post-wrapper {
    padding: 2rem 1rem;
  }

  .entry-title {
    font-size: 1.75rem;
  }

  .entry-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .entry-content h1 {
    font-size: 1.875rem;
  }

  .entry-content h2 {
    font-size: 1.5rem;
  }

  .entry-content h3 {
    font-size: 1.25rem;
  }

  /* 侧边栏样式 */
  .sidebar {
    width: 100%;
  }

  /* 页脚样式 */
  .footer-content {
    grid-template-columns: 1fr;
  }

  /* 灯箱样式 */
  .lightbox img {
    max-width: 100vw;
    max-height: 100vh;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  /* 返回顶部按钮 */
  .back-to-top {
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 2rem;
  }
}

/* 标准手机 (426-576px) */

/* 移动端隐藏元素 */
  .post-single-sidebar,
  .single-post-author-box,
  .about-page-nav,
  .about-sidebar {
    display: none !important;
  }

  /* 移动端搜索结果调整 */
  .search-container {
    top: 25%;
  }

  .search-results-container {
    top: calc(25% + 60px);
    max-height: 40vh;
  }
@media (min-width: 426px) and (max-width: 576px) {
  /* 基础结构 */
  .container {
    padding: 0 0.875rem;
  }

  body {
    font-size: 14px;
  }

  /* 头部样式 */
  .site-branding {
    padding: 0.5rem 0.875rem;
  }

  .site-title {
    font-size: 0.9375rem;
  }

  .site-description {
    display: none;
  }

  /* 主题切换按钮 */
  .theme-toggle-wrapper {
    margin-left: 0.5rem;
  }

  .theme-toggle {
    padding: 0.375rem;
  }

  /* 首页样式 */
  .hero-section {
    padding: 4rem 0.875rem 2rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-description {
    font-size: 0.875rem;
  }

  .hero-cta {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .posts-grid {
    gap: 1rem;
  }

  .post-card-thumbnail {
    height: 160px;
  }

  .post-card-content {
    padding: 1rem;
  }

  .post-card-title {
    font-size: 1rem;
  }

  .post-card-excerpt {
    font-size: 0.875rem;
    -webkit-line-clamp: 2;
  }

  /* 分页样式 */
  .pagination a,
  .pagination span {
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    padding: 1.5rem 0.875rem;
  }

  .about-page-content {
    font-size: 1rem;
  }

  .about-page-content h1 {
    font-size: 1.5rem;
  }

  .about-page-content h2 {
    font-size: 1.25rem;
  }

  /* 单篇文章样式 */
  .single-post-wrapper {
    padding: 1.5rem 0.875rem;
  }

  .entry-title {
    font-size: 1.5rem;
  }

  .entry-content {
    font-size: 1rem;
  }

  .entry-content h1 {
    font-size: 1.5rem;
  }

  .entry-content h2 {
    font-size: 1.25rem;
  }

  .entry-content h3 {
    font-size: 1.125rem;
  }

  .entry-content pre {
    padding: 1rem;
    font-size: 0.8125rem;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 1.75rem;
  }
}

/* 小屏手机 (376-425px) */

/* 移动端隐藏元素 */
  .post-single-sidebar,
  .single-post-author-box,
  .about-page-nav,
  .about-sidebar {
    display: none !important;
  }

  /* 移动端搜索结果调整 */
  .search-container {
    top: 20%;
  }

  .search-results-container {
    top: calc(20% + 60px);
    max-height: 35vh;
  }
@media (min-width: 376px) and (max-width: 425px) {
  /* 基础结构 */
  .container {
    padding: 0 0.75rem;
  }

  body {
    font-size: 14px;
  }

  /* 头部样式 */
  .site-branding {
    padding: 0.5rem 0.75rem;
  }

  .site-title {
    font-size: 0.875rem;
  }

  /* 首页样式 */
  .hero-section {
    padding: 3.5rem 0.75rem 1.5rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-description {
    font-size: 0.8125rem;
  }

  .hero-cta {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .section-title {
    font-size: 1.375rem;
  }

  .post-card-thumbnail {
    height: 140px;
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    padding: 1.25rem 0.75rem;
  }

  /* 单篇文章样式 */
  .single-post-wrapper {
    padding: 1.25rem 0.75rem;
  }

  .entry-title {
    font-size: 1.375rem;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 1.5rem;
  }
}

/* 超小屏手机 (≤375px) */

/* 移动端隐藏元素 */
  .post-single-sidebar,
  .single-post-author-box,
  .about-page-nav,
  .about-sidebar {
    display: none !important;
  }

  /* 移动端搜索结果调整 */
  .search-container {
    top: 20%;
  }

  .search-results-container {
    top: calc(20% + 60px);
    max-height: 30vh;
  }
@media (max-width: 375px) {
  /* 基础结构 */
  .container {
    padding: 0 0.625rem;
  }

  body {
    font-size: 13px;
  }

  /* 头部样式 */
  .site-branding {
    padding: 0.5rem 0.625rem;
  }

  .site-title {
    font-size: 0.8125rem;
  }

  /* 主题切换按钮 */
  .theme-toggle svg {
    width: 18px;
    height: 18px;
  }

  /* 首页样式 */
  .hero-section {
    padding: 3rem 0.625rem 1.5rem;
  }

  .hero-title {
    font-size: 1.375rem;
  }

  .hero-description {
    font-size: 0.8125rem;
  }

  .hero-cta {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .post-card-thumbnail {
    height: 120px;
  }

  .post-card-content {
    padding: 0.875rem;
  }

  .post-card-title {
    font-size: 0.9375rem;
  }

  .post-card-excerpt {
    font-size: 0.8125rem;
  }

  .post-card-meta {
    font-size: 0.75rem;
  }

  /* 分页样式 */
  .pagination a,
  .pagination span {
    width: 32px;
    height: 32px;
    font-size: 0.8125rem;
  }

  /* 关于页面样式 */
  .about-page-wrapper {
    padding: 1rem 0.625rem;
  }

  .about-page-content {
    font-size: 0.9375rem;
  }

  .about-page-content h1 {
    font-size: 1.25rem;
  }

  .about-page-content h2 {
    font-size: 1.125rem;
  }

  /* 单篇文章样式 */
  .single-post-wrapper {
    padding: 1rem 0.625rem;
  }

  .entry-title {
    font-size: 1.25rem;
  }

  .entry-content {
    font-size: 0.9375rem;
  }

  .entry-content h1 {
    font-size: 1.375rem;
  }

  .entry-content h2 {
    font-size: 1.125rem;
  }

  .entry-content h3 {
    font-size: 1rem;
  }

  .entry-content p {
    margin-bottom: 1.25rem;
  }

  /* 灯箱样式 */
  .lightbox-close {
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  /* 返回顶部按钮 */
  .back-to-top {
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
  }

  /* 深色模式 */
  [data-theme="dark"] .hero-title {
    font-size: 1.375rem;
  }
}
