/*
Theme Name: 零度博客蓝色主题 (优化版)
Description: 基于现代蓝色设计的WordPress博客主题，具有响应式布局、优雅的卡片设计和流畅的用户体验。已优化性能、安全性和自定义功能。
Author: Manus AI (优化版)
Version: 1.1.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lingdu-blue
Tags: blog, two-columns, responsive-layout, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
*/

/* ==================== 全局变量定义 ==================== */
:root {
    --primary-color: #2980B9;
    --primary-dark: #1A5276;
    --text-color: #2C3E50;
    --text-light: #5D6D7E;
    --text-lighter: #95A5A6;
    --bg-color: #FEFEFE;
    --bg-light: #F8F9FA;
    --border-color: rgba(41, 128, 185, 0.1);
    --hero-bg: linear-gradient(135deg, #E8F4F8 0%, #D4E6F1 100%);
    
    /* 自定义器变量 */
    --nav-text-color: #2C3E50;
    --hero-title: '零度博客';
    
    /* 新增变量 */
    --sticky-color: #FFD700;
    --social-icon-size: 20px;
}

.dark-theme {
    --text-color: #e0e0e0;
    --text-light: #d0d0d0;
    --text-lighter: #b0b0b0;
    --bg-color: #1a1a1a;
    --bg-light: #2c2c2c;
    --border-color: rgba(41, 128, 185, 0.2);
    --hero-bg: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    --sticky-color: #FFA500;
}

/* ==================== 全局样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* 防止导航栏遮挡锚点 */
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== 导航栏样式 ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.dark-theme .navbar {
    background: rgba(26, 26, 26, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-dark);
}

/* 导航菜单 */
.nav-menu-container {
    display: block;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-list li {
    position: relative;
}

.nav-menu-list a {
    color: var(--nav-text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: block;
}

.nav-menu-list a:hover,
.nav-menu-list .current-menu-item a {
    background-color: rgba(41, 128, 185, 0.1);
    color: var(--primary-color);
}

/* 下拉菜单 */
.nav-menu-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dark-theme .nav-menu-list .sub-menu {
    background: var(--bg-light);
}

.nav-menu-list li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu-list .sub-menu a {
    padding: 0.75rem 1rem;
    border-radius: 0;
}

.nav-menu-list .sub-menu a:hover {
    background-color: rgba(41, 128, 185, 0.1);
}

/* 导航栏操作按钮 */
.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.mobile-menu-toggle,
.theme-toggle,
.search-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle .fa-search {
    font-family: "FontAwesome" !important;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.mobile-menu-toggle:hover,
.theme-toggle:hover,
.search-toggle:hover {
    background-color: rgba(41, 128, 185, 0.1);
}

.search-toggle:hover .fa-search {
    color: var(--primary-color);
}

/* 社交链接样式 (新增) */
.social-links {
    display: flex;
    gap: 15px;
    margin-left: 20px;
}

.social-links a {
    color: var(--text-color);
    font-size: var(--social-icon-size);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    background: rgba(41, 128, 185, 0.1);
}

.dark-theme .social-links a {
    background: rgba(255,255,255,0.1);
}

/* ==================== 英雄区 ==================== */
.hero-section {
    min-height: 300px;
    background: var(--hero-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
    transition: background-color 0.3s ease;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    transition: color 0.3s ease;
}

/* 搜索栏 */
.search-box {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    background: transparent;
    border-radius: 28px;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: 1px solid rgba(41, 128, 185, 0.3);
    border-radius: 28px 0 0 28px;
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.dark-theme .search-input {
    color: var(--text-color);
    background: rgba(52, 73, 94, 0.8);
    border-color: rgba(41, 128, 185, 0.5);
}

.search-input:focus {
    border-color: var(--primary-color);
    background: white;
}

.dark-theme .search-input:focus {
    background: #34495E;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 0 28px 28px 0;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.search-btn:active {
    transform: scale(0.95);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.1);
}

.hero-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(41, 128, 185, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

/* ==================== 主要内容区域 ==================== */
.main-content {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-align: center;
    transition: color 0.3s ease;
}

/* ==================== 文章网格 ==================== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.dark-theme .article-card {
    background: var(--bg-light);
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* 文章置顶标记 (新增) */
.article-card.sticky {
    position: relative;
    border: 2px solid var(--sticky-color);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.article-card.sticky::before {
    content: "置顶";
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--sticky-color);
    color: #333;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dark-theme .article-card.sticky::before {
    color: #000;
}

.article-card.featured {
    border: 2px solid var(--primary-color);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    aspect-ratio: 16/9;
    object-position: center;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.article-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-tech {
    background: rgba(41, 128, 185, 0.15);
    color: var(--primary-color);
}

.tag-life {
    background: rgba(102, 187, 106, 0.15);
    color: #66BB6A;
}

.article-date {
    font-size: 0.875rem;
    color: var(--text-lighter);
    transition: color 0.3s ease;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.article-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-excerpt {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-time,
.read-count {
    font-size: 0.875rem;
    color: var(--text-lighter);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.read-time::before {
    content: "⏱";
    margin-right: 3px;
}

.read-count::before {
    content: "👁";
    margin-right: 3px;
}

/* ==================== 分页导航 ==================== */
.pagination {
    text-align: center;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.pagination a:hover,
.pagination .current {
    background-color: rgba(41, 128, 185, 0.1);
    color: var(--primary-color);
}

/* ==================== 页脚 ==================== */
.footer {
    background: #34495E;
    color: #BDC3C7;
    padding: 4rem 0;
    transition: background-color 0.3s ease;
}

.dark-theme .footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #BDC3C7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495E;
    color: #95A5A6;
}

/* ==================== 广告位样式 (新增) ==================== */
.header-ad {
    text-align: center;
    padding: 10px 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.header-ad .ad-container {
    max-width: 728px;
    margin: 0 auto;
    padding: 5px;
}

.dark-theme .header-ad {
    background: rgba(0,0,0,0.2);
}

/* ==================== 文章布局变体 (新增) ==================== */
/* 列表布局 */
.archive-list .article-grid {
    grid-template-columns: 1fr !important;
}

.archive-list .article-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.archive-list .article-image {
    width: 30%;
    min-width: 200px;
    height: auto;
    margin-right: 20px;
}

.archive-list .article-content {
    width: 70%;
    padding: 1.5rem 1.5rem 1.5rem 0;
}

/* 瀑布流布局 */
.archive-masonry .article-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: masonry;
    align-items: stretch;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1199px) {
    .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 992px) {
    .social-links {
        display: none; /* 中等屏幕隐藏社交链接 */
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu-container {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 1rem 0;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .dark-theme .nav-menu-container {
        background: var(--bg-light);
    }
    
    .nav-menu-container.active {
        display: block;
    }
    
    .nav-menu {
        display: block;
        padding: 0 1rem;
    }
    
    .nav-menu-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-section {
        height: auto;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* 移动端搜索框适配 */
    .search-box {
        flex-direction: column;
        gap: 1rem;
        max-width: 90%;
    }
    
    .search-input {
        padding: 0.75rem;
        border-radius: 28px;
        width: 100%;
    }
    
    .search-btn {
        align-self: center;
        width: 52px;
        height: 52px;
        border-radius: 50%;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* 移动端列表布局 */
    .archive-list .article-card {
        flex-direction: column;
    }
    
    .archive-list .article-image {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .archive-list .article-content {
        width: 100%;
        padding: 1rem;
    }
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* 前6篇文章有动画延迟 */
.article-card:nth-child(1) { animation-delay: 0.1s; }
.article-card:nth-child(2) { animation-delay: 0.2s; }
.article-card:nth-child(3) { animation-delay: 0.3s; }
.article-card:nth-child(4) { animation-delay: 0.4s; }
.article-card:nth-child(5) { animation-delay: 0.5s; }
.article-card:nth-child(6) { animation-delay: 0.6s; }

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ==================== WordPress特有的body类样式 ==================== */
.home .hero-section {
    display: flex;
}

.single .hero-section,
.page .hero-section {
    display: none;
}

.single .main-content,
.page .main-content {
    padding-top: 100px;
}

/* ==================== WordPress内容样式 ==================== */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--text-color);
    font-weight: 600;
    margin: 1.5em 0 0.5em;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.post-content h1 { font-size: 2.5rem; }
.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 1.75rem; }
.post-content h4 { font-size: 1.5rem; }
.post-content h5 { font-size: 1.25rem; }
.post-content h6 { font-size: 1.1rem; }

.post-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
    background: rgba(41, 128, 185, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.post-content ul,
.post-content ol {
    margin: 1.5em 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5em;
    line-height: 1.6;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.wp-post-image,
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 1rem 0;
    transition: transform 0.3s ease;
}

.wp-post-image:hover,
.post-content img:hover {
    transform: scale(1.02);
}

.wp-caption {
    max-width: 100%;
    margin: 1.5rem 0;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-lighter);
    margin-top: 0.5rem;
    font-style: italic;
    transition: color 0.3s ease;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 1.5rem auto;
}

.alignnone {
    margin: 1.5rem 0;
}

/* ==================== 评论区域 ==================== */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-light);
    transition: border-color 0.3s ease;
}

.comments-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: background-color 0.3s ease;
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author img {
    border-radius: 50%;
    margin-right: 1rem;
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.comment-metadata {
    font-size: 0.875rem;
    color: var(--text-lighter);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.comment-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.reply {
    text-align: right;
}

.reply a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
}

.comment-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 2rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.dark-theme .comment-form {
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--bg-light);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    margin-bottom: 1rem;
}

.dark-theme .comment-form input,
.dark-theme .comment-form textarea {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: rgba(41, 128, 185, 0.3);
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-submit input {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.form-submit input:hover {
    background: var(--primary-dark);
}

/* ==================== Contact Form 7 样式 ==================== */
.wpcf7-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 2rem 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.dark-theme .wpcf7-form {
    background: var(--bg-light);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--bg-light);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    margin-bottom: 1rem;
}

.dark-theme .wpcf7-form input[type="text"],
.dark-theme .wpcf7-form input[type="email"],
.dark-theme .wpcf7-form textarea {
    background: var(--bg-light);
    color: var(--text-color);
    border-color: rgba(41, 128, 185, 0.3);
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.wpcf7-form input[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wpcf7-form input[type="submit"]:hover {
    background: var(--primary-dark);
}

/* ==================== 性能优化 ==================== */
/* 图片懒加载 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 减少布局偏移 */
.aspect-ratio-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
}

.aspect-ratio-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 打印样式 */
@media print {
    .navbar,
    .footer,
    .header-ad,
    .social-links,
    .mobile-menu-toggle,
    .theme-toggle {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: #000 !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}
/* ==================== 新增功能样式 ==================== */

/* 面包屑导航 */
.breadcrumb {
    padding: 1rem 0;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--text-lighter);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumb-current {
    color: var(--text-color);
    font-weight: 500;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* 阅读进度条 */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(41, 128, 185, 0.1);
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
    width: 0%;
}

/* 文章操作按钮 */
.article-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quick-like-btn,
.quick-share-btn,
.post-like-btn,
.post-share-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-lighter);
}

.quick-like-btn:hover,
.quick-share-btn:hover,
.post-like-btn:hover,
.post-share-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.quick-like-btn.liked,
.post-like-btn.liked {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quick-like-btn.loading,
.quick-share-btn.loading,
.post-like-btn.loading,
.post-share-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 分享弹窗 */
.share-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 1.5rem;
    min-width: 280px;
    z-index: 1000;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.dark-theme .share-popup {
    background: var(--bg-light);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.share-popup.show {
    opacity: 1;
    transform: translateY(0);
}

.share-popup h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.share-weibo { color: #E6162D; }
.share-weibo:hover { background: rgba(230, 22, 45, 0.1); border-color: #E6162D; }

.share-wechat { color: #07C160; }
.share-wechat:hover { background: rgba(7, 193, 96, 0.1); border-color: #07C160; }

.share-qq { color: #12B7F5; }
.share-qq:hover { background: rgba(18, 183, 245, 0.1); border-color: #12B7F5; }

.share-twitter { color: #1DA1F2; }
.share-twitter:hover { background: rgba(29, 161, 242, 0.1); border-color: #1DA1F2; }

.share-facebook { color: #4267B2; }
.share-facebook:hover { background: rgba(66, 103, 178, 0.1); border-color: #4267B2; }

.share-popup-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-lighter);
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.share-popup-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-color);
}

/* 微信二维码弹窗 */
.wechat-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.wechat-qr-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    position: relative;
    max-width: 300px;
}

.dark-theme .wechat-qr-content {
    background: var(--bg-light);
}

.wechat-qr-content h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
}

.wechat-qr-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-lighter);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.wechat-qr-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text-color);
}

/* 文章标签增强 */
.article-tags {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    font-size: 0.75rem;
    color: var(--text-lighter);
    background: rgba(0,0,0,0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.dark-theme .tag-item {
    background: rgba(255,255,255,0.1);
}

.tag-item:hover {
    background: rgba(41, 128, 185, 0.1);
    color: var(--primary-color);
}

/* 文章统计增强 */
.article-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-lighter);
}

.article-stats i {
    font-size: 0.75rem;
}

/* 文章格式图标 */
.post-format-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* 文章目录 */
.table-of-contents {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.table-of-contents h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

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

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

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

.toc-level-2 { padding-left: 0; }
.toc-level-3 { padding-left: 1rem; }
.toc-level-4 { padding-left: 2rem; }
.toc-level-5 { padding-left: 3rem; }
.toc-level-6 { padding-left: 4rem; }

/* 代码复制按钮 */
pre {
    position: relative;
}

.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

pre:hover .copy-code-btn {
    opacity: 1;
}

.copy-code-btn:hover {
    background: rgba(0,0,0,0.9);
}

/* 图片灯箱 */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    font-size: 0.875rem;
    white-space: nowrap;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

/* 评论表情包 */
.emoji-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

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

.emoji-panel {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dark-theme .emoji-panel {
    background: var(--bg-light);
}

.emoji-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.emoji-list span {
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.emoji-list span:hover {
    background: rgba(41, 128, 185, 0.1);
}

/* 无限滚动加载 */
.infinite-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-lighter);
    font-size: 0.875rem;
}

.infinite-loading i {
    margin-right: 0.5rem;
}

/* 通知系统 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #27AE60;
    color: #27AE60;
}

.notification-error {
    border-left: 4px solid #E74C3C;
    color: #E74C3C;
}

.notification-info {
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
}

.dark-theme .notification {
    background: var(--bg-light);
}

/* 搜索结果 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.dark-theme .search-results {
    background: var(--bg-light);
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.search-result-item:hover {
    background: var(--bg-light);
}

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

.search-result-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.search-result-excerpt {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.4;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 1rem;
    text-align: center;
    color: var(--text-lighter);
    font-size: 0.875rem;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .share-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .article-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .article-stats {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .table-of-contents {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .wechat-qr-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .qr-code {
        width: 150px;
        height: 150px;
    }
}

/* 打印样式增强 */
@media print {
    .back-to-top,
    .share-popup,
    .article-actions,
    .reading-progress,
    .notification,
    .emoji-panel,
    .copy-code-btn {
        display: none !important;
    }
    
    .article-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
    
    .table-of-contents {
        background: #f8f9fa;
        border: 1px solid #ddd;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-lighter: #333;
    }
    
    .article-card {
        border: 2px solid #000;
    }
    
    .quick-like-btn,
    .quick-share-btn {
        border: 2px solid #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ==================== 单篇文章页面样式 ==================== */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-single {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
}

.dark-theme .post-single {
    background: var(--bg-light);
}

.post-featured-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-lighter);
}

.post-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-category {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-category:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-date,
.post-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-excerpt {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
    font-style: italic;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.post-content {
    padding: 2rem;
    line-height: 1.8;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 2rem 0 1rem 0;
    color: var(--text-color);
    font-weight: 600;
}

.post-content h2 { font-size: 2rem; }
.post-content h3 { font-size: 1.75rem; }
.post-content h4 { font-size: 1.5rem; }
.post-content h5 { font-size: 1.25rem; }
.post-content h6 { font-size: 1.1rem; }

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(41, 128, 185, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.post-content img:hover {
    transform: scale(1.02);
}

.post-tags {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-tags h4 {
    margin: 0 0 1rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.post-actions-left,
.post-actions-right {
    display: flex;
    gap: 1rem;
}

.post-like-btn,
.post-share-btn,
.print-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-theme .post-like-btn,
.dark-theme .post-share-btn,
.dark-theme .print-btn {
    background: var(--bg-color);
}

.post-like-btn:hover,
.post-share-btn:hover,
.print-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.2);
}

.post-like-btn.liked {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.author-bio {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin: 2rem 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.2rem;
}

.author-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.author-links {
    display: flex;
    gap: 1rem;
}

.author-website,
.author-posts {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.author-website:hover,
.author-posts:hover {
    color: var(--primary-dark);
}

.related-posts {
    margin: 3rem 0;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.nav-previous,
.nav-next {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.dark-theme .nav-previous,
.dark-theme .nav-next {
    background: var(--bg-light);
}

.nav-previous:hover,
.nav-next:hover {
    transform: translateY(-4px);
}

.nav-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
}

.nav-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-lighter);
    margin-bottom: 0.5rem;
}

.nav-next .nav-direction {
    justify-content: flex-end;
}

.nav-title {
    font-weight: 600;
    line-height: 1.4;
}

/* ==================== 搜索结果页面样式 ==================== */
.search-results-page {
    max-width: 1000px;
    margin: 0 auto;
}

.search-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.search-title {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.search-query {
    color: var(--primary-color);
    font-weight: 600;
}

.search-count {
    color: var(--text-lighter);
    margin-bottom: 2rem;
}

.search-form-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.search-result-item {
    display: flex;
    gap: 1.5rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.dark-theme .search-result-item {
    background: var(--bg-light);
}

.search-result-item:hover {
    transform: translateY(-2px);
}

.search-result-thumbnail {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.search-result-item:hover .search-result-thumbnail img {
    transform: scale(1.05);
}

.search-result-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.search-result-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.search-result-category a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.search-result-date {
    color: var(--text-lighter);
}

.search-result-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    line-height: 1.3;
}

.search-result-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-title a:hover {
    color: var(--primary-color);
}

.search-result-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.search-result-excerpt mark {
    background: rgba(41, 128, 185, 0.2);
    color: var(--primary-color);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.search-result-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-lighter);
}

.search-result-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.no-search-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon {
    font-size: 4rem;
    color: var(--text-lighter);
    margin-bottom: 2rem;
}

.no-search-results h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.no-search-results p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-suggestions {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-suggestions h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
}

.search-suggestions li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.search-suggestions li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.popular-posts-suggestion {
    margin: 3rem 0;
}

.popular-posts-suggestion h3 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.popular-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ==================== 404错误页面样式 ==================== */
.error-404-page {
    max-width: 1000px;
    margin: 0 auto;
}

.error-404-content {
    text-align: center;
}

.error-404-header {
    padding: 4rem 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 3rem;
}

.error-404-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.error-number {
    font-size: 6rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.error-404-icon i {
    font-size: 3rem;
    color: var(--text-lighter);
}

.error-404-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.error-404-description {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.error-404-search {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.dark-theme .error-404-search {
    background: var(--bg-light);
}

.error-404-search h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.error-404-navigation {
    margin-bottom: 3rem;
}

.error-404-navigation h3 {
    color: var(--text-color);
    margin-bottom: 2rem;
}

.quick-nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.dark-theme .quick-nav-link {
    background: var(--bg-light);
}

.quick-nav-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.2);
}

.quick-nav-link i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.quick-nav-link small {
    color: var(--text-lighter);
    margin-left: auto;
}

.quick-nav-menu {
    margin-top: 2rem;
}

.quick-nav-menu-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-nav-menu-list a {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.quick-nav-menu-list a:hover {
    background: var(--primary-color);
    color: white;
}

.error-404-recent-posts {
    margin-bottom: 3rem;
}

.error-404-recent-posts h3 {
    color: var(--text-color);
    margin-bottom: 2rem;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.error-404-contact {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
}

.error-404-contact h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.error-404-contact p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dark-theme .contact-link {
    background: var(--bg-color);
}

.contact-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.back-button {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.back-button:hover {
    background: var(--primary-dark);
    color: white;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }
    
    .post-header,
    .post-content,
    .post-tags,
    .post-actions {
        padding: 1.5rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-actions-left,
    .post-actions-right {
        justify-content: center;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .search-result-item {
        flex-direction: column;
    }
    
    .search-result-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .search-result-content {
        padding: 1rem;
    }
    
    .error-number {
        font-size: 4rem;
    }
    
    .error-404-title {
        font-size: 2rem;
    }
    
    .quick-nav-links {
        grid-template-columns: 1fr;
    }
    
    .contact-options {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-nav-menu-list {
        flex-direction: column;
        align-items: center;
    }
}

