* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

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

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

nav a:hover,
nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content */
main {
    padding: 3rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.articles-section h2 {
    margin-bottom: 2rem;
    color: var(--text-color);
    font-size: 2rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

.article-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

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

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.article-category {
    color: var(--primary-color);
    font-weight: 500;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.article-read-more:hover {
    text-decoration: underline;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.widget h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.widget p {
    color: var(--text-light);
    line-height: 1.8;
}

.categories {
    list-style: none;
}

.categories li {
    margin-bottom: 0.5rem;
}

.categories a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 0.3rem 0;
}

.categories a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
    transition: all 0.3s;
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.recent-posts a:hover {
    color: var(--primary-color);
}

.recent-posts .date {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-top: 0.3rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: 3% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: var(--text-light);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-color);
}

#articleContent {
    padding: 2rem;
}

#articleContent h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

#articleContent .article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

#articleContent .article-header-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

#articleContent .article-image-full {
    width: 100%;
    border-radius: 10px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

#articleContent p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
}

#articleContent h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}
footer .footer-info {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}
footer p {
    margin: 0.3rem 0;
}
footer a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
}
footer a:hover {
    text-decoration: underline;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

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

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}
