/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --accent: #e8710a;
    --dark: #202124;
    --gray: #5f6368;
    --light-gray: #f1f3f4;
    --border: #dadce0;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* ==================== 顶部导航 ==================== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.logo-icon {
    font-size: 28px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 15px;
    color: var(--gray);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-wechat {
    background: #07c160;
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-wechat:hover {
    background: #06ad56;
}

/* ==================== Hero区域 ==================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-title .highlight {
    color: #ffd700;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 24px;
}

.hero-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 14px;
}

/* ==================== 通用区块 ==================== */
.section {
    padding: 64px 0;
}

.section-dark {
    background: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--gray);
}

/* ==================== 精选推荐区 ==================== */
.recommend-section {
    margin-bottom: 40px;
}

.recommend-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
    padding-left: 4px;
}

/* ==================== 分类折叠区 ==================== */
.category-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.category-header:hover {
    background: var(--light-gray);
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-count {
    font-weight: 400;
    color: var(--gray);
    font-size: 14px;
}

.category-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--gray);
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-toggle .toggle-icon {
    font-size: 10px;
    transition: transform 0.3s;
}

.category-block.expanded .category-toggle .toggle-icon {
    transform: rotate(90deg);
}

.category-block.expanded .category-toggle {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.category-content {
    padding: 0 20px 20px;
}

/* ==================== 工具箱卡片 ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tool-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.tool-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.tool-card p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 10px;
    line-height: 1.5;
}

.tool-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tool-tags span {
    background: var(--light-gray);
    color: var(--gray);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

/* ==================== 专题卡片 ==================== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.topic-card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.topic-card.topic-hot {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.topic-badge {
    position: absolute;
    top: -10px;
    right: 14px;
    background: var(--primary);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.topic-card.topic-hot .topic-badge {
    background: #ff6b6b;
}

.topic-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.topic-card p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 10px;
    line-height: 1.5;
}

.topic-count {
    display: inline-block;
    background: var(--light-gray);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* ==================== 下载列表 ==================== */
.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    transition: all 0.2s;
}

.download-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.download-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-info p {
    font-size: 12px;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-tag {
    background: var(--light-gray);
    color: var(--gray);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-download {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-download:hover {
    background: var(--primary-dark);
}

/* ==================== 关于区域 ==================== */
.section-about {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: center;
}

.about-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 12px;
    font-size: 15px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 24px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 13px;
    color: var(--gray);
}

.about-wechat {
    text-align: center;
}

.wechat-qr {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    background: var(--light-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--gray);
    border: 1px dashed var(--border);
}

.about-wechat p {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
}

.wechat-desc {
    font-size: 12px !important;
    color: var(--gray) !important;
    font-weight: 400 !important;
    margin-top: 4px;
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--dark);
    color: #aeb4bf;
    padding: 48px 0 24px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 32px;
}

.footer-brand p {
    margin-top: 8px;
    font-size: 14px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
}

.footer-bottom p {
    margin-bottom: 4px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    
    .nav {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 24px;
    }
    
    .download-item {
        flex-wrap: wrap;
    }
    
    .download-tag {
        display: none;
    }
    
    .btn-download {
        width: 100%;
        margin-top: 8px;
    }

    .card-grid,
    .topics-grid {
        grid-template-columns: 1fr;
    }

    .category-header {
        padding: 14px 16px;
    }

    .category-title {
        font-size: 15px;
    }

    .category-content {
        padding: 0 16px 16px;
    }
}
