/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.site-title a {
    color: white;
    text-decoration: none;
}

.site-description {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

/* 主要内容区域 */
.main {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

/* 文章网格布局 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* 文章卡片样式 */
.article-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.article-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #667eea;
}

.article-excerpt {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: #667eea;
    color: white;
}

/* 文章详情页样式 */
.article-detail {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.article-detail .article-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 0;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-content h1, .article-content h2, .article-content h3 {
    margin: 30px 0 15px 0;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-actions {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #5a6fd8;
}

/* 无文章状态 */
.no-articles {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.no-articles h2 {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 15px;
}

.no-articles p {
    color: #adb5bd;
    font-size: 1.1rem;
}

/* 404错误页面 */
.error-page {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.error-page h1 {
    font-size: 6rem;
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 700;
}

.error-page h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.error-page p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a6fd8;
    transform: translateY(-2px);
}

/* 底部样式 */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

.footer p {
    margin-bottom: 5px;
    opacity: 0.8;
}

.icp-info {
    font-size: 0.9rem;
    opacity: 0.6;
}

.icp-info a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.icp-info a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 40px 0;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .site-description {
        font-size: 1rem;
    }
    
    .main {
        padding: 40px 0;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card {
        padding: 20px;
    }
    
    .article-detail {
        padding: 25px;
        margin: 0 10px;
    }
    
    .article-detail .article-title {
        font-size: 1.8rem;
    }
    
    .error-page h1 {
        font-size: 4rem;
    }
    
    .no-articles, .error-page {
        padding: 60px 20px;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.8rem;
    }
    
    .article-detail {
        padding: 20px;
    }
    
    .article-detail .article-title {
        font-size: 1.6rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
}