* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: #f0f2f5;
    color: #2d3436;
    line-height: 1.8;
}
a { text-decoration: none; color: #6c5ce7; }
a:hover { color: #5a4bd1; }

/* ===== Header ===== */
header {
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(108, 92, 231, 0.25);
}
header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header .logo {
    color: white;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
header .logo span { color: #fbbf24; }
header .nav { display: flex; gap: 16px; flex-wrap: wrap; }
header .nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    padding: 4px 0;
    transition: color 0.2s;
    white-space: nowrap;
}
header .nav a:hover { color: #fbbf24; }

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    background: white;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 4px 24px rgba(108, 92, 231, 0.08);
}
.hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    margin-bottom: 16px;
    line-height: 1.3;
}
.hero h1 span { color: #6c5ce7; }
.hero > p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ===== Search ===== */
.search-box {
    max-width: 560px;
    margin: 0 auto 32px;
    display: flex;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.25);
}
.search-box input {
    flex: 1;
    padding: 14px 24px;
    border: none;
    font-size: 15px;
    outline: none;
    background: white;
}
.search-box button {
    background: #6c5ce7;
    color: white;
    padding: 14px 28px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.search-box button:hover { background: #5a4bd1; }

/* ===== Stats ===== */
.stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
    font-size: 36px;
    font-weight: 800;
    color: #6c5ce7;
}
.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

/* ===== Section ===== */
.section-title {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    margin: 48px 0 24px;
    text-align: center;
}
.section-desc {
    text-align: center;
    color: #777;
    font-size: 16px;
    margin-bottom: 32px;
}

/* ===== Category Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.category-card {
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.25s;
    border: 1px solid #eee;
    display: block;
    color: #111;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.12);
    border-color: #6c5ce7;
    color: #111;
}
.category-icon { font-size: 40px; margin-bottom: 12px; }
.category-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.category-card p {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}
.category-count {
    font-size: 12px;
    color: #6c5ce7;
    background: #f0edff;
    padding: 2px 12px;
    border-radius: 12px;
    font-weight: 500;
}

/* ===== Article List ===== */
.hot-articles { margin-top: 48px; }
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
}
.article-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.25s;
    border: 1px solid #eee;
    display: block;
    color: #111;
}
.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(108, 92, 231, 0.12);
    border-color: #6c5ce7;
    color: #111;
}
.article-img { font-size: 36px; margin-bottom: 12px; }
.article-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    line-height: 1.4;
    margin-bottom: 8px;
}
.article-body p {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.article-tag {
    display: inline-block;
    background: #f0edff;
    color: #6c5ce7;
    padding: 2px 10px;
    font-size: 11px;
    border-radius: 10px;
    font-weight: 500;
}
.article-meta span:last-child {
    font-size: 12px;
    color: #6c5ce7;
    font-weight: 700;
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(135deg, #2d1b69, #1e1b4b);
    color: rgba(255, 255, 255, 0.5);
    padding: 36px 20px;
    text-align: center;
    font-size: 13px;
    margin-top: 60px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
}
.footer-links a:hover { color: #fbbf24; }

/* ===== Back to Top ===== */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.4);
    z-index: 999;
    display: none;
    transition: background 0.2s;
}
.back-top:hover { background: #5a4bd1; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 26px; }
    .hero > p { font-size: 16px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .article-list { grid-template-columns: 1fr; }
    .stats { gap: 24px; }
    .stat-num { font-size: 28px; }
    .back-top { bottom: 16px; right: 16px; width: 38px; height: 38px; font-size: 16px; }
}
