/* ===== 全局重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}
a {
    text-decoration: none;
    color: inherit;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 顶部导航 ===== */
.header {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #2563eb;
}
.logo .brand {
    color: #1e293b;
}
.logo .domain {
    font-size: 14px;
    font-weight: 400;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
}
.nav-links {
    display: flex;
    gap: 24px;
    font-size: 15px;
    color: #64748b;
}
.nav-links a:hover {
    color: #2563eb;
}
.search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 24px;
    padding: 6px 16px;
    gap: 8px;
}
.search-box input {
    border: none;
    background: transparent;
    padding: 6px 0;
    font-size: 14px;
    outline: none;
    width: 160px;
    color: #333;
}
.search-box input::placeholder {
    color: #94a3b8;
}
.search-box button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
}

/* ===== 分类导航（第二行） ===== */
.category-nav {
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    padding: 12px 0;
    overflow-x: auto;
    white-space: nowrap;
}
.category-nav .container {
    display: flex;
    gap: 28px;
    font-size: 14px;
    color: #64748b;
}
.category-nav a {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.category-nav a:hover,
.category-nav a.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
/* 锚点滚动偏移 */
.section-anchor {
    scroll-margin-top: 120px;
}

/* ===== 工具卡片网格 ===== */
.tool-section {
    padding: 32px 0 48px;
}
.tool-section h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0f172a;
}
.tool-section .subtitle {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 24px;
}
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.tool-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #eef2f6;
    transition: all 0.2s;
    text-align: center;
}
.tool-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #2563eb;
}
.tool-card .icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}
.tool-card .name {
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
}
.tool-card .desc {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tool-card .tag {
    display: inline-block;
    font-size: 11px;
    background: #dbeafe;
    color: #2563eb;
    padding: 1px 10px;
    border-radius: 12px;
    margin-top: 8px;
}

/* ===== 特色大卡片 ===== */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}
.featured-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid #eef2f6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.2s;
}
.featured-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}
.featured-card .icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}
.featured-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}
.featured-card p {
    font-size: 14px;
    color: #64748b;
    margin: 6px 0 14px;
}
.featured-card .btn {
    display: inline-block;
    background: #2563eb;
    color: #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}
.featured-card .btn:hover {
    background: #1d4ed8;
}

/* ===== 分类标题（首页用） ===== */
.category-title {
    font-size: 18px;
    font-weight: 600;
    margin: 32px 0 14px;
    color: #0f172a;
    scroll-margin-top: 110px;
}

/* ===== 底部 ===== */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0 24px;
    margin-top: 16px;
}
.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 24px;
}
.footer .brand {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.footer .brand span {
    color: #60a5fa;
}
.footer .links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.footer .links a {
    color: #94a3b8;
    font-size: 14px;
}
.footer .links a:hover {
    color: #fff;
}
.footer .copyright {
    width: 100%;
    text-align: center;
    font-size: 13px;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    margin-top: 12px;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .logo {
        justify-content: center;
    }
    .nav-links {
        justify-content: center;
        gap: 16px;
        font-size: 14px;
    }
    .search-box {
        width: 100%;
    }
    .search-box input {
        width: 100%;
    }
    .category-nav .container {
        gap: 16px;
        font-size: 13px;
    }
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .featured-grid {
        grid-template-columns: 1fr;
    }
    .footer .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .tool-card {
        padding: 14px 10px;
    }
    .tool-card .icon {
        font-size: 26px;
    }
    .tool-card .name {
        font-size: 13px;
    }
}