:root {
    --primary: #ff7e5f;
    --primary-light: #ff9e8a;
    --primary-dark: #e8694d;
    --secondary: #4a9fff;
    --dark: #333;
    --light: #f8f9fa;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border: #dee2e6;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 126, 95, 0.3);
}

.section {
    padding: 80px 0;
}

/* 导航栏 */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-icon {
    font-size: 18px;
    cursor: pointer;
    color: var(--gray);
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

/* 英雄区域 */
.hero {
    padding-top: 150px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 博客内容 */
.blog-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary);
    bottom: 0;
    left: 0;
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 25px;
}

.article-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.article-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-content p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.load-more-container {
    text-align: center;
    margin-top: 50px;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

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

.about-me img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 5px solid var(--light-gray);
}

.about-me p {
    color: var(--gray);
    font-size: 0.95rem;
}

.categories-list li {
    margin-bottom: 10px;
}

.categories-list a {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.categories-list a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--light-gray);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary);
    color: white;
}

/* 页脚 */
footer {
    background: var(--dark);
    color: white;
    padding: 70px 0 30px;
}

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

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: var(--primary);
    bottom: -10px;
    left: 0;
}

.footer-col p {
    color: #aaa;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-links li {
    color: #aaa;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

#subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#subscribe-form input {
    padding: 12px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

#subscribe-form input::placeholder {
    color: #aaa;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .blog-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}
/* 文章详情弹窗样式 */
.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    z-index: 10;
}

.article-detail .article-hero {
    height: 300px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.article-detail .article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body {
    padding: 30px;
}

.article-detail .article-meta {
    display: flex;
    gap: 20px;
    color: var(--gray);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.article-detail .article-content {
    line-height: 1.8;
}

.article-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* 加载和错误消息样式 */
.loading-message, .error-message {
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
    color: var(--gray);
}

.error-message {
    color: #e74c3c;
}