/* 博客页面样式 */

/* 全局滚动条样式 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* 阅读进度条 */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    z-index: 1000;
    transition: width 0.2s ease;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
}

.back-to-top.visible {
    display: flex;
    opacity: 1;
    animation: fadeInUp 0.5s ease;
}

.back-to-top:hover {
    background: #667eea;
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

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

/* 全局动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -300% 0;
    }
    100% {
        background-position: 300% 0;
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.5);
    }
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar .logo a:hover {
    color: #667eea;
}

.navbar .logo .logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover {
    color: #667eea;
}

.nav-menu a.active {
    color: #667eea;
    font-weight: 600;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 面包屑导航 */
.breadcrumb {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    position: sticky;
    top: 80px;
    z-index: 90;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.breadcrumb.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #764ba2;
}

.breadcrumb span {
    color: #94a3b8;
    margin: 0 0.5rem;
}

header h1 a {
    text-decoration: none;
    color: inherit;
}

nav a.active {
    color: #667eea;
    font-weight: 600;
}

/* 博客Hero区域 */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    opacity: 1;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background: white;
    clip-path: polygon(0 50%, 100% 0, 100% 100%, 0% 100%);
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease;
}

.blog-hero p {
    font-size: 1.4rem;
    opacity: 0.95;
    margin-bottom: 2.5rem;
    text-align: center;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.blog-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.blog-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.05rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-stats span:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 1.2rem;
}

.stat-text {
    font-weight: 500;
}

/* 筛选区域 */
.blog-filter {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 70px;
    z-index: 50;
}

.blog-filter .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.6rem 1.2rem;
    border: none;
    background: #f7fafc;
    color: #4a5568;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-tab:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.search-box {
    position: relative;
    flex-shrink: 0;
}

.search-input {
    padding: 0.6rem 1.2rem 0.6rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    min-width: 250px;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* 博客主体区域 */
.blog-main {
    padding: 4rem 0;
    background: #f8fafc;
    min-height: 600px;
}

.blog-main .container {
    max-width: 1400px;
}

/* 分类筛选 */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover {
    background: #f8fafc;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 文章列表 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.article-card:hover::before {
    opacity: 1;
}

.card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    display: block;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .card-image img {
    transform: scale(1.08);
}

.card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category.news {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.category.tutorial {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.category.tips {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.category.tech {
    background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
    color: #6b21a8;
}

.card-meta time {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.card-title {
    margin: 0 0 1rem;
}

.card-title a {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.5;
    display: block;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #667eea;
}

.card-excerpt {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    flex: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    padding: 0.3rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #e2e8f0;
    color: #667eea;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.read-time {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #764ba2;
    transform: translateX(3px);
}

/* 加载更多 */
.load-more-container {
    text-align: center;
    padding: 2rem 0;
}

/* 分页控件 */
.pagination-container {
    margin-top: 3rem;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.pagination-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    font-weight: 700;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f7fafc;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #94a3b8;
    font-weight: 600;
    user-select: none;
}

.pagination-info {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 响应式设计 - 分页 */
@media (max-width: 768px) {
    .pagination-container {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
    
    .pagination {
        padding: 1rem 1.5rem;
        gap: 0.4rem;
    }
    
    .pagination-btn {
        min-width: 40px;
        height: 40px;
        padding: 0 0.75rem;
        font-size: 0.85rem;
    }
    
    .pagination-info {
        font-size: 0.85rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    .pagination {
        padding: 1rem;
        gap: 0.3rem;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }
    
    .pagination-btn:first-child,
    .pagination-btn:last-child {
        font-size: 0.75rem;
        padding: 0 0.4rem;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #718096;
    font-size: 1rem;
}

/* CTA区域 */
.blog-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
}

.blog-cta .cta-content {
    text-align: center;
}

.blog-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-cta p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* ==================== 文章详情页样式 ==================== */

/* 文章头部 */
.article-header {
    padding: 0.5rem 0;
    background: transparent;
    position: relative;
}

.article-header .container {
    max-width: 1200px;
}

.breadcrumb {
    margin-bottom: 1.6rem;
    font-size: 0.9rem;
    color: #718096;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #764ba2;
}

.separator {
    margin: 0 0.5rem;
    color: #cbd5e1;
}

.article-title {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.95rem;
    padding-bottom: 0;
    position: relative;
    z-index: 1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.meta-item:hover {
    color: #667eea;
}

.meta-icon {
    font-size: 1rem;
    color: #667eea;
}

/* 文章标签 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.article-tags .tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    background: #bfdbfe;
    transform: translateY(-2px);
}

/* 文章内容区域 */
.article-content {
    padding: 1.5rem 0 0 0;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.article-content .container {
    max-width: 1400px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.article-main {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    line-height: 1.8;
    color: #2d3748;
    min-height: 600px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.article-main:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.article-main h2 {
    font-size: 1.85rem;
    color: #1e293b;
    margin: 3rem 0 1.5rem;
    font-weight: 700;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

.article-main h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.article-main h2:hover {
    color: #667eea;
}

.article-main h2:hover::before {
    width: 120px;
}

.article-main h2:first-child {
    margin-top: 0;
}

.article-main h3 {
    font-size: 1.5rem;
    color: #334155;
    margin: 2.5rem 0 1.2rem;
    font-weight: 600;
    padding-left: 1rem;
    border-left: 3px solid #667eea;
    position: relative;
    transition: all 0.3s ease;
}

.article-main h3:hover {
    color: #667eea;
    padding-left: 1.5rem;
}

.article-main p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #334155;
}

.article-main > p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    float: left;
    line-height: 1;
    margin: 0.1rem 0.8rem 0 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-main ul,
.article-main ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-main li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
    color: #334155;
    position: relative;
}

.article-main ul li {
    list-style-type: disc;
    list-style-position: outside;
    padding-left: 0.5rem;
}

.article-main ul li::marker {
    color: #667eea;
}

.article-main ol li {
    list-style-type: decimal;
    list-style-position: outside;
    padding-left: 0.5rem;
}

.article-main ol li::marker {
    color: #667eea;
    font-weight: 600;
}

.article-main a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    padding: 0 2px;
}

.article-main a::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.article-main a:hover {
    color: #764ba2;
    background: rgba(102, 126, 234, 0.05);
}

.article-main a:hover::before {
    transform: scaleX(1);
}

.article-main img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.article-main img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.article-main blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-left: 4px solid #667eea;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
    position: relative;
    transition: all 0.3s ease;
}

.article-main blockquote:hover {
    background: #f1f5f9;
    border-left-color: #764ba2;
}

.article-main blockquote p {
    margin-bottom: 0;
}

.article-main code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #dc2626;
    border: 1px solid #e2e8f0;
}

.article-main pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #334155;
    position: relative;
}

.article-main pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
}

/* 提示框 */
.tips-box {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 20%, #ffffff 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 12px 12px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
    transition: all 0.3s ease;
}

.tips-box:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
    transform: translateX(3px);
}

.tips-box h4 {
    color: #92400e;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-box ul {
    margin: 0;
    padding-left: 1.5rem;
}

.tips-box li {
    color: #78350f;
    margin-bottom: 0.6rem;
    line-height: 1.7;
}

.tips-box p {
    color: #78350f;
    margin-bottom: 0.8rem;
}

.tips-box p:last-child {
    margin-bottom: 0;
}

/* 侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.widget-title {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-weight: 700;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 目录 */
.toc-nav,
.toc {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

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

.toc-nav::-webkit-scrollbar-track,
.toc::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

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

.toc-nav::-webkit-scrollbar-thumb:hover,
.toc::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 使用 div 结构的目录 */
.toc-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.toc-item {
    display: block;
}

.toc-item a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    display: block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border-left: 3px solid transparent;
    white-space: normal;
    word-wrap: break-word;
}

.toc-item a:hover {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), transparent);
    border-left-color: #667eea;
    padding-left: 1rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

/* 二级目录 */
.toc-item-level-2 {
    padding-left: 1.2rem;
}

.toc-item-level-2 a {
    font-size: 0.85rem;
}

/* 三级目录 */
.toc-item-level-3 {
    padding-left: 2.4rem;
}

.toc-item-level-3 a {
    font-size: 0.8rem;
}

.toc-level-2 {
    padding-left: 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 相关文章 */
.related-articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article-item {
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f7fafc, #ffffff);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-article-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.related-article-item:hover {
    background: white;
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.1);
}

.related-article-item:hover::before {
    transform: scaleY(1);
}

.related-article-item h4 {
    color: #2d3748;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.related-article-item p {
    color: #a0aec0;
    font-size: 0.8rem;
    margin: 0;
}

/* 文章导航 */
.article-navigation {
    padding: 2rem 0;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f7fafc 0%, #ffffff 100%);
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.nav-label {
    color: #a0aec0;
    font-size: 0.85rem;
    font-weight: 500;
}

.nav-title {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.next-link {
    text-align: right;
}

/* 文章CTA */
.article-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-box {
    text-align: center;
}

.cta-box h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-box p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .sidebar-widget {
        position: static;
    }
}

@media (max-width: 1024px) {
    .article-title {
        font-size: 2.2rem;
    }
    
    .article-main {
        padding: 2rem;
    }
    
    .article-main h2 {
        font-size: 1.6rem;
    }
    
    .article-main h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 3rem 0 2rem;
    }
    
    .blog-hero h1 {
        font-size: 2.2rem;
    }
    
    .blog-hero p {
        font-size: 1.1rem;
    }
    
    .blog-stats {
        gap: 1rem;
    }
    
    .blog-stats span {
        padding: 0.7rem 1.3rem;
        font-size: 0.9rem;
    }
    
    .category-filter {
        padding: 1.5rem;
        gap: 0.75rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .card-title a {
        font-size: 1.15rem;
    }
    
    .article-sidebar {
        grid-template-columns: 1fr;
    }
    
    .toc-widget {
        display: none;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-main {
        padding: 1.5rem;
    }
    
    .article-meta {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
    }
    
    .next-link {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .category-filter {
        padding: 1rem;
    }
    
    .articles-grid {
        gap: 1.5rem;
    }
    
    .card-image {
        height: 200px;
    }
    
    .article-main {
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 1.6rem;
    }
    
    .cta-box h2 {
        font-size: 1.8rem;
    }
}

/* ==================== 文章底部导航样式 ==================== */
.article-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid #e2e8f0;
    position: relative;
}

/* 当只有两个元素时的布局优化 */
.article-nav > .nav-back:only-of-type + .nav-next,
.article-nav > .nav-prev:only-of-type + .nav-back {
    flex: 0 0 auto;
}

.article-nav > .nav-back + .nav-next:last-child {
    flex: 1;
    min-width: 300px;
}

/* 上一篇 */
.nav-prev {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem 1rem 2.5rem !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    text-align: left;
    flex: 1;
    min-width: 200px;
    max-width: calc(50% - 0.5rem);
}

.nav-prev::before {
    content: '←';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 1.1rem;
    font-weight: 400;
    transition: all 0.25s ease;
    opacity: 0.6;
}

.nav-prev:hover {
    background: #f8fafc;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.nav-prev:hover::before {
    color: #667eea;
    opacity: 1;
    left: 0.75rem;
}

/* 下一篇 */
.nav-next {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 2.5rem 1rem 1.25rem !important;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    text-align: right;
    flex: 1;
    min-width: 200px;
    max-width: calc(50% - 0.5rem);
}

.nav-next::after {
    content: '→';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 1.1rem;
    font-weight: 400;
    transition: all 0.25s ease;
    opacity: 0.6;
}

.nav-next:hover {
    background: #f8fafc;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.nav-next:hover::after {
    color: #667eea;
    opacity: 1;
    right: 0.75rem;
}

/* 返回列表按钮 */
.nav-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    white-space: nowrap;
    align-self: stretch;
    min-height: 100%;
    flex: 0 0 auto;
}

.nav-back:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* 导航标签和标题 */
.nav-prev .nav-label,
.nav-next .nav-label {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.25s ease;
    margin-bottom: 0.25rem;
}

.nav-prev:hover .nav-label,
.nav-next:hover .nav-label {
    color: #667eea;
}

.nav-prev .nav-title,
.nav-next .nav-title {
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.25s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.nav-prev:hover .nav-title,
.nav-next:hover .nav-title {
    color: #667eea;
}

/* 响应式设计 - 文章底部导航 */
@media (max-width: 1024px) {
    .article-nav {
        flex-direction: column;
    }
    
    .nav-prev,
    .nav-next {
        max-width: 100%;
        text-align: left;
    }
    
    .nav-next {
        padding-right: 1.25rem !important;
        padding-left: 2.5rem !important;
    }
    
    .nav-next::after {
        left: 1rem;
        right: auto;
    }
    
    .nav-next:hover::after {
        left: 0.75rem;
    }
    
    .nav-back {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .article-nav {
        margin-top: 2.5rem;
        padding-top: 2rem;
        gap: 0.875rem;
    }
    
    .nav-prev,
    .nav-next {
        padding: 0.875rem 1rem !important;
        padding-left: 2.25rem !important;
    }
    
    .nav-next {
        padding-right: 1rem !important;
    }
    
    .nav-prev::before,
    .nav-next::after {
        font-size: 1rem;
    }
    
    .nav-back {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .article-nav {
        margin-top: 2rem;
        padding-top: 1.5rem;
        gap: 0.75rem;
    }
    
    .nav-prev,
    .nav-next {
        padding: 0.75rem 0.875rem !important;
        padding-left: 2rem !important;
        min-width: auto;
    }
    
    .nav-next {
        padding-right: 0.875rem !important;
    }
    
    .nav-prev .nav-title,
    .nav-next .nav-title {
        font-size: 0.875rem;
    }
    
    .nav-prev .nav-label,
    .nav-next .nav-label {
        font-size: 0.7rem;
    }
}

