/* ===== 首页样式 index.css ===== */
/* 仅首页使用：Hero搜索区、热门标签、常用工具、搜索结果、工具卡片网格、分类区块 */

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    padding: 50px 20px 40px;
    text-align: center;
}
.hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.hero p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 560px;
    margin: 0 auto 24px;
}
.hero-search {
    max-width: 600px;
    margin: 0 auto 16px;
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hero-search input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    font-size: 15px;
    outline: none;
}
.hero-search button {
    padding: 14px 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.hero-search button:hover { background: #1d4ed8; }
.hot-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
}
.hot-tags span {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}
.hot-tags a {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}
.hot-tags a:hover {
    background: rgba(255,255,255,0.3);
    text-decoration: none;
}

/* ===== Main ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* ===== Common Tools ===== */
.common-tools {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 32px;
}
.common-tools-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.common-tools-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
}
.common-tools-header .clear-btn {
    margin-left: auto;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    background: none;
    border: none;
}
.common-tools-header .clear-btn:hover { color: #dc2626; }
.common-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.common-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
    cursor: pointer;
}
.common-item:hover {
    background: #eff6ff;
    color: #2563eb;
    text-decoration: none;
}
.common-item .count {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 4px;
}
.common-empty {
    font-size: 14px;
    color: #9ca3af;
    padding: 8px 0;
}

/* ===== Search Results ===== */
.search-results {
    display: none;
    margin-bottom: 32px;
}
.search-results.active { display: block; }
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.search-results-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}
.search-results-header .close-search {
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    background: none;
    border: none;
}
.search-results-header .close-search:hover { color: #dc2626; }

/* ===== Section ===== */
.section {
    margin-bottom: 40px;
    scroll-margin-top: 80px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}
.section h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-icon { font-size: 22px; }

/* ===== Tool Grid ===== */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}
.tool-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 18px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.tool-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}
.tool-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.tool-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}
.tool-card h3 a { color: #1f2937; }
.tool-card h3 a:hover { color: #2563eb; text-decoration: none; }
.tool-card p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
}
.tool-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.tool-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 500;
}
.tool-hot {
    font-size: 11px;
    color: #dc2626;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== About Section (首页底部) ===== */
.about-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px;
    margin-bottom: 40px;
}
.about-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}
.about-section p {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* ===== 首页移动端 ===== */
@media (max-width: 768px) {
    .hero { padding: 36px 16px 32px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }
    .hero-search { flex-direction: column; }
    .hero-search button { padding: 12px; }
    .tool-grid { grid-template-columns: 1fr; }
}
