/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.3)), url('src/background.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center center;
    min-height: 100vh;
}

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

/* 头部样式 */
header {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* 英雄区域样式 */
.hero {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 5rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 博客文章样式 */
.blog-posts {
    padding: 2rem 0;
}

.blog-posts h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.post-content .post-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.read-more:hover {
    color: #2980b9;
}

.auto-link {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dashed #3498db;
    transition: all 0.3s;
}

.auto-link:hover {
    color: #2980b9;
    border-bottom: 1px solid #2980b9;
}

/* 文章详情样式 */
.post-detail {
    padding: 2rem 0;
}

.post-full h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.post-full .post-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.post-full-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-full-content p {
    margin-bottom: 1.5rem;
}

.back-to-home {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.back-to-home a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.back-to-home a:hover {
    color: #2980b9;
}

/* 页脚样式 */
footer {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    backdrop-filter: blur(5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav ul {
        margin-top: 1rem;
    }
    
    nav ul li {
        margin: 0 0.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .posts-container {
        grid-template-columns: 1fr;
    }
}