/* =====================================
   源查询 - 自定义样式
   ===================================== */

/* 全局 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f6fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
}

/* 首页搜索区 */
.hero-search {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 0;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* 工具卡片网格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    min-height: 100px;
}
.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #667eea;
    color: #333;
}
.tool-icon {
    font-size: 28px;
    margin-bottom: 6px;
}
.tool-name {
    font-size: 13px;
    text-align: center;
    line-height: 1.3;
}

/* 分类标题 */
.category-section {
    margin-bottom: 32px;
}
.category-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e8e8;
}

/* 工具页面 */
.tool-container {
    max-width: 800px;
    margin: 0 auto;
}
.tool-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.tool-box h1 {
    font-size: 24px;
    margin-bottom: 6px;
}
.tool-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}
.result-box {
    background: #f0f4ff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 16px;
    display: none;
}
.result-box.show {
    display: block;
}
.result-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #ddd;
}
.result-item:last-child {
    border-bottom: none;
}
.result-label {
    color: #888;
    font-weight: 500;
}
.result-value {
    font-weight: 600;
    color: #333;
}

/* FAQ 区 */
.faq-section {
    margin-top: 30px;
}
.faq-section h3 {
    font-size: 18px;
    margin-bottom: 14px;
}
.faq-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-q {
    font-weight: 600;
    color: #333;
    cursor: pointer;
}
.faq-a {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

/* 相关工具 */
.related-tools {
    margin-top: 30px;
}
.related-tools h3 {
    font-size: 18px;
    margin-bottom: 14px;
}

/* 错误提示 */
.alert-tip {
    display: none;
}
.alert-tip.show {
    display: block;
}

/* 响应式 */
@media (max-width: 576px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    .tool-card {
        padding: 12px 6px;
        min-height: 80px;
    }
    .tool-icon {
        font-size: 22px;
    }
    .tool-name {
        font-size: 12px;
    }
    .tool-box {
        padding: 16px;
    }
}
