/* ============================================================
   迪妙聚合搜索引擎 tools/search-hub/style.css
   导航/页脚/通用样式与官网 style.css 保持一致
   ============================================================ */
:root {
    --primary: #1a6eff;
    --primary-light: #e8f1ff;
    --primary-dark: #0d4fc4;
    --primary-gradient: linear-gradient(135deg, #1a6eff 0%, #0d4fc4 100%);
    --text: #1a1a2e;
    --text-secondary: #5a5a7a;
    --text-light: #8a8aa0;
    --bg: #ffffff;
    --bg-warm: #f8fafc;
    --bg-card: #ffffff;
    --border: #e8ecf4;
    --shadow: 0 4px 24px rgba(26, 110, 255, 0.08);
    --shadow-hover: 0 12px 40px rgba(26, 110, 255, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --warning: #ff6b35;
    --warning-light: #fff3ed;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --success: #16a34a;
    --success-light: #f0fdf4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== NAVIGATION（与官网一致） ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 110, 255, 0.08);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06); }
.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon { display: flex; align-items: center; justify-content: center; color: white; font-weight: 900; font-size: 18px; }
.logo-icon img { height: 44px; }
.logo-text { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.3; }
.logo-text span { display: block; font-size: 11px; font-weight: 400; color: var(--text-light); letter-spacing: 1px; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 8px; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--primary-light); }
.mobile-toggle {
    display: none;
    width: 40px; height: 40px;
    border: none;
    background: var(--primary-light);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.mobile-toggle span { display: block; width: 20px; height: 2px; background: var(--primary); border-radius: 2px; transition: var(--transition); }

/* ===== FOOTER（与官网一致） ===== */
.footer { background: var(--text); color: white; padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .logo-icon { margin-bottom: 16px; display: flex; align-items: flex-start; justify-content: flex-start; }
.footer-brand .logo-icon img { height: 84px; }
.footer-brand p { font-size: 14px; color: rgba(255, 255, 255, 0.6); line-height: 1.8; max-width: 320px; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 20px; color: rgba(255, 255, 255, 0.9); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255, 255, 255, 0.5); text-decoration: none; font-size: 14px; transition: var(--transition); }
.footer-col a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p, .footer-bottom a { font-size: 13px; color: rgba(255, 255, 255, 0.4); }

/* ===== SECTION COMMON（与官网一致） ===== */
.section { padding: 80px 0; position: relative; }
.section-alt { background: var(--bg-warm); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-tag {
    display: inline-block;
    font-size: 12px; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 12px; padding: 4px 16px;
    background: var(--primary-light); border-radius: 100px;
}
.section-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; color: var(--text); line-height: 1.3; margin-bottom: 12px; }
.section-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.8; }

/* ===== SCROLL ANIMATION（与官网一致） ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   聚合搜索引擎专属样式
   ============================================================ */
.sh-hero {
    padding: 150px 0 60px;
    background: linear-gradient(180deg, #f0f5ff 0%, #ffffff 100%);
}
.sh-hero-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.sh-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--primary);
    background: rgba(26, 110, 255, 0.08);
    border: 1px solid rgba(26, 110, 255, 0.15);
    padding: 6px 18px; border-radius: 100px; margin-bottom: 18px;
}
.sh-hero h1 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 900; color: var(--text); margin-bottom: 14px; letter-spacing: -0.5px; }
.sh-hero h1 .hl {
    background: linear-gradient(135deg, #ff6b35 0%, #ff4757 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.sh-sub { font-size: 15px; color: var(--text-secondary); line-height: 1.8; max-width: 640px; margin: 0 auto 28px; }

/* 分类 Tab */
.sh-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.sh-tab {
    padding: 8px 18px; border-radius: 100px;
    border: 1.5px solid var(--border); background: white;
    font-family: inherit; font-size: 13px; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.sh-tab:hover { border-color: var(--primary); color: var(--primary); }
.sh-tab.active {
    background: var(--primary-gradient); color: white; border-color: transparent;
    box-shadow: 0 4px 16px rgba(26, 110, 255, 0.3);
}

/* 搜索框 */
.sh-searchbox { display: flex; gap: 10px; max-width: 720px; margin: 0 auto; position: relative; }
.sh-inputwrap {
    flex: 1; display: flex; align-items: center; gap: 10px;
    background: white; border: 1.5px solid var(--border);
    border-radius: 14px; padding: 0 14px;
    box-shadow: 0 4px 20px rgba(26, 110, 255, 0.06);
    transition: var(--transition);
}
.sh-inputwrap:focus-within { border-color: var(--primary); box-shadow: 0 6px 28px rgba(26, 110, 255, 0.15); }
.sh-input-icon { color: var(--text-light); flex-shrink: 0; }
#shKeyword {
    flex: 1; border: none; outline: none; background: transparent;
    font-family: inherit; font-size: 16px; color: var(--text);
    padding: 16px 0; min-width: 0;
}
#shKeyword::placeholder { color: var(--text-light); font-size: 14px; }
.sh-clear {
    width: 28px; height: 28px; border: none; border-radius: 50%;
    background: var(--bg-warm); color: var(--text-light);
    font-size: 18px; line-height: 1; cursor: pointer; flex-shrink: 0;
    transition: var(--transition);
}
.sh-clear:hover { background: var(--danger-light); color: var(--danger); }
.sh-go {
    padding: 0 30px; border: none; border-radius: 14px;
    background: var(--primary-gradient); color: white;
    font-family: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer; box-shadow: 0 6px 20px rgba(26, 110, 255, 0.3);
    transition: var(--transition); white-space: nowrap;
}
.sh-go:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(26, 110, 255, 0.4); }

/* 搜索建议下拉 */
.sh-suggest {
    display: none; max-width: 720px; margin: 8px auto 0;
    background: white; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-hover); overflow: hidden; text-align: left;
    position: relative; z-index: 50;
}
.sh-suggest.show { display: block; }
.sh-suggest-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; font-size: 14px; color: var(--text-secondary);
    cursor: pointer; transition: background 0.15s ease;
}
.sh-suggest-item:hover { background: var(--primary-light); color: var(--primary); }
.sh-suggest-item svg { flex-shrink: 0; color: var(--text-light); }
.sh-suggest-item .sg-tag {
    margin-left: auto; font-size: 11px; color: var(--text-light);
    background: var(--bg-warm); padding: 2px 8px; border-radius: 100px; flex-shrink: 0;
}

/* 快捷操作 */
.sh-quickops { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.sh-op-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; border-radius: 10px;
    border: 1.5px solid var(--border); background: white;
    font-family: inherit; font-size: 13px; font-weight: 600;
    color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.sh-op-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.sh-op-btn.primary {
    background: var(--primary-gradient); color: white; border-color: transparent;
    box-shadow: 0 4px 16px rgba(26, 110, 255, 0.3);
}
.sh-op-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26, 110, 255, 0.4); color: white; }

/* 当前选中引擎提示 */
.sh-current { margin-top: 18px; font-size: 13px; color: var(--text-light); }
.sh-current strong { color: var(--primary); }

/* 引擎矩阵 */
.sh-engines-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sh-engine-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: var(--radius); padding: 16px;
    cursor: pointer; transition: var(--transition); position: relative;
}
.sh-engine-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: rgba(26, 110, 255, 0.25); }
.sh-engine-card.selected { border-color: var(--primary); background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%); box-shadow: 0 8px 28px rgba(26, 110, 255, 0.18); }
.sh-engine-card.selected::after {
    content: '✓ 当前默认'; position: absolute; top: 10px; right: 12px;
    font-size: 11px; font-weight: 700; color: var(--primary);
    background: var(--primary-light); padding: 2px 8px; border-radius: 100px;
}
.sh-engine-logo {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 900; color: white;
}
.sh-engine-info { flex: 1; min-width: 0; }
.sh-engine-info strong { display: block; font-size: 15px; color: var(--text); }
.sh-engine-info span { display: block; font-size: 12px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-engine-open {
    flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--primary);
    background: var(--primary-light); border: none; border-radius: 8px;
    padding: 6px 12px; cursor: pointer; font-family: inherit;
    transition: var(--transition);
}
.sh-engine-open:hover { background: var(--primary); color: white; }

/* 关键词转换器 */
.sh-convert-input { max-width: 720px; margin: 0 auto 24px; }
#cvInput {
    width: 100%; border: 1.5px solid var(--border); border-radius: 14px;
    padding: 14px 16px; font-family: inherit; font-size: 15px;
    color: var(--text); background: white; outline: none; resize: vertical;
    transition: var(--transition); box-shadow: 0 4px 20px rgba(26, 110, 255, 0.05);
}
#cvInput:focus { border-color: var(--primary); box-shadow: 0 6px 28px rgba(26, 110, 255, 0.14); }
.sh-convert-ops { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.sh-convert-tip { font-size: 12px; color: var(--text-light); margin-left: auto; }

.sh-convert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.cv-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px;
    transition: var(--transition);
}
.cv-item:hover { border-color: rgba(26, 110, 255, 0.25); box-shadow: var(--shadow); }
.cv-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cv-item-head strong { font-size: 13px; color: var(--text); }
.cv-btns { display: flex; gap: 6px; }
.cv-btn {
    font-size: 11px; font-weight: 600; padding: 3px 10px;
    border-radius: 6px; border: 1px solid var(--border);
    background: white; color: var(--text-secondary);
    cursor: pointer; font-family: inherit; transition: var(--transition);
}
.cv-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cv-btn.fill { color: var(--primary); border-color: rgba(26, 110, 255, 0.35); }
.cv-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: 13px; color: var(--text-secondary);
    word-break: break-all; line-height: 1.6;
    background: var(--bg-warm); border-radius: 8px; padding: 8px 10px;
    min-height: 20px; max-height: 84px; overflow-y: auto;
}

/* 直达链接生成器 */
.sh-urlgen { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.ug-row {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 16px;
    transition: var(--transition);
}
.ug-row:hover { border-color: rgba(26, 110, 255, 0.25); box-shadow: var(--shadow); }
.ug-name { flex-shrink: 0; width: 120px; font-size: 14px; font-weight: 700; color: var(--text); }
.ug-url {
    flex: 1; min-width: 0; font-family: Consolas, monospace;
    font-size: 12px; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: var(--bg-warm); border-radius: 8px; padding: 8px 12px;
}
.ug-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* 搜索历史 */
.sh-history { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 880px; margin: 0 auto; }
.sh-history-empty { color: var(--text-light); font-size: 14px; padding: 24px 0; }
.sh-history-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-card); border: 1.5px solid var(--border);
    border-radius: 100px; padding: 8px 16px;
    font-size: 13px; color: var(--text-secondary);
    cursor: pointer; transition: var(--transition); font-family: inherit;
}
.sh-history-chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.sh-history-chip .hc-time { font-size: 11px; color: var(--text-light); }

/* 使用说明 */
.sh-note-section { padding-top: 0; }
.sh-note {
    display: flex; align-items: flex-start; gap: 16px;
    background: linear-gradient(135deg, #e8f1ff 0%, #f0f5ff 100%);
    border: 1.5px solid rgba(26, 110, 255, 0.15);
    border-radius: var(--radius); padding: 24px 28px; max-width: 880px; margin: 0 auto;
}
.sh-note-icon {
    width: 44px; height: 44px; background: var(--primary-gradient);
    border-radius: 12px; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.sh-note-icon svg { width: 22px; height: 22px; color: white; }
.sh-note h4 { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.sh-note p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

/* toast 提示 */
.sh-toast {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--text); color: white; font-size: 13px; font-weight: 500;
    padding: 10px 22px; border-radius: 100px; z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.sh-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   响应式（768px 汉堡菜单 / 页脚单列 与官网规则一致）
   ============================================================ */
@media (max-width: 1024px) {
    .sh-engines-grid { grid-template-columns: repeat(3, 1fr); }
    .sh-convert-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0; right: 0;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
        gap: 4px;
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }

    .section { padding: 48px 0; }
    .sh-hero { padding: 116px 0 40px; }
    .sh-sub { font-size: 14px; }
    .sh-searchbox { flex-direction: column; }
    .sh-go { padding: 14px 0; }
    .sh-quickops { flex-direction: column; align-items: stretch; }
    .sh-op-btn { justify-content: center; }
    .sh-convert-tip { margin-left: 0; width: 100%; text-align: center; }

    .sh-engines-grid { grid-template-columns: 1fr; }
    .sh-engine-card { padding: 14px; }

    .ug-row { flex-wrap: wrap; }
    .ug-name { width: 100%; }
    .ug-url { width: 100%; flex: 1 1 100%; }
    .ug-actions { width: 100%; }
    .ug-actions .cv-btn { flex: 1; text-align: center; padding: 8px 0; }

    .sh-note { flex-direction: column; padding: 20px; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
