* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: #3498db;
    transition: color 0.3s;
}

a:hover {
    color: #2980b9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand a {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li a {
    color: #555;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #3498db;
    background-color: #ecf0f1;
}

/* 主内容区 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-box button {
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #2980b9;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.article-item {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.article-title {
    font-size: 22px;
    margin-bottom: 12px;
}

.article-title a {
    color: #2c3e50;
}

.article-title a:hover {
    color: #3498db;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.article-meta a {
    color: #3498db;
}

.article-excerpt {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

.article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-link {
    font-size: 12px;
    padding: 4px 10px;
    background-color: #ecf0f1;
    border-radius: 3px;
    color: #7f8c8d;
}

.tag-link:hover {
    background-color: #3498db;
    color: white;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.pagination button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.pagination button:not(:disabled):hover {
    background-color: #2980b9;
}

.page-info {
    font-size: 14px;
    color: #7f8c8d;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-card,
.hot-articles,
.tag-cloud {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.profile-card {
    text-align: center;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.profile-name {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.profile-bio {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    font-size: 13px;
    padding: 5px 12px;
    background-color: #ecf0f1;
    border-radius: 3px;
    color: #555;
}

.social-links a:hover {
    background-color: #3498db;
    color: white;
}

/* 热门文章 */
.hot-articles h3,
.tag-cloud h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.hot-list {
    list-style: none;
}

.hot-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.hot-list li:last-child {
    border-bottom: none;
}

.hot-list a {
    font-size: 14px;
    color: #555;
    flex: 1;
}

.hot-list a:hover {
    color: #3498db;
}

.hot-views {
    font-size: 12px;
    color: #bdc3c7;
    margin-left: 10px;
}

/* 标签云 */
.tag-cloud .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 5px 12px;
    background-color: #ecf0f1;
    border-radius: 3px;
    color: #555;
    font-size: 13px;
    transition: all 0.3s;
}

.tag-item:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0;
    margin-top: 50px;
}

.footer p {
    text-align: center;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        gap: 15px;
        font-size: 14px;
    }

    .article-title {
        font-size: 18px;
    }
}

/* 分类页面样式 */
.page-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.category-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.category-name {
    font-size: 20px;
    margin: 0;
}

.category-name a {
    color: #2c3e50;
}

.category-name a:hover {
    color: #3498db;
}

.category-count {
    font-size: 13px;
    color: #7f8c8d;
    background: #ecf0f1;
    padding: 5px 12px;
    border-radius: 20px;
}

.category-description {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-latest h4 {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 12px;
}

.category-latest ul {
    list-style: none;
    padding: 0;
}

.category-latest li {
    margin-bottom: 8px;
}

.category-latest li a {
    font-size: 14px;
    color: #555;
    transition: color 0.3s;
}

.category-latest li a:hover {
    color: #3498db;
}

/* 统计卡片 */
.stats-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stats-card h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* 标签页面样式 */
.tag-cloud-full {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.tag-item-large {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 500;
}

.tag-item-large:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tag-count-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
}

.hot-tags {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-top: 25px;
}

.hot-tags h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.tags-small {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link-small {
    font-size: 13px;
    padding: 6px 14px;
    background-color: #ecf0f1;
    border-radius: 20px;
    color: #555;
    transition: all 0.3s;
}

.tag-link-small:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* 归档页面样式 */
.archive-timeline {
    position: relative;
    padding-left: 30px;
    margin-bottom: 30px;
}

.archive-year {
    margin-bottom: 40px;
}

.archive-year-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid #3498db;
}

.archive-month {
    margin-bottom: 25px;
}

.archive-month-title {
    font-size: 18px;
    color: #3498db;
    margin-bottom: 15px;
    font-weight: 500;
}

.archive-articles {
    list-style: none;
    padding-left: 20px;
}

.archive-articles li {
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 2px solid #ecf0f1;
    padding-bottom: 15px;
}

.archive-article-link {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.archive-article-link:hover {
    color: #3498db;
}

.archive-article-meta {
    font-size: 13px;
    color: #95a5a6;
}

.archive-stats {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.archive-stats h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

@media (max-width: 768px) {
    .tag-cloud-full {
        justify-content: center;
    }
    
    .archive-timeline {
        padding-left: 15px;
    }
}

/* 关于页面样式 */
.about-page {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.about-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 20px;
}

.about-title {
    font-size: 28px;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.about-subtitle {
    text-align: center;
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 25px;
}

.about-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    padding: 8px 20px;
    background-color: #ecf0f1;
    border-radius: 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: #3498db;
    color: white;
    transform: translateY(-2px);
}

.about-heading {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.about-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.about-content h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 25px 0 15px;
}

.about-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.about-content li {
    margin-bottom: 10px;
}

.about-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    background: #f8f9fa;
    padding: 15px 20px;
    font-style: italic;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.contact-list a {
    color: #3498db;
    word-break: break-all;
}
