/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    color: #333;
    background: #f5f7fa;
}
a { color: #1a5fb4; text-decoration: none; }
a:hover { color: #0d3a7a; text-decoration: underline; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === Header === */
.header {
    background: linear-gradient(135deg, #0d3a7a 0%, #1a5fb4 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { color: #fff; font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.logo:hover { color: #ffd700; text-decoration: none; }
.nav { display: flex; gap: 8px; overflow-x: auto; }
.nav a {
    color: rgba(255,255,255,0.85);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
}
.nav a:hover { color: #fff; background: rgba(255,255,255,0.15); text-decoration: none; }

/* === Hero === */
.hero {
    background: linear-gradient(135deg, #0d3a7a 0%, #1a5fb4 50%, #2a7fd4 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; font-weight: 800; }
.hero p { font-size: 1.2rem; opacity: 0.9; margin-bottom: 32px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-bottom: 32px; }
.stat-item { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 800; color: #ffd700; }
.stat-label { font-size: 0.85rem; opacity: 0.8; }
.hero-actions { display: flex; justify-content: center; gap: 16px; }

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.btn-primary { background: #ffd700; color: #0d3a7a; border-color: #ffd700; }
.btn-primary:hover { background: #ffed4a; color: #0d3a7a; text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }

/* === Section === */
.section { padding: 48px 0; }
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: 1.8rem; color: #0d3a7a; margin-bottom: 8px; }
.section-header p { color: #666; }

/* === Module Grid === */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.module-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 2px solid transparent;
}
.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(26,95,180,0.15);
    border-color: #1a5fb4;
    text-decoration: none;
}
.module-icon { font-size: 2.5rem; margin-bottom: 12px; }
.module-card h3 { font-size: 1.1rem; color: #0d3a7a; margin-bottom: 8px; }
.module-count { color: #888; font-size: 0.85rem; }

/* === Article Grid === */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.article-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.article-body { padding: 20px; }
.article-meta { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.article-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.article-card h3 a { color: #333; }
.article-card h3 a:hover { color: #1a5fb4; }
.article-summary { color: #666; font-size: 0.9rem; margin-bottom: 12px; }
.article-meta span { color: #999; font-size: 0.8rem; margin-right: 12px; }

/* === Tier Badges === */
.tier-badge, .tier-badge-sm {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}
.tier-badge-sm { font-size: 0.7rem; padding: 1px 8px; }
.tier-基础 { background: #e8f5e9; color: #2e7d32; }
.tier-核心 { background: #e3f2fd; color: #1565c0; }
.tier-进阶 { background: #fff3e0; color: #e65100; }
.sub-module-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #f0f0f0;
    color: #666;
}

/* === Article List (Category) === */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-list-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    transition: all 0.2s;
}
.article-list-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.article-list-meta { display: flex; gap: 8px; margin-bottom: 8px; }
.article-list-item h3 { font-size: 1.15rem; margin-bottom: 6px; }
.article-list-item h3 a { color: #333; }
.article-list-item h3 a:hover { color: #1a5fb4; }
.article-excerpt { color: #666; font-size: 0.9rem; margin-bottom: 8px; }
.article-list-footer { display: flex; gap: 16px; color: #999; font-size: 0.8rem; }
.score-badge { color: #1a5fb4; font-weight: 600; }

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, #0d3a7a 0%, #1a5fb4 100%);
    color: #fff;
    padding: 48px 0 32px;
}
.breadcrumb { margin-bottom: 12px; opacity: 0.8; font-size: 0.9rem; }
.breadcrumb a { color: rgba(255,255,255,0.8); }
.page-header h1 { font-size: 2rem; margin-bottom: 8px; }

/* === Article Detail === */
.article-detail {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.article-detail h1 { font-size: 1.8rem; color: #0d3a7a; margin-bottom: 16px; }
.article-detail .article-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #333;
}
.article-detail .article-content h2 {
    font-size: 1.4rem;
    color: #0d3a7a;
    margin: 36px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3f2fd;
}
.article-detail .article-content h3 {
    font-size: 1.15rem;
    color: #1a5fb4;
    margin: 24px 0 12px;
}
.article-detail .article-content p { margin-bottom: 16px; }
.article-detail .article-content ul,
.article-detail .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-detail .article-content li { margin-bottom: 8px; }
.article-detail .article-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}
.article-detail .article-content code {
    font-family: "Fira Code", "Consolas", monospace;
    font-size: 0.9rem;
}
.article-detail .article-content blockquote {
    border-left: 4px solid #1a5fb4;
    padding: 12px 20px;
    background: #f0f7ff;
    margin-bottom: 16px;
    border-radius: 0 8px 8px 0;
}
.article-detail .article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}
.article-detail .article-content th,
.article-detail .article-content td {
    border: 1px solid #ddd;
    padding: 10px 14px;
    text-align: left;
}
.article-detail .article-content th { background: #f0f7ff; color: #0d3a7a; }

/* === Article Navigation === */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.article-nav a {
    display: block;
    padding: 12px 20px;
    background: #f5f7fa;
    border-radius: 8px;
    max-width: 45%;
    transition: all 0.2s;
}
.article-nav a:hover { background: #e3f2fd; text-decoration: none; }
.article-nav .nav-label { font-size: 0.8rem; color: #888; }
.article-nav .nav-title { font-weight: 600; color: #333; }

/* === Footer === */
.footer {
    background: #0d3a7a;
    color: rgba(255,255,255,0.8);
    padding: 48px 0 24px;
    margin-top: 48px;
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h4 { color: #fff; margin-bottom: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,0.7); padding: 4px 0; font-size: 0.9rem; }
.footer-col a:hover { color: #ffd700; }
.copyright { text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; }

/* === Responsive === */
@media (max-width: 768px) {
    .header .container { flex-direction: column; height: auto; padding: 12px 20px; }
    .nav { margin-top: 8px; }
    .hero h1 { font-size: 1.8rem; }
    .hero-stats { gap: 24px; }
    .article-grid { grid-template-columns: 1fr; }
    .article-detail { padding: 24px; }
}
