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

:root {
    --primary: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #60a5fa;
    --bg: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--primary);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-light);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    display: none;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg);
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.search-form input:focus {
    border-color: var(--secondary);
}

.search-form button {
    padding: 0.5rem 1rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: var(--primary);
}

.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 4rem 0;
    margin: -2rem 0 2rem;
}

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

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
}

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

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15);
}

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.article-content {
    padding: 1.5rem;
}

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

.category-tag {
    background: var(--secondary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.article-excerpt {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-year {
    font-weight: 600;
    color: var(--primary);
}

.timeline-count {
    color: var(--text-light);
}

.article-detail {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

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

.article-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.article-detail-content {
    font-size: 1.0625rem;
    line-height: 1.8;
}

.article-detail-content h2 {
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.article-detail-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.article-detail-content code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

.article-detail-content pre code {
    background: none;
    padding: 0;
}

.related-articles {
    margin-top: 3rem;
}

.related-articles h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

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

.related-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}

.related-card a {
    text-decoration: none;
    color: var(--text);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--primary);
}

.search-results-info {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.no-articles {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.footer {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

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

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .article-detail-title {
        font-size: 1.5rem;
    }
}
