/**
 * Gangwan Theme - Single Post Enhanced Styles
 * 文章页面增强样式 (single.php)
 * 
 * @package Gangwan
 * @version 2.0.0
 */

/* ==========================================
   1. 阅读进度条
   ========================================== */

#reading-progress {
    transition: width 0.1s ease-out;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ==========================================
   2. 目录导航 (Table of Contents)
   ========================================== */

.toc-nav {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.toc-nav::-webkit-scrollbar {
    width: 4px;
}

.toc-nav::-webkit-scrollbar-track {
    background: transparent;
}

.toc-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.toc-nav a {
    display: block;
    padding: 6px 12px;
    color: #64748b;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    line-height: 1.5;
}

.toc-nav a:hover {
    color: #3b82f6;
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.toc-nav a.active {
    color: #1d4ed8;
    background: #eff6ff;
    border-left-color: #1d4ed8;
    font-weight: 500;
}

.toc-nav .toc-h2 {
    padding-left: 12px;
    font-weight: 500;
}

.toc-nav .toc-h3 {
    padding-left: 24px;
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* ==========================================
   3. 分享按钮
   ========================================== */

.share-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.share-btn.twitter:hover {
    background: #1da1f2 !important;
}

.share-btn.facebook:hover {
    background: #1877f2 !important;
}

.share-btn.weibo:hover {
    background: #e4405f !important;
}

/* ==========================================
   4. 相关文章卡片
   ========================================== */

.related-post-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.related-post-card img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ==========================================
   5. 作者卡片
   ========================================== */

.author-card {
    transition: all 0.3s ease;
}

.author-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   6. 上一篇/下一篇导航
   ========================================== */

.nav-previous,
.nav-next {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-previous:hover,
.nav-next:hover {
    border-color: #60a5fa !important;
    box-shadow: 0 10px 15px -3px rgba(96, 165, 250, 0.2);
    transform: translateY(-2px);
}

/* ==========================================
   7. 标签云
   ========================================== */

.entry-tags a {
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.entry-tags a:hover {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   8. 面包屑导航
   ========================================== */

.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb a {
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #3b82f6;
}

/* ==========================================
   9. 文章元信息
   ========================================== */

.entry-meta {
    font-size: 0.875rem;
}

.entry-meta a {
    transition: color 0.2s ease;
}

.entry-meta a:hover {
    color: #1d4ed8;
}

/* ==========================================
   10. 英雄区叠加效果
   ========================================== */

.entry-header .absolute {
    transition: opacity 0.3s ease;
}

article:hover .entry-header .absolute {
    opacity: 1;
}

/* ==========================================
   11. 响应式优化
   ========================================== */

@media (max-width: 1024px) {
    #table-of-contents {
        display: none;
    }
}

@media (max-width: 768px) {
    .entry-title {
        font-size: 1.875rem !important;
        line-height: 1.25 !important;
    }

    .entry-content {
        font-size: 1rem;
    }

    .related-post-card:hover {
        transform: none;
    }
}

/* ==========================================
   12. 打印样式
   ========================================== */

@media print {
    #reading-progress,
    #table-of-contents,
    .entry-share,
    .entry-tags,
    .post-navigation,
    .related-posts,
    .comment-respond {
        display: none !important;
    }

    .entry-content {
        max-width: 100% !important;
    }
}
