/*
Theme Name: 王光卫博客
Theme URI: https://guangweiblog.com
Author: 王光卫
Author URI: https://guangweiblog.com
Description: 基于 WordPress Block Theme (FSE) 开发的数字营销和数据分析博客主题，完全匹配 guangweiblog.com 网站布局
Version: 2.3.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guangweiblog
Requires at least: 6.4
Requires PHP: 7.4
*/

/* ========================================
   CSS 变量定义
   ======================================== */
:root {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --card-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

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

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

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

/* ========================================
   玻璃拟态卡片效果
   ======================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ========================================
   网站头部 - 玻璃效果
   ======================================== */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo a {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 头部右侧区域 */
.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* 主导航 */
.main-nav {
    display: flex;
    gap: 10px;
}

.main-nav .wp-block-navigation-item a {
    font-size: 16px;
    font-weight: 500;
    color: #555;
    padding: 10px 18px;
    border-radius: 25px;
    transition: var(--transition);
}

.main-nav .wp-block-navigation-item a:hover {
    color: var(--primary-color);
    background: rgba(26, 115, 232, 0.1);
}

/* 头部搜索框 */
.header-search {
    position: relative;
}

.header-search .wp-block-search__inside-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search .wp-block-search__input {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: #fff;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
}

.header-search .wp-block-search__input:focus {
    width: 250px;
    padding: 10px 20px 10px 45px;
    border-radius: 25px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
    cursor: text;
    background-position: 15px center;
    outline: none;
}

.header-search .wp-block-search__input::placeholder {
    color: transparent;
}

.header-search .wp-block-search__input:focus::placeholder {
    color: #999;
}

.header-search .wp-block-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Hero 区域 - 品牌展示
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: #fff;
}

.hero-subtitle {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 20px 0;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 24px 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-description {
    font-size: 18px;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 40px auto;
    opacity: 0.95;
}

/* Hero 统计数据 */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Hero CTA 按钮 */
.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.hero-cta .wp-block-button__link {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.hero-cta .btn-primary .wp-block-button__link {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-cta .btn-primary .wp-block-button__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-cta .btn-secondary .wp-block-button__link {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.hero-cta .btn-secondary .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
}

/* Hero 响应式 */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .wp-block-button__link {
        width: 200px;
    }
}

.main-nav .wp-block-navigation-item.current-menu-item a {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ========================================
   主内容区布局 - 左右两栏
   ======================================== */
.site-main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 24px;
}

.content-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.main-content {
    width: 68% !important;
    min-width: 0;
    flex: none !important;
}

.sidebar {
    width: 32% !important;
    min-width: 260px;
    max-width: 320px;
    flex: none !important;
    flex-shrink: 0;
    position: sticky;
    top: 30px;
    align-self: flex-start;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

/* 侧边栏滚动条样式 */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* ========================================
   文章卡片样式 - 玻璃拟态
   ======================================== */
.post-card {
    display: flex;
    gap: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
    overflow: hidden;
    align-items: center;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* 缩略图 */
.post-thumbnail {
    flex-shrink: 0;
    width: 240px;
    overflow: hidden;
    border-radius: 10px;
    align-self: center;
}

.post-thumbnail img,
.post-thumbnail .wp-block-post-featured-image img {
    width: 240px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* 文章内容 */
.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 分类标签 */
.post-category {
    margin-bottom: 10px;
}

.post-category a {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 5px 14px;
    border-radius: 20px;
    margin-right: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-category a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 文章标题 - 高优先级覆盖Block Editor默认样式 */
.post-title,
.wp-block-post-title.post-title,
h2.post-title {
    margin: 0 0 14px 0 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.post-title a {
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* 文章摘要 - 高优先级覆盖 */
.post-excerpt,
.wp-block-post-excerpt.post-excerpt,
.wp-block-post-excerpt__excerpt {
    color: #666 !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    margin-bottom: 16px !important;
    display: -webkit-box !important;
    display: box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 5.4em !important;
}

.post-excerpt p {
    margin: 0;
}

/* 元信息 - 时间和阅读量 */
.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 13px;
    color: #888;
}

.post-meta-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.post-date {
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-date::before {
    content: "📅";
    font-size: 12px;
}

.post-views {
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-views::before {
    content: "👁";
    font-size: 12px;
}

/* 标签 */
.post-tags {
    margin-top: auto;
}

.post-tags a {
    display: inline-block;
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(26, 115, 232, 0.08);
    padding: 4px 12px;
    border-radius: 15px;
    margin-right: 8px;
    margin-bottom: 6px;
    transition: var(--transition);
    font-weight: 500;
}

.post-tags a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* 标签提示文字 */
.post-tags-section {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tags-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex-shrink: 0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========================================
   文章分享功能
   ======================================== */
.post-share {
    margin: 30px 0;
    padding: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
}

.share-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    transition: var(--transition);
    text-decoration: none;
}

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

.share-btn img,
.share-btn svg {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.share-btn.qzone img {
    filter: none;
}

.share-btn.weibo { background: #E6162D; }
.share-btn.weibo:hover { background: #c41226; }

.share-btn.qq { background: #12B7F5; }
.share-btn.qq:hover { background: #0ea3db; }

.share-btn.qzone { background: #FFC300; color: #333; }
.share-btn.qzone:hover { background: #e6b000; }

.share-btn.douban { background: #00B51D; }
.share-btn.douban:hover { background: #009c18; }

.share-btn.wechat { background: #07C160; }
.share-btn.wechat:hover { background: #06ad56; }

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

.wechat-qr-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    min-width: 200px;
}

.close-qr {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close-qr:hover {
    color: #333;
}

/* ========================================
   相关文章
   ======================================== */
.related-posts {
    margin: 30px 0;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
}

.related-posts-wrapper {
    width: 100%;
}

.related-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-item {
    transition: var(--transition);
}

.related-item:hover {
    transform: translateY(-4px);
}

.related-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-thumb {
    aspect-ratio: 16/10;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #f0f0f0;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-item:hover .related-thumb img {
    transform: scale(1.05);
}

.related-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-date {
    font-size: 12px;
    color: #888;
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .share-buttons {
        gap: 8px;
    }
    
    .share-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   文章上下篇导航
   ======================================== */
.post-navigation {
    margin: 30px 0;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
}

.post-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.post-nav-prev,
.post-nav-next,
.post-nav-links > span.post-nav-prev,
.post-nav-links > span.post-nav-next {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    background: transparent;
    min-height: auto;
    box-sizing: border-box;
}

.post-nav-prev:hover,
.post-nav-next:hover {
    transform: none;
    box-shadow: none;
}

.post-nav-prev:hover .nav-title,
.post-nav-next:hover .nav-title {
    color: var(--primary-color);
}

.post-nav-prev.disabled,
.post-nav-next.disabled,
.post-nav-links > span.post-nav-prev.disabled,
.post-nav-links > span.post-nav-next.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-nav-next,
.post-nav-links > span.post-nav-next {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .post-nav-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .post-nav-next,
    .post-nav-links > span.post-nav-next {
        text-align: left;
        align-items: flex-start;
    }
}

/* ========================================
   评论区域中文化样式
   ======================================== */
.comments-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
}

.comment-reply-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.comment-form-wrapper {
    margin-top: 30px;
    padding: 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
}

.comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: #fff;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.comment-form .required {
    color: #e74c3c;
}

.comment-form .form-submit input[type="submit"] {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form .form-submit input[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.comments-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.comments-pagination-wrapper a,
.comments-pagination-wrapper .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.comments-pagination-wrapper a {
    background: #f5f5f5;
    color: #333;
}

.comments-pagination-wrapper a:hover {
    background: var(--primary-color);
    color: #fff;
}

.comments-pagination-wrapper .current {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

/* ========================================
   侧边栏 - 玻璃效果
   ======================================== */
.sidebar-widget {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--glass-shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
}

/* 动态标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    font-size: 12px !important;
    color: #555;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 12px;
    border-radius: 16px;
    transition: var(--transition);
    animation: tagFloat 3s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.tag-cloud a:nth-child(2n) {
    animation-delay: 0.5s;
}

.tag-cloud a:nth-child(3n) {
    animation-delay: 1s;
}

.tag-cloud a:nth-child(4n) {
    animation-delay: 1.5s;
}

.tag-cloud a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    animation: none;
}

@keyframes tagFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* 最新文章 */
.latest-posts li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.latest-posts li:last-child {
    border-bottom: none;
}

.latest-posts li:hover {
    padding-left: 8px;
}

.latest-posts a {
    color: #444;
    font-size: 14px;
    font-weight: 500;
    display: block;
    line-height: 1.5;
}

.latest-posts a:hover {
    color: var(--primary-color);
}

/* 阅读最多 - 带序号样式 */
.popular-posts li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    counter-increment: popular-rank;
}

.popular-posts li:last-child {
    border-bottom: none;
}

.popular-posts li:hover {
    padding-left: 8px;
}

.popular-posts a {
    color: #444;
    font-size: 14px;
    font-weight: 500;
    display: block;
    line-height: 1.5;
}

.popular-posts a:hover {
    color: var(--primary-color);
}

.popular-posts li::before {
    content: counter(popular-rank);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.popular-posts li:nth-child(1)::before {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.popular-posts li:nth-child(2)::before {
    background: linear-gradient(135deg, #ffa726 0%, #f57c00 100%);
}

.popular-posts li:nth-child(3)::before {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
}

/* ========================================
   阅读排行标签页
   ======================================== */
.popular-posts-tabs {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--card-radius);
    padding: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.popular-posts-tabs .widget-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.tabs-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

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

.popular-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.popular-list li:hover {
    padding-left: 4px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.08);
    color: #666;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    flex-shrink: 0;
}

.rank-badge.top-1 {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
}

.rank-badge.top-2 {
    background: linear-gradient(135deg, #ffa726 0%, #f57c00 100%);
    color: #fff;
}

.rank-badge.top-3 {
    background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
    color: #fff;
}

.post-link {
    flex: 1;
    color: #444;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.view-count {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

/* ========================================
   分页 - 玻璃效果
   ======================================== */
.wp-block-query-pagination {
    margin-top: 40px;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wp-block-query-pagination > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    margin: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.wp-block-query-pagination a {
    color: #555;
    text-decoration: none;
}

.wp-block-query-pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.wp-block-query-pagination span.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

/* 上一页/下一页按钮 */
.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next {
    padding: 0 20px;
    font-weight: 500;
}

/* 数字分页 */
.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination-numbers .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 4px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.wp-block-query-pagination-numbers .page-numbers:hover:not(.current) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* 数字分页容器 */
.wp-block-query-pagination-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* 禁用状态 */
.wp-block-query-pagination .wp-block-query-pagination-previous:empty,
.wp-block-query-pagination .wp-block-query-pagination-next:empty {
    display: none;
}

/* ========================================
   页脚 - 玻璃效果
   ======================================== */
.site-footer {
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(20px);
    color: #aaa;
    padding: 40px 0 24px;
    margin-top: 50px;
}

.site-footer a {
    color: #ccc;
}

.site-footer a:hover {
    color: #fff;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .main-content {
        width: 66%;
    }
    
    .sidebar {
        width: 34%;
        min-width: 240px;
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .main-content {
        width: 100%;
    }
    
    .sidebar {
        width: 100%;
        max-width: none;
        margin-left: 0;
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .post-card {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
        align-items: stretch;
    }
    
    .post-thumbnail,
    .post-thumbnail img,
    .post-thumbnail .wp-block-post-featured-image img {
        width: 100%;
        height: 180px;
    }
    
    .main-nav {
        display: none;
    }
    
    .header-inner {
        justify-content: center;
    }
    
    .site-main {
        margin: 16px auto;
        padding: 0 16px;
    }
}

/* ========================================
   文章详情页 - 玻璃效果
   ======================================== */
.single-post .post-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--card-radius);
    margin-bottom: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.single-post .post-title-single {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.single-post .post-meta-single {
    display: flex;
    gap: 24px;
    color: #888;
    font-size: 14px;
}

.single-post .post-content-single {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--card-radius);
    font-size: 16px;
    line-height: 1.9;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.single-post .post-content-single h2 {
    font-size: 26px;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.single-post .post-content-single h3 {
    font-size: 22px;
    margin: 32px 0 16px;
    color: #444;
}

.single-post .post-content-single p {
    margin-bottom: 20px;
}

.single-post .post-content-single img {
    border-radius: 12px;
    margin: 24px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ========================================
   归档页 - 玻璃效果
   ======================================== */
.archive-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--card-radius);
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.archive-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.archive-description {
    color: #666;
    font-size: 16px;
}

/* ========================================
   评论区 - 玻璃效果
   ======================================== */
.comments-area {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--card-radius);
    margin-top: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.comments-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

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

.comment {
    background: rgba(255, 255, 255, 0.5);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.comment-author {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.comment-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.comment-content {
    color: #555;
    line-height: 1.7;
}

/* 评论表单 */
.comment-form {
    margin-top: 30px;
}

.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #444;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

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

.comment-form-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 评论列表样式 */
.comment-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.comment-body {
    position: relative;
}

.comment-author.vcard {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.comment-author.vcard img {
    border-radius: 50%;
}

.comment-author.vcard .fn {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.comment-metadata {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.comment-metadata a {
    color: #888;
}

.comment-metadata .edit-link {
    color: var(--primary-color);
}

.comment-awaiting-moderation {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #856404;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

.comment-content {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.comment-content p {
    margin-bottom: 10px;
}

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

.comment-reply {
    text-align: right;
}

.comment-reply a {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.comment-reply a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* 评论嵌套 */
.comment-list .children {
    list-style: none;
    padding-left: 30px;
    margin-top: 20px;
}

/* 评论分页 */
.comments-pagination {
    margin: 30px 0;
    text-align: center;
}

.comments-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    color: #555;
    font-size: 14px;
    transition: var(--transition);
}

.comments-pagination .page-numbers:hover {
    background: var(--primary-color);
    color: #fff;
}

.comments-pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.comments-pagination .prev,
.comments-pagination .next {
    font-weight: 500;
}

/* 验证码样式 */
.captcha-container {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.captcha-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #444;
}

.captcha-code {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 8px;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 24px;
    border-radius: 8px;
    margin-bottom: 12px;
    user-select: none;
    border: 1px dashed var(--primary-color);
}

.captcha-input {
    width: 200px !important;
}

/* ========================================
   搜索页
   ======================================== */
.search-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--card-radius);
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.search-form {
    max-width: 600px;
    margin: 20px auto 0;
    display: flex;
    gap: 12px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 16px 24px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.search-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* ========================================
   404页面
   ======================================== */
.error-404 {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 80px 40px;
    border-radius: var(--card-radius);
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
}

.error-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
}

.error-message {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

/* ========================================
   加载动画
   ======================================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   滚动条美化
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* ========================================
   返回顶部按钮
   ======================================== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.4);
}

#back-to-top svg {
    width: 24px;
    height: 24px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    #back-to-top svg {
        width: 20px;
        height: 20px;
    }
}
