﻿@charset "utf-8";
/* style.css - 完整修复版 */

/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --accent-color: #f72585;
    --light-bg: #f8f9ff;
    --white: #ffffff;
    --gray-light: #e9ecef;
    --gray-medium: #adb5bd;
    --gray-dark: #495057;
    --text-color: #2b2d42;
    --text-light: #6c757d;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-bg);
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ===== 头部样式 ===== */
.header {
    background: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.header .container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logo {
    text-align: center;
    padding: 10px 0;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 a {
    text-decoration: none;
    color: inherit;
}

.logo .tagline {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
}

.main-nav {
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
    padding: 12px 0;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.main-nav li.active a {
    background: var(--primary-color);
    color: var(--white);
}

/* ===== 内容区域 ===== */
.content-wrapper {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 350px;
    flex-shrink: 0;
}

/* ===== 文章列表 ===== */
.article-preview {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
}

.article-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.article-preview h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.article-preview h2 a:hover {
    color: var(--primary-color);
}

.article-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.article-meta .category a {
    color: var(--primary-color);
    background: var(--light-bg);
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
}

.excerpt {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    transition: var(--transition);
}

.read-more:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ===== 侧边栏 ===== */
.sidebar-widget {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
}

.search-form button {
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.recent-articles li {
    list-style: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
}

.recent-articles a {
    color: var(--text-color);
    text-decoration: none;
    flex: 1;
}

.recent-articles a:hover {
    color: var(--primary-color);
}

.recent-articles .date {
    color: var(--gray-medium);
    font-size: 0.85rem;
}

.categories li {
    list-style: none;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
}

.categories a {
    color: var(--text-color);
    text-decoration: none;
}

.categories a:hover {
    color: var(--primary-color);
}

.categories li.active a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== 文章详情页 ===== */
.article-full {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
}

.article-full h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    line-height: 1.3;
}

.article-content {
    margin: 30px 0;
    line-height: 1.8;
    color: var(--text-color);
    background: var(--white);
    padding: 20px 0;
}

.article-content p {
    margin-bottom: 1.5em;
}

/* 文章信息栏 - 重新设计 */
.article-meta-full {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    margin: 25px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.meta-item {
    text-align: center;
    padding: 15px;
    background: var(--light-bg);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.meta-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.meta-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.meta-value {
    display: block;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.meta-value a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.meta-value a:hover {
    background: rgba(67, 97, 238, 0.1);
}

/* 分类特殊样式 */
.category-meta {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(114, 9, 183, 0.1));
    border: 2px solid var(--primary-color);
}

.category-meta .meta-label {
    color: var(--primary-color);
}

.category-meta .meta-value a {
    background: var(--primary-color);
    color: white !important;
    padding: 6px 15px;
    border-radius: 20px;
}

.category-meta .meta-value a:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* 文章底部 - 分享和导航 */
.article-footer {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 30px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
}

.last-updated {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.share-section {
    margin-bottom: 30px;
}

.share-title {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.share-btn.weibo {
    background: linear-gradient(135deg, #e6162d, #ff4757);
    color: white;
}

.share-btn.qq {
    background: linear-gradient(135deg, #12b7f5, #2eccff);
    color: white;
}

.share-btn.copy {
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--gray-light);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-btn.copy:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 文章导航 */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-item {
    background: var(--light-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    padding-left: 50px;
}

.nav-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    background: var(--white);
}

.nav-item.nav-next {
    padding-left: 20px;
    padding-right: 50px;
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-title {
    display: block;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.4;
}

.nav-item::before {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-prev::before {
    content: '←';
    left: 20px;
}

.nav-next::before {
    content: '→';
    right: 20px;
}

/* ===== 页脚 ===== */
.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
    border-top: 1px solid var(--gray-light);
    margin-top: 40px;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .sidebar {
        width: 100%;
        /* 删除 order: -1; */
    }
    
    /* 删除 .main-content 的 order 设置 */
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .header {
        padding: 15px 0;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .main-nav a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .article-full {
        padding: 25px;
    }
    
    .article-full h1 {
        font-size: 1.8rem;
    }
    
    .article-meta-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-item {
        padding: 15px 15px 15px 50px;
    }
    
    .nav-item.nav-next {
        padding: 15px 50px 15px 15px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .article-meta-full {
        grid-template-columns: 1fr;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .main-nav ul {
        gap: 2px;
    }
    
    .main-nav a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* 横幅广告 */
.banner-ad {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 20px;
    border-radius: var(--radius-md);
    margin: 25px 0;
    text-align: center;
} 1.1rem;
    }
}