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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 导航栏样式 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

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

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #3498db;
}

/* 主要内容区域 */
.main-content {
    margin-top: 80px;
    padding: 2rem 0;
}

/* 欢迎区域 */
.welcome-section {
    text-align: center;
    padding: 4rem 0;
    background-color: #fff;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #666;
}

/* 文章网格 */
.latest-posts {
    margin-bottom: 3rem;
}

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

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

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

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

.post-content {
    padding: 1.5rem;
}

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

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

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
}

/* 分类标签 */
.categories {
    margin-bottom: 3rem;
}

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

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tag {
    background-color: #3498db;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: #2980b9;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section p,
.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links li {
        margin: 0 1rem;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }
}

/* 博客列表页面样式 */
.blog-header {
    text-align: center;
    padding: 3rem 0;
    background-color: #fff;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.blog-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.blog-posts {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.post-date {
    margin-right: 1rem;
}

.post-category {
    background-color: #3498db;
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.blog-post h2 {
    margin-bottom: 1rem;
}

.blog-post h2 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-post h2 a:hover {
    color: #3498db;
}

.blog-post p {
    margin-bottom: 1.5rem;
    color: #666;
}

.pagination {
    text-align: center;
    margin-top: 3rem;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #f8f9fa;
}

.pagination .active {
    background-color: #3498db;
    color: #fff;
}

/* 关于页面样式 */
.about-header {
    text-align: center;
    padding: 3rem 0;
    background-color: #fff;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.about-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.about-text h2 {
    color: #2c3e50;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.about-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.skills-list {
    list-style: none;
    padding: 0;
}

.skills-list li {
    background-color: #f8f9fa;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        text-align: center;
    }

    .about-image img {
        max-width: 300px;
    }
}

/* 联系页面样式 */
.contact-section {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-section h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.contact-intro {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 1.1rem;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    margin-bottom: 15px;
    color: #444;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.contact-info li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info .icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #e0e0e0;
    color: #333;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-form h3 {
    margin-bottom: 20px;
    color: #444;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007BFF;
    outline: none;
}

.btn-submit {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    width: 100%;
}

.btn-submit:hover {
    background-color: #0069d9;
}

/* 状态消息样式 */
.status-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    font-weight: 500;
    display: none;
}

.status-message:not(:empty) {
    display: block;
}

.status-message.info {
    background-color: #e1f5fe;
    color: #0288d1;
    border: 1px solid #b3e5fc;
}

.status-message.success {
    background-color: #e8f5e9;
    color: #388e3c;
    border: 1px solid #c8e6c9;
}

.status-message.error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
    
    .contact-info,
    .contact-form {
        min-width: 100%;
    }
} 