/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "Microsoft YaHei", "Segoe UI", sans-serif;
    color: #333;
    background: #f5f7fa;
    line-height: 1.9;
    font-size: 15px;
}
a { color: #2563eb; text-decoration: none; transition: color .2s; }
a:hover { color: #1d4ed8; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.site-logo {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 1px;
}
.site-logo span { color: #2563eb; }
.site-nav { display: flex; gap: 32px; }
.site-nav a {
    color: #475569;
    font-size: 15px;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}
.site-nav a:hover,
.site-nav a.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    padding: 72px 0 64px;
    text-align: center;
}
.hero h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 1px;
}
.hero p {
    font-size: 17px;
    opacity: .88;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.8;
}
.hero-search {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.hero-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 20px;
    font-size: 15px;
    color: #333;
}
.hero-search button {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0 28px;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}
.hero-search button:hover { background: #1d4ed8; }

/* ===== Section ===== */
.section { padding: 56px 0; }
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}
.section-desc {
    color: #64748b;
    margin-bottom: 36px;
    font-size: 15px;
}

/* ===== Category Cards ===== */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.cat-card {
    background: #fff;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all .25s;
    cursor: pointer;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    border-color: #2563eb;
}
.cat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
}
.cat-icon.blue   { background: #eff6ff; color: #2563eb; }
.cat-icon.green  { background: #f0fdf4; color: #16a34a; }
.cat-icon.orange { background: #fff7ed; color: #ea580c; }
.cat-icon.purple { background: #faf5ff; color: #9333ea; }
.cat-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}
.cat-card p {
    font-size: 13px;
    color: #94a3b8;
}

/* ===== Article List ===== */
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-item {
    background: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    border: 1px solid #e5e7eb;
    transition: all .25s;
}
.article-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    border-color: #cbd5e1;
}
.article-item h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.5;
}
.article-item h2 a { color: #1e293b; }
.article-item h2 a:hover { color: #2563eb; }
.article-excerpt {
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #94a3b8;
}

/* ===== Sidebar Layout ===== */
.content-wrap {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.content-main { flex: 1; min-width: 0; }
.content-side { width: 280px; flex-shrink: 0; }

/* ===== Sidebar Widgets ===== */
.widget {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 20px;
}
.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.widget-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.widget-tags a {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all .2s;
}
.widget-tags a:hover { background: #2563eb; color: #fff; }
.widget-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.widget-list li:last-child { border-bottom: none; }
.widget-list a {
    color: #475569;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.widget-list a:hover { color: #2563eb; }
.widget-list .count {
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 10px;
}

/* ===== Knowledge Page ===== */
.page-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #fff;
    padding: 48px 0 40px;
    text-align: center;
}
.page-banner h1 { font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.page-banner p { font-size: 15px; opacity: .85; }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.filter-btn {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    color: #475569;
    background: #fff;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.knowledge-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all .25s;
}
.knowledge-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.07);
}
.knowledge-card .card-body { padding: 20px; }
.knowledge-card .card-tag {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 500;
}
.tag-blue   { background: #eff6ff; color: #2563eb; }
.tag-green  { background: #f0fdf4; color: #16a34a; }
.tag-orange { background: #fff7ed; color: #ea580c; }
.tag-purple { background: #faf5ff; color: #9333ea; }
.knowledge-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.5;
}
.knowledge-card h3 a { color: #1e293b; }
.knowledge-card h3 a:hover { color: #2563eb; }
.knowledge-card .card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.knowledge-card .card-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    background: #fff;
    border: 1px solid #e5e7eb;
    transition: all .2s;
}
.pagination a:hover { border-color: #2563eb; color: #2563eb; }
.pagination .current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ===== About Page ===== */
.about-content {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 40px;
    margin-bottom: 32px;
}
.about-content h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}
.about-content p {
    color: #475569;
    margin-bottom: 16px;
    line-height: 2;
}
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 28px 20px;
    text-align: center;
}
.stat-card .num {
    font-size: 36px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
}
.stat-card .label {
    font-size: 14px;
    color: #64748b;
    margin-top: 6px;
}
.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.feature-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 28px;
}
.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.8;
}

/* ===== Footer ===== */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0 0;
    margin-top: 56px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #334155;
}
.footer-col h4 {
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-col p,
.footer-col a {
    font-size: 14px;
    color: #94a3b8;
    line-height: 2;
}
.footer-col a { display: block; }
.footer-col a:hover { color: #e2e8f0; }
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
    color: #64748b;
}

/* ===== Article Detail Page ===== */
.article-detail {
    max-width: 900px;
    margin: 0 auto;
}
.article-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}
.article-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 16px;
}
.article-header .article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #64748b;
    align-items: center;
}
.article-header .meta-category {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 500;
}

/* Article Summary */
.article-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #2563eb;
    padding: 24px;
    margin-bottom: 32px;
    border-radius: 0 8px 8px 0;
}
.article-summary h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 12px;
}
.article-summary p {
    font-size: 15px;
    line-height: 1.8;
    color: #475569;
    margin: 0;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #334155;
}
.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-top: 32px;
    margin-bottom: 16px;
}
.article-content p {
    margin-bottom: 20px;
}
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}
.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 24px;
}
.article-content li {
    margin-bottom: 8px;
}
.article-content pre {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
}
.article-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.article-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}
.back-link a {
    display: inline-flex;
    align-items: center;
    color: #2563eb;
    text-decoration: none;
    font-size: 15px;
    transition: all .2s;
}
.back-link a:hover {
    color: #1d4ed8;
    transform: translateX(-4px);
}

/* Disclaimer Notice */
.disclaimer-notice {
    margin-top: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e6 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 8px 8px 0;
}
.disclaimer-notice p {
    font-size: 13px;
    line-height: 1.6;
    color: #92400e;
    margin: 0;
}
.disclaimer-notice a {
    color: #b45309;
    text-decoration: underline;
    font-weight: 500;
}
.disclaimer-notice a:hover {
    color: #92400e;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
    .about-stats { grid-template-columns: repeat(2, 1fr); }
    .about-features { grid-template-columns: 1fr; }
    .content-wrap { flex-direction: column; }
    .content-side { width: 100%; }
    .footer-inner { flex-direction: column; }
}
@media (max-width: 600px) {
    .cat-grid { grid-template-columns: 1fr; }
    .knowledge-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
}
