/* ========== 搜索框样式 ========== */
.search-card{background:white;border-radius:8px;padding:16px 22px;margin-bottom:20px;border:1px solid #e2e8f0;position:relative;}
.engine-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px;border-bottom:1px solid #eef2f6;padding-bottom:12px;}
.engine-tab{display:flex;align-items:center;gap:6px;padding:5px 14px;background:#f8fafc;border-radius:4px;font-size:12px;cursor:pointer;border:1px solid #e2e8f0;}
.engine-tab.active{background:#3b82f6;color:white;}
.engine-tab img{width:14px;height:14px;object-fit:contain;}
.search-form{display:flex;align-items:center;gap:10px;border:1px solid #cbd5e1;border-radius:6px;padding:3px 6px 3px 14px;position:relative;}
.search-form:focus-within{border-color:#3b82f6;}
.engine-selector{display:flex;align-items:center;gap:6px;padding-right:12px;border-right:1px solid #e2e8f0;font-size:13px;}
.engine-selector img{width:18px;height:18px;object-fit:contain;}
.search-input{flex:1;border:none;padding:9px 0;font-size:14px;outline:none;background:transparent;}
.search-btn{background:#3b82f6;border:none;color:white;padding:7px 22px;border-radius:6px;cursor:pointer;}
.search-btn:hover{background:#2563eb;}

/* 搜索联想层 */
.search-suggest-layer {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    z-index: 200;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}
.search-suggest-layer.show { display: block; }
.suggest-hot-section, .suggest-result-section { padding: 12px; }
.suggest-section-title { font-size: 12px; color: #94a3b8; padding: 4px 6px 8px; font-weight: 500; }
.hot-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.hot-tag-item {
    background: #f8fafc;
    border-radius: 40px;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hot-tag-item:hover { background: #3b82f6; color: white; border-color: #3b82f6; }

/* ========== 智能网格（我的收藏/我的喜欢） ========== */
.smart-tabs{display:flex;gap:24px;border-bottom:1px solid #eef2f6;padding-bottom:10px;margin-bottom:16px;align-items:center;}
.smart-tab{font-size:13px;color:#64748b;cursor:pointer;padding-bottom:6px;display:flex;align-items:center;gap:4px;}
.smart-tab.active{color:#3b82f6;border-bottom:2px solid #3b82f6;}
.quick-submit-btn{margin-left:auto;background:#3b82f6;color:white;border:none;padding:4px 12px;border-radius:20px;font-size:12px;cursor:pointer;display:flex;align-items:center;gap:4px;}

.smart-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;}
.smart-item{padding:10px 0;border-bottom:1px solid #f0f2f5;}
.smart-item a{text-decoration:none;color:#334155;font-size:13px;display:block;}
.smart-item a:hover{color:#3b82f6;}
.smart-meta{font-size:11px;color:#94a3b8;margin-top:4px;display:flex;gap:12px;}

/* ========== 夸克导航样式 ========== */
.navigation-container { margin-bottom: 20px; margin-top: 20px;}
.site-nav-container { background: #fff; border-radius: 16px; padding: 20px 24px 24px; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.offical-site-wrapper { display: flex; flex-wrap: wrap; gap: 20px 32px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #eef2f6; }
.offical-site-item span { font-size: 13px; color: #475569; cursor: pointer; transition: color 0.2s; }
.offical-site-item span:hover { color: #3b82f6; }
.popular-site-wrapper { display: grid; grid-template-columns: repeat(9, 1fr); gap: 16px 12px; margin-bottom: 24px; }
.popular-site-item { cursor: pointer; }
.popular-site-item-wrapper { display: flex; align-items: center; gap: 8px; }
.popular-site-item-icon { width: 28px; height: 28px; background-size: cover; background-position: center; border-radius: 8px; flex-shrink: 0; }
.popular-site-item-name { font-size: 12px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav-hr { height: 1px; background: #eef2f6; margin: 20px 0 18px; }
.other-site-wrapper { width: 100%; }
.other-site-row { display: flex; margin-bottom: 16px; align-items: flex-start; }
.other-site-name { width: 48px; flex-shrink: 0; font-size: 12px; font-weight: 500; color: #94a3b8; line-height: 24px; }
.other-site-list { display: grid; grid-template-columns: repeat(10, 1fr); flex: 1; gap: 8px 6px; }
.other-site-item a, .other-site-item span { font-size: 12px; color: #475569; text-decoration: none; white-space: nowrap; display: inline-block; line-height: 24px; transition: color 0.2s; }
.other-site-item a:hover, .other-site-item span:hover { color: #3b82f6; }
.hidden-cat { display: none; }
.toggle-btn { text-align: center; margin-top: 15px; cursor: pointer; color: #3b82f6; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; background: none; border: none; }

/* ========== 分类标签栏 ========== */
.category-tabs{display:flex;gap:24px;border-bottom:1px solid #eef2f6;padding-bottom:8px;margin-bottom:16px;flex-wrap:wrap;}
.category-item{cursor:pointer;padding:4px 0;font-size:13px;color:#475569;}
.category-item.active{color:#3b82f6;border-bottom:2px solid #3b82f6;}

/* ========== 模块链接区域 ========== */
.modules-area{display:flex;flex-direction:column;gap:16px;}
.module-card{border:1px solid #eef2f8;border-radius:8px;background:white;position:relative;}
.module-header{padding:10px 14px;background:#fbfdff;border-bottom:1px solid #eef2f6;font-weight:600;font-size:13px;}
.module-links{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:12px;}
.link-card{border:1px solid #eef2f8;border-radius:8px;transition:all 0.2s;background:white;position:relative;padding:8px 12px;}
.link-card:hover{transform:translateY(-2px);box-shadow:0 8px 16px rgba(0,0,0,0.05);}
.link-left{display:flex;align-items:center;gap:10px;}
.link-left a{display:flex;align-items:center;gap:10px;text-decoration:none;flex:1;}
.site-icon-img{width:32px;height:32px;border-radius:8px;object-fit:contain;background:#f8fafc;flex-shrink:0;}
.mock-icon{width:32px;height:32px;border-radius:8px;background:linear-gradient(145deg,#667eea,#764ba2);display:flex;align-items:center;justify-content:center;color:white;font-weight:600;font-size:14px;flex-shrink:0;}
.link-card h4{font-size:12px;font-weight:500;color:#1e293b;word-break:break-word;}
.new-window-icon {
    position: absolute;
    top: 6px;
    right: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s;
    background: rgba(255,255,255,0.8);
    border-radius: 4px;
}
.new-window-icon:hover{color:#3b82f6;}

/* ========== 首页响应式（仅首页需要） ========== */
@media (max-width: 1024px) {
    .popular-site-wrapper { grid-template-columns: repeat(6, 1fr) !important; }
    .other-site-list { grid-template-columns: repeat(5, 1fr) !important; }
}

@media (max-width: 768px) {
    /* 搜索框手机版 */
    .search-card { padding: 12px; margin-bottom: 16px; }
    .engine-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
    .engine-tab { flex-shrink: 0; padding: 4px 12px; font-size: 11px; }
    .search-form { gap: 6px; padding: 2px 8px 2px 12px; }
    .engine-selector { font-size: 12px; padding-right: 8px; }
    .engine-selector img { width: 14px; height: 14px; }
    .search-input { font-size: 13px; padding: 8px 0; }
    .search-btn { padding: 6px 14px; font-size: 12px; flex-shrink: 0; }
    
    /* 智能网格手机版 */
    .smart-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        justify-content: flex-start;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }
    .smart-tab {
        font-size: 13px;
        padding-bottom: 4px;
        white-space: nowrap;
    }
    .quick-submit-btn {
        margin-left: auto;
        padding: 5px 12px;
        font-size: 11px;
        border-radius: 20px;
        white-space: nowrap;
    }
    .smart-grid { grid-template-columns: 1fr; gap: 6px; }
    .smart-item {
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    .smart-item a { font-size: 13px; flex: 1; word-break: break-word; }
    .smart-meta { font-size: 10px; gap: 10px; margin-top: 4px; width: 100%; }
    
    /* 夸克导航手机版 */
    .navigation-container { margin-top: 0; margin-bottom: 16px; }
    .site-nav-container { padding: 12px; border-radius: 12px; }
    .offical-site-wrapper { gap: 10px 16px; padding-bottom: 10px; margin-bottom: 10px; }
    .offical-site-item span { font-size: 11px; }
    .popular-site-wrapper { grid-template-columns: repeat(4, 1fr) !important; gap: 12px 8px; margin-bottom: 16px; }
    .popular-site-item-wrapper { flex-direction: column; align-items: center; gap: 4px; }
    .popular-site-item-icon { width: 32px; height: 32px; }
    .popular-site-item-name { font-size: 10px; white-space: normal; text-align: center; max-width: 70px; }
    .site-nav-hr { margin: 12px 0; }
    
    /* 网址分类手机版 */
    .other-site-row { flex-direction: column; margin-bottom: 14px; }
    .other-site-name { width: 100%; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #475569; }
    .other-site-list { grid-template-columns: repeat(3, 1fr) !important; gap: 8px 12px; width: 100%; }
    .other-site-item a, .other-site-item span { font-size: 12px; white-space: normal; line-height: 1.4; display: block; padding: 4px 0; }
    
    /* 模块链接手机版 */
    .module-links { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; padding: 10px; }
    .link-card { padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; }
    .link-left { gap: 8px; flex: 1; min-width: 0; }
    .link-left a { flex: 1; min-width: 0; }
    .site-icon-img, .mock-icon { width: 28px; height: 28px; flex-shrink: 0; }
    .link-card h4 { font-size: 11px; word-break: break-word; white-space: normal; line-height: 1.3; }
    .new-window-icon { position: static; flex-shrink: 0; margin-left: 6px; }
    
    /* 分类标签手机版 */
    .category-tabs {
        gap: 16px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    .category-item {
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .smart-tabs { gap: 8px; }
    .smart-tab { font-size: 12px; }
    .quick-submit-btn { padding: 4px 10px; font-size: 10px; }
    .smart-item a { font-size: 12px; }
    
    .popular-site-wrapper { grid-template-columns: repeat(3, 1fr) !important; }
    .popular-site-item-icon { width: 28px; height: 28px; }
    .popular-site-item-name { font-size: 9px; max-width: 60px; }
    
    .other-site-list { grid-template-columns: repeat(2, 1fr) !important; gap: 6px 10px; }
    .other-site-name { font-size: 12px; }
    .other-site-item a { font-size: 11px; }
    
    .module-links { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .link-card h4 { font-size: 10px; }
    .site-icon-img, .mock-icon { width: 24px; height: 24px; }
    
    .search-btn { padding: 5px 12px; font-size: 11px; }
}

@media (max-width: 380px) {
    .smart-tabs { flex-wrap: wrap; row-gap: 8px; }
    .quick-submit-btn { margin-left: 0; order: 3; width: 100%; text-align: center; justify-content: center; margin-top: 4px; }
    .other-site-list { grid-template-columns: repeat(2, 1fr) !important; }
}
/* 精选站点去掉下划线 */
.popular-site-item {
    text-decoration: none !important;
}

.popular-site-item-wrapper {
    text-decoration: none !important;
}

.popular-site-item-name {
    text-decoration: none !important;
}

/* 确保所有精选站点链接都没有下划线 */
.popular-site-wrapper a,
.popular-site-wrapper a:hover,
.popular-site-wrapper a:focus,
.popular-site-wrapper a:active {
    text-decoration: none !important;
    outline: none;
}