/**
 * 星核搜索引擎 - 默认皮肤样式（仿百度）
 * Xhsearch Search Engine - Default Skin
 */

/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; background: #fff; color: #333; font-size: 14px; line-height: 1.6; }
a { color: #333; text-decoration: none; }
a:hover { color: #333; text-decoration: underline; }
img { max-width: 100%; }

/* ================================================================
   首页
   ================================================================ */
.bd-home { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }

.bd-home-header {
    text-align: right;
    padding: 15px 30px;
}
.bd-home-header a {
    color: #333;
    font-size: 13px;
    margin-left: 20px;
}
.bd-home-header a:hover { color: #4e6ef2; text-decoration: none; }

.bd-home-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 40px;
}

.bd-home-logo {
    font-size: 56px;
    font-weight: 700;
    color: #4e6ef2;
    letter-spacing: 2px;
    margin-bottom: 8px;
    user-select: none;
}

.bd-home-title {
    font-size: 16px;
    color: #999;
    margin-bottom: 40px;
}

.bd-home-form { width: 100%; max-width: 640px; }

.bd-home-search-box {
    display: flex;
    border: 2px solid #c4c7ce;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.bd-home-search-box:focus-within {
    border-color: #4e6ef2;
    box-shadow: 0 2px 10px rgba(78,110,242,0.15);
}

.bd-home-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.bd-home-btn {
    padding: 12px 32px;
    background: #4e6ef2;
    color: #fff;
    border: none;
    font-size: 16px;
    cursor: pointer;
    letter-spacing: 2px;
    transition: background 0.2s;
}
.bd-home-btn:hover { background: #3b5bdb; }

.bd-home-hot {
    margin-top: 20px;
    max-width: 640px;
    text-align: left;
}
.bd-home-hot-label { color: #9195a3; font-size: 13px; margin-right: 8px; }
.bd-home-hot a {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px 4px 4px 0;
    font-size: 13px;
    color: #333;
    background: #f5f6f8;
    border-radius: 16px;
    transition: all 0.2s;
}
.bd-home-hot a:hover { background: #4e6ef2; color: #fff; text-decoration: none; }

.bd-home-shortcuts {
    display: flex;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap;
    justify-content: center;
}
.bd-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 80px;
    padding: 16px 8px;
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
}
.bd-shortcut:hover { background: #f5f6f8; text-decoration: none; transform: translateY(-2px); }
.bd-shortcut-icon { font-size: 28px; }
.bd-shortcut span:last-child { font-size: 12px; color: #666; }

.bd-home-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}
.bd-home-footer-links a { color: #999; font-size: 12px; margin: 0 12px; }
.bd-home-footer-links a:hover { color: #4e6ef2; }
.bd-home-footer-copy { color: #bbb; font-size: 12px; margin-top: 8px; }

/* ================================================================
   搜索结果页
   ================================================================ */
.bd-page { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }

/* -- 顶部搜索栏 -- */
.bd-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
}
.bd-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.bd-logo {
    font-size: 26px;
    font-weight: 700;
    color: #4e6ef2;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 1px;
    flex-shrink: 0;
}
.bd-logo:hover { text-decoration: none; color: #3b5bdb; }

.bd-search-form { flex: 1; max-width: 640px; }

.bd-search-box {
    display: flex;
    border: 2px solid #c4c7ce;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.bd-search-box:focus-within {
    border-color: #4e6ef2;
    box-shadow: 0 2px 10px rgba(78,110,242,0.15);
}

.bd-search-input {
    flex: 1;
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.bd-search-btn {
    padding: 8px 24px;
    background: #4e6ef2;
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.bd-search-btn:hover { background: #3b5bdb; }

.bd-header-links { flex-shrink: 0; display: flex; gap: 16px; }
.bd-header-links a { color: #666; font-size: 13px; white-space: nowrap; }
.bd-header-links a:hover { color: #4e6ef2; text-decoration: none; }

/* -- Tab 导航 -- */
.bd-tabs {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.bd-tabs-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 0;
}
.bd-tabs a {
    display: inline-block;
    padding: 10px 18px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.bd-tabs a:hover { color: #333; text-decoration: none; }
.bd-tabs a.active { color: #4e6ef2; border-bottom-color: #4e6ef2; font-weight: 500; }

/* -- 主体布局 -- */
.bd-body {
    flex: 1;
    padding: 20px 0 40px;
}
.bd-body-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.bd-main { flex: 1; min-width: 0; }
.bd-sidebar { width: 300px; flex-shrink: 0; position: sticky; top: 110px; }

/* -- 搜索信息条 -- */
.bd-search-info {
    padding: 12px 0 8px;
    color: #9195a3;
    font-size: 13px;
}
.bd-search-info strong { color: #333; }

/* -- 分类筛选 -- */
.bd-cat-filter {
    padding: 8px 0 12px;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 4px;
}
.bd-cat-filter a {
    display: inline-block;
    padding: 4px 14px;
    margin: 2px 4px 2px 0;
    font-size: 13px;
    color: #666;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s;
}
.bd-cat-filter a:hover { background: #f5f6f8; color: #333; text-decoration: none; }
.bd-cat-filter a.active { background: #4e6ef2; color: #fff; }

/* -- 搜索结果项 -- */
.bd-result {
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}
.bd-result:last-of-type { border-bottom: none; }

.bd-result-source {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 13px;
}
.bd-result-url { color: #626675; }
.bd-result-date { color: #9195a3; font-size: 12px; }

.bd-cert-icon {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.bd-cert-icon:hover { text-decoration: none; }
.bd-cert-text {
    display: inline-block;
    padding: 0 6px;
    background: #f0f3ff;
    color: #4e6ef2;
    font-size: 11px;
    border-radius: 3px;
    font-weight: 500;
}

.bd-result-title {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 4px;
}
.bd-result-title a { color: #222; text-decoration: none; }
.bd-result-title a:hover { color: #4e6ef2; text-decoration: underline; }
.bd-result-title a em, .bd-result-desc em {
    color: #c42d1c;
    font-style: normal;
    text-decoration: none;
}

.bd-result-desc {
    color: #555;
    font-size: 13px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* -- 广告结果 -- */
.bd-result-ad {
    background: #fafafa;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 8px 0;
    border: 1px solid #f0f0f0;
}
.bd-ad-tag {
    display: inline-block;
    padding: 0 5px;
    background: #ff6e26;
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
    line-height: 18px;
}

/* -- 无结果 -- */
.bd-no-result {
    text-align: center;
    padding: 60px 20px;
}
.bd-no-result-icon { font-size: 48px; margin-bottom: 16px; }
.bd-no-result p { color: #666; margin-bottom: 16px; }
.bd-no-result-tips { font-size: 13px; color: #999; }
.bd-no-result-tips a { color: #4e6ef2; margin: 0 10px; }

/* -- 分页 -- */
.bd-pagination {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.bd-pagination a {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    padding: 0 10px;
    font-size: 14px;
    color: #333;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
}
.bd-pagination a:hover { background: #f5f6f8; text-decoration: none; }
.bd-pagination a.active {
    background: #4e6ef2;
    color: #fff;
    font-weight: 500;
}
.bd-page-prev, .bd-page-next { font-size: 13px; color: #4e6ef2; }
.bd-page-prev:hover, .bd-page-next:hover { color: #3b5bdb; }

/* -- 相关搜索 -- */
.bd-related {
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
}
.bd-related-title { font-size: 14px; font-weight: 500; color: #333; margin-bottom: 12px; }
.bd-related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-related-list a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    color: #333;
    background: #f5f6f8;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}
.bd-related-list a:hover { background: #4e6ef2; color: #fff; text-decoration: none; }

/* ================================================================
   右侧边栏
   ================================================================ */
.bd-sidebar-section {
    margin-bottom: 20px;
    background: #fff;
}

.bd-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.bd-hot-icon { font-size: 16px; }

/* -- 广告卡片 -- */
.bd-sidebar-ad { border: 1px solid #f0f0f0; border-radius: 8px; padding: 12px; }
.bd-ad-card {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    transition: background 0.15s;
}
.bd-ad-card:last-child { border-bottom: none; padding-bottom: 0; }
.bd-ad-card:first-child { padding-top: 0; }
.bd-ad-card:hover { text-decoration: none; }
.bd-ad-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}
.bd-ad-title { font-size: 13px; color: #333; font-weight: 500; }
.bd-ad-desc { font-size: 12px; color: #999; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* -- 热搜榜 -- */
.bd-hot-list { list-style: none; }
.bd-hot-list li {
    display: flex;
    align-items: center;
    padding: 7px 0;
    gap: 10px;
}
.bd-hot-rank {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9195a3;
    flex-shrink: 0;
}
.bd-hot-top { color: #fff; font-weight: 700; }
.bd-hot-list li:nth-child(1) .bd-hot-top { background: #f73131; border-radius: 4px 0 4px 0; }
.bd-hot-list li:nth-child(2) .bd-hot-top { background: #ff6e26; border-radius: 4px 0 4px 0; }
.bd-hot-list li:nth-child(3) .bd-hot-top { background: #ffb102; border-radius: 4px 0 4px 0; }

.bd-hot-list a {
    flex: 1;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bd-hot-list a:hover { color: #4e6ef2; text-decoration: none; }

.bd-hot-badge {
    display: inline-block;
    padding: 0 4px;
    font-size: 10px;
    border-radius: 2px;
    line-height: 16px;
    font-weight: 500;
    flex-shrink: 0;
}
.bd-hot-new { background: #ff4e4e; color: #fff; }
.bd-hot-fire { background: #ff6e26; color: #fff; }

/* -- 快捷入口 -- */
.bd-quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.bd-quick-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: all 0.15s;
}
.bd-quick-item:hover { background: #f5f6f8; text-decoration: none; }
.bd-quick-icon { font-size: 18px; }

/* ================================================================
   底部
   ================================================================ */
.bd-footer {
    background: #f5f6f8;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
}
.bd-footer-links { margin-bottom: 8px; }
.bd-footer-links a { color: #666; font-size: 12px; margin: 0 12px; }
.bd-footer-links a:hover { color: #4e6ef2; }
.bd-footer-copyright { color: #bbb; font-size: 12px; }

/* ================================================================
   搜索建议框
   ================================================================ */
.suggest-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    z-index: 1000;
    display: none;
}
.suggest-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.1s;
}
.suggest-item:hover,
.suggest-item.active {
    background: #f5f6f8;
}

/* ================================================================
   响应式
   ================================================================ */
@media (max-width: 1024px) {
    .bd-sidebar { width: 260px; }
}
@media (max-width: 768px) {
    .bd-header-inner { gap: 12px; padding: 12px 16px; }
    .bd-logo { font-size: 20px; }
    .bd-header-links { display: none; }
    .bd-tabs-inner { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .bd-tabs a { white-space: nowrap; padding: 10px 12px; font-size: 13px; }
    .bd-body-inner { flex-direction: column; }
    .bd-sidebar { width: 100%; position: static; }
    .bd-home-logo { font-size: 36px; }
    .bd-home-shortcuts { gap: 12px; }
    .bd-shortcut { width: 64px; padding: 12px 4px; }
    .bd-shortcut-icon { font-size: 22px; }
}
