/* 网址导航 - 融合优化版 v9 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
}
body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    line-height: 1.5;
    padding-bottom: 60px;
}
a { color: #333; text-decoration: none; }
a:hover { color: #2319dc; }
ul, li { list-style: none; }

.wrap { width: 1200px; margin: 0 auto; }

/* ============ 顶部栏 ============ */
.topbar {
    height: 36px;
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    font-size: 12px;
    line-height: 36px;
    overflow: hidden;
}
.topbar .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
    padding: 0 15px;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
    overflow: hidden;
    height: 36px;
}
.topbar-left .date { color: #666; }
.topbar-left .lunar { color: #999; }
.topbar-left .city {
    cursor: pointer;
    color: #2319dc;
    position: relative;
}
.topbar-left .city::after {
    content: '▼';
    font-size: 9px;
    margin-left: 3px;
    color: #999;
}
#topWeather { color: #555; font-size: 12px; }
.topbar-right {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}
.topbar-right a {
    color: #666;
    font-size: 12px;
}
.topbar-right a:hover { color: #2319dc; }

/* ============ 头部搜索区 ============ */
.header {
    padding: 8px 0;
    background: linear-gradient(to bottom, #fff 0%, #fafafa 100%);
}
.header-main {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
}
.header-logo {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    position: relative;
    top: -5px;
    min-height: 50px;
}
/* 新版：图标 + 文字 并排（不再只显示其中一个） */
.header-logo-with-icon {
    gap: 12px;
}
.header-logo-with-icon .header-logo-img {
    display: block;
    flex-shrink: 0;
    /* 与「网上导航」四个字精确对齐：相对原图上移 15 后再下移 6=总共上移 9；左移 5 后再右移 4=总共左移 1 */
    position: relative;
    top: -9px;
    left: -1px;
}
.header-logo-with-icon .header-logo-text {
    display: flex !important;
    align-items: center;
    margin-top: -11px;
    min-width: 0;
}
.header-logo-img {
    display: block;
    /* 图片 logo 调小一号：52 -> 44 */
    max-height: 44px;
    height: 44px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
}
.header-logo-text {
    display: flex;
    align-items: center;
    margin-top: -35px;
}
.header-logo h1 {
    /* 字体 logo 调小一号：40 -> 34 */
    font-size: 34px;
    font-weight: bold;
    line-height: 44px;
    letter-spacing: -1px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}
.header-logo h1 .red { color: #e74c3c; }
.header-logo h1 .blue { color: #2319dc; }

.header-search-wrap {
    flex: 0 0 auto;
    width: 700px;
    min-width: 0;
}

.search-box-wrap {
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible;
}

/* 热榜按钮 */
.hotrank-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 14px;
    height: 36px;
    margin: 0 8px 0 0;
    background: linear-gradient(135deg, #ff4d4f 0%, #ff7a45 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 10;
    transition: background .2s;
    border-radius: 18px;
}
.hotrank-btn:hover { background: linear-gradient(135deg, #ff7a45 0%, #ff4d4f 100%); }
.hotrank-btn-icon { font-size: 13px; }
.hotrank-btn-text { font-size: 13px; white-space: nowrap; }

body.gray-mode, body.gray-mode * { filter: grayscale(1); }

/* 邮箱/查询 下拉按钮 - 头部空白区 */
.search-extra-btns { display: flex; gap: 0; align-items: center; margin-left: auto; padding-left: 20px; flex-shrink: 0; }
.extra-dropdown { position: relative; }
.extra-dropdown-btn {
    display: inline-flex; align-items: center; gap: 3px;
    height: 30px; padding: 0 12px;
    background: none; border: none;
    cursor: pointer; font-size: 14px; color: #333; white-space: nowrap;
    text-decoration: none;
}
.extra-dropdown-btn:hover { color: #2319dc; }
.extra-dropdown-list {
    display: none; position: fixed;
    background: #fff; border: 1px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 99999; min-width: 130px;
}
.extra-dropdown:hover .extra-dropdown-list { display: block; }
.extra-dropdown-list a {
    display: block; padding: 9px 20px; font-size: 13px; color: #333;
    text-decoration: none;
}
.extra-dropdown-list a:hover { background: #f0f3ff; color: #2319dc; }

/* 热榜下拉 */
.hotrank-dropdown {
    display: none;
    position: fixed;
    background: #fff;
    border: 2px solid #2319dc;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    z-index: 99999;
    overflow: hidden;
}
.hotrank-dropdown.show { display: block; }
.hotrank-dropdown-header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.hotrank-dropdown-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.hotrank-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: background .15s;
    border-bottom: 1px solid #f8f8f8;
}
.hotrank-dropdown-item:hover { background: #f5f7ff; color: #2319dc; }
.hotrank-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hotrank-dropdown-item:nth-child(n+4) .hotrank-num { background: #ff9c6e; }
.hotrank-dropdown-item:nth-child(n+8) .hotrank-num { background: #bbb; }
.hotrank-kw {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-box {
    display: inline-flex;
    align-items: center;
    border: 2px solid #2319dc;
    border-radius: 30px;
    height: 52px;
    flex: 1;
    background: #fff;
    box-shadow: 0 4px 18px rgba(35,25,220,.08);
    position: relative;
}
.search-engine {
    position: relative;
    background: #f5f7ff;
    border-right: 1px solid #e0e4ef;
    padding: 0 40px 0 20px;
    height: 48px;
    cursor: pointer;
    font-size: 15px;
    color: #2319dc;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-radius: 28px 0 0 28px;
}
.search-engine::after {
    content: '▼';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #999;
}
.search-engine-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    z-index: 9999;
    min-width: 130px;
    overflow: visible;
}
.search-engine-dropdown.show { display: block; }
.search-engine-dropdown div {
    padding: 12px 18px;
    font-size: 14px;
    cursor: pointer;
}
.search-engine-dropdown div:hover { background: #f0f4ff; color: #2319dc; }
.search-input-area {
    flex: 1;
    position: relative;
    min-width: 0;
    height: 48px;
}
.search-input {
    width: 100%;
    border: none;
    padding: 0 17px;
    height: 48px;
    font-size: 16px;
    outline: none;
    color: #222;
    min-width: 0;
}
.search-input::placeholder {
    color: #aaa;
    font-size: 16px;
}

/* 搜索框占位符滚动特效 */
.search-scroll-wrap {
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    right: 22px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    display: none;
}
.search-scroll-inner {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.search-scroll-inner .scroll-item {
    height: 48px;
    line-height: 48px;
    font-size: 16px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 搜索按钮 */
.search-btn {
    background: #2319dc;
    color: #fff;
    border: none;
    padding: 0 40px;
    height: 48px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
    border-radius: 0 28px 28px 0;
    letter-spacing: 1px;
    transition: background .15s;
    flex-shrink: 0;
}
.search-btn:hover { background: #1a10b0; }

/* 搜索历史下拉 */
.search-history-dropdown,
.search-suggest-dropdown {
    display: none;
    position: fixed;
    z-index: 99999;
    background: #fff;
    border: 2px solid #2319dc;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    max-height: 380px;
    overflow-y: auto;
}
.search-history-dropdown.show,
.search-suggest-dropdown.show { display: block; }
.search-history-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid #f8f8f8;
}
.search-history-item:hover { background: #f5f7ff; color: #2319dc; }
.search-history-item .history-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    flex-shrink: 0;
    color: #999;
    font-size: 14px;
    text-align: center;
    line-height: 16px;
}
.search-history-item .history-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-history-item .history-del {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    flex-shrink: 0;
    text-align: center;
    line-height: 20px;
    color: #bbb;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: color .15s, background .15s;
}
.search-history-item .history-del:hover { color: #ff4d4f; background: #fff0f0; }
.search-history-footer {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding: 8px 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
}
.search-history-close,
.search-history-clear {
    color: #999;
    cursor: pointer;
    transition: color .15s;
}
.search-history-close:hover,
.search-history-clear:hover { color: #2319dc; }

/* 搜索联想词下拉 */
.search-suggest-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid #f8f8f8;
}
.search-suggest-item:hover { background: #f5f7ff; color: #2319dc; }
.search-suggest-item .suggest-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    flex-shrink: 0;
    color: #999;
    font-size: 13px;
    text-align: center;
    line-height: 16px;
}
.search-suggest-item .suggest-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 搜索框下方热搜词 */
.hot-keywords-below {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    margin-left: 20px;
    font-size: 13px;
    line-height: 1.6;
}
.hot-keyword-item {
    color: #555;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
}
.hot-keyword-item:hover { color: #2319dc; text-decoration: underline; }

/* ============ 快捷链接行 ============ */
.quick-links-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}
.quick-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}
.quick-link-item {
    color: #555;
    padding: 2px 4px;
    transition: color 0.2s;
    white-space: nowrap;
}
.quick-link-item:hover {
    color: #2319dc;
    text-decoration: underline;
}
.quick-link-sep {
    color: #ddd;
    margin: 0 2px;
}

/* ============ 常用网站（大图标区） ============ */
.hot-sites-section {
    padding: 10px 0 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
.hot-sites-card {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fff;
    padding: 12px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.hot-sites {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 8px;
}
.hot-site-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
    gap: 10px;
    min-width: 0;
}
.hot-site-item:hover {
    background: #f5f7fa;
}
.hot-site-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    overflow: hidden;
    flex-shrink: 0;
}
.hot-site-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hot-site-icon.hs1 { background: linear-gradient(135deg, #ff0000 0%, #e60000 100%); }
.hot-site-icon.hs2 { background: linear-gradient(135deg, #4e6ef2 0%, #2319dc 100%); }
.hot-site-icon.hs3 { background: linear-gradient(135deg, #ff6600 0%, #ee5a00 100%); }
.hot-site-icon.hs4 { background: linear-gradient(135deg, #00a1d6 0%, #008dbd 100%); }
.hot-site-icon.hs5 { background: linear-gradient(135deg, #5f27cd 0%, #4c1fb3 100%); }
.hot-site-icon.hs6 { background: linear-gradient(135deg, #009688 0%, #00796b 100%); }
.hot-site-icon.hs7 { background: linear-gradient(135deg, #ff4081 0%, #e91e63 100%); }
.hot-site-icon.hs8 { background: linear-gradient(135deg, #00bcd4 0%, #00a5bb 100%); }
.hot-site-name {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}
.hot-site-item:hover .hot-site-name {
    color: #2319dc;
}

/* ============ 精选网站区 ============ */
.featured-section {
    padding: 0 0 10px;
    background: #fff;
}
.featured-card {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fff;
    padding: 10px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.featured-list {
    display: flex;
    flex-wrap: wrap;
    /* 宽度完全自适应，根据内容撑尺寸，一行排不下自动换行 */
    gap: 6px 8px;
}
.featured-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.15s;
    gap: 8px;
    /* 完全不限制字数，宽度自适应内容（短的短，长的撑宽），最宽不超过一行50%防止超长霸屏 */
    width: auto;
    min-width: 0;
    max-width: calc(50% - 8px);
    box-sizing: border-box;
}
.featured-item:hover {
    background: #f0f2f5;
}
/* 让包一层 div.featured-item 的链接不显示下划线和默认颜色 */
.featured-item a { text-decoration: none; color: inherit; }
.featured-icon-link { display: inline-flex; flex-shrink: 0; }
.featured-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
    overflow: hidden;
    flex-shrink: 0;
}
.featured-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.featured-icon.f1  { background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%); }
.featured-icon.f2  { background: linear-gradient(135deg, #4e6ef2 0%, #2319dc 100%); }
.featured-icon.f3  { background: linear-gradient(135deg, #ff6600 0%, #ee5a00 100%); }
.featured-icon.f4  { background: linear-gradient(135deg, #00a1d6 0%, #008dbd 100%); }
.featured-icon.f5  { background: linear-gradient(135deg, #5f27cd 0%, #4c1fb3 100%); }
.featured-icon.f6  { background: linear-gradient(135deg, #009688 0%, #00796b 100%); }
.featured-icon.f7  { background: linear-gradient(135deg, #ff4081 0%, #e91e63 100%); }
.featured-icon.f8  { background: linear-gradient(135deg, #00bcd4 0%, #00a5bb 100%); }
.featured-icon.f9  { background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%); }
.featured-icon.f10 { background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%); }

.featured-text {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    /* 允许换行，完整显示所有字数，不省略 */
    white-space: normal;
    flex-wrap: wrap;
    gap: 2px;
    line-height: 1.35;
}
/* 主名：完整显示，绝不截断 */
.featured-name {
    font-size: 14px;
    color: #333;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    flex-shrink: 0;
    min-width: 0;
    font-weight: 500;
}
/* 中间的点：放大，和主名字号对齐 */
.featured-dot {
    font-size: 15px;
    line-height: 1;
    color: #777;
    margin-top: -1px;
    padding: 0 1px;
    flex-shrink: 0;
}
/* 附加词：灰色，完整显示，不截断 */
.featured-label {
    font-size: 13px;
    color: #666;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    flex-shrink: 0;
    min-width: 0;
    max-width: none;
}
.featured-label:hover { color: #2319dc; }
.featured-name:hover { color: #2319dc; }

/* ============ 导航标签栏 ============ */
.nav-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 6px 0;
}
.nav-bar-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.nav-tabs {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.nav-tabs li a {
    display: block;
    padding: 6px 18px;
    font-size: 14px;
    color: #555;
    border-radius: 4px;
    transition: all 0.2s;
}
.nav-tabs li a:hover {
    color: #2319dc;
    background: #f0f4ff;
}
.nav-tabs li a.active {
    color: #fff;
    background: #2319dc;
}
.nav-sidebar {
    width: 320px;
    flex-shrink: 0;
    padding-top: 6px;
}
.nav-sidebar .baidu-hotrank-header {
    margin-bottom: 0;
    padding-bottom: 6px;
    border-bottom: 1px dashed #ffd3b4;
}

/* ============ 主内容区 ============ */
.main { padding: 0; overflow: visible; }
.main .wrap { display: block; overflow: visible; }
.content { width: 100%; padding-top: 15px; padding-bottom: 0; display: flex; gap: 20px; align-items: flex-start; margin-bottom: 0; overflow: visible; }
.content-main { flex: 1; min-width: 0; }
.content-sidebar { width: 320px; flex-shrink: 0; position: sticky; top: 15px; align-self: flex-start; z-index: 10; }
.content-sidebar .baidu-hotrank-wrap { margin-top: 0; }

/* ============ 视频分类导航 ============ */
.video-nav-section {
    background: #fff;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}
.video-nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.video-nav-tab {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 14px;
    color: #555;
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.video-nav-tab:hover {
    color: #2319dc;
    background: #eef0ff;
    text-decoration: none;
}
.video-nav-tab.active {
    color: #fff;
    background: #ff6a00;
    font-weight: 500;
}
.video-nav-tab.active:hover {
    background: #e65c00;
}
.video-nav-tab-static {
    cursor: default;
}
.video-nav-tab-static:hover {
    color: #555;
    background: #f5f5f5;
}

/* 二级分类标签 */
.video-sub-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}
.video-sub-tab {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    font-size: 13px;
    color: #666;
    background: #f0f2f5;
    border-radius: 16px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.video-sub-tab:hover {
    color: #ff6a00;
    background: #fff3e0;
    text-decoration: none;
}
.video-sub-tab.active {
    color: #fff;
    background: #ff6a00;
    font-weight: 500;
}
.video-sub-tab.active:hover {
    background: #e65c00;
}

/* ============ 视频列表 ============ */
.video-list-section {
    padding: 0 0 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    overflow: hidden;
}
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}
.video-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f5f5f5;
    border-right: 1px solid #f5f5f5;
    transition: background .15s;
    overflow: hidden;
}
.video-card-item:nth-child(2n) { border-right: none; }
.video-card-item:last-child, .video-card-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.video-card-item:hover { background: #f9f9ff; text-decoration: none; }
.video-card-cover {
    flex: 0 0 120px;
    width: 120px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}
.video-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ccc;
    background: #f0f0f0;
}
.video-card-info {
    flex: 1;
    min-width: 0;
}
.video-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #1f2329;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}
.video-card-item:hover .video-card-title { color: #2319dc; }
.video-card-desc {
    font-size: 12px;
    color: #919499;
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    flex-wrap: wrap;
}
.video-badge-featured {
    color: #ff6a00;
    padding: 1px 6px;
    border: 1px solid #ff6a00;
    border-radius: 3px;
    font-weight: 500;
}
.video-badge-cat {
    color: #3370ff;
    padding: 1px 6px;
    border: 1px solid #3370ff;
    border-radius: 3px;
}
.video-badge-tag {
    color: #909399;
    padding: 1px 6px;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
}

/* ============ 网站分组 ============ */
.group {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}
.group:first-child { margin-top: 0; }
.group-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}
.group-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.group-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #2319dc;
    border-radius: 2px;
}
.group-more {
    font-size: 12px;
    color: #999;
}
.group-more:hover { color: #2319dc; }

.sites-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0;
    padding: 8px;
}
/* 只显示前3行（30个），超过的部分包在 .site-extra-wrap 内，默认折叠；滑动展开/收回 */
.site-extra-wrap {
    display: none;
    overflow: hidden;
}

.sites-more {
    text-align: center;
    padding: 12px 0 18px;
}
.btn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 28px;
    background: #f5f7fa;
    color: #555;
    border: 1px solid #e4e7ed;
    border-radius: 18px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-more:hover {
    background: #2319dc;
    color: #fff;
    border-color: #2319dc;
}
.btn-more .more-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    display: inline-block;
}

.site-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
}
.site-item:hover { background: #f0f4ff; transform: translateY(-2px); }
.site-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    overflow: hidden;
}
.site-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.site-icon-img {
    background: none;
    box-shadow: none;
}
.site-icon.c1 { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%); }
.site-icon.c2 { background: linear-gradient(135deg, #4ecdc4 0%, #45b7aa 100%); }
.site-icon.c3 { background: linear-gradient(135deg, #45b7d1 0%, #3da5bf 100%); }
.site-icon.c4 { background: linear-gradient(135deg, #f9ca24 0%, #e8b91d 100%); }
.site-icon.c5 { background: linear-gradient(135deg, #a29bfe 0%, #8c82fc 100%); }
.site-icon.c6 { background: linear-gradient(135deg, #fd79a8 0%, #e66b94 100%); }
.site-icon.c7 { background: linear-gradient(135deg, #00b894 0%, #00a383 100%); }
.site-icon.c8 { background: linear-gradient(135deg, #e17055 0%, #d35f4a 100%); }
.site-name {
    font-size: 12px;
    color: #333;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.site-item:hover .site-name { color: #2319dc; }

/* ============ 右侧边栏 ============ */
.side-card {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}
.side-card:first-child {
    margin-top: 0;
}
.side-header {
    background: #f8f9fa;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #eee;
}
.side-body { padding: 12px; }

/* 天气卡片 */
.weather-card {
    text-align: center;
    padding: 15px;
}
.weather-card .city-name {
    font-size: 16px;
    color: #333;
    font-weight: bold;
    margin-bottom: 8px;
}
.weather-card .temp-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin: 10px 0;
}
.weather-card .temp-item {
    text-align: center;
}
.weather-card .temp-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 3px;
}
.weather-card .temp-value {
    font-size: 24px;
    color: #2319dc;
    font-weight: bold;
}
.weather-card .temp-weather {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

/* 新闻列表 - 旧简单样式（保留兼容其他页面） */
.news-list { }
.news-item {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
    line-height: 1.4;
}
.news-item:last-child { border-bottom: none; }
.news-item .rank {
    width: 18px;
    height: 18px;
    background: #ddd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    flex-shrink: 0;
    margin-right: 10px;
    border-radius: 3px;
}
.news-item:nth-child(1) .rank { background: #ff4d4f; }
.news-item:nth-child(2) .rank { background: #ff7a45; }
.news-item:nth-child(3) .rank { background: #ffa940; }
.news-item .title {
    flex: 1;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.news-item:hover .title { color: #2319dc; }

/* 热点新闻榜 - 图三样式：红点 + 左图 + 右标题/摘要/来源/时间 */
.hot-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.hot-news-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f2f2f2;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}
.hot-news-item:last-child { border-bottom: none; }
.hot-news-item:hover { background: #fafbff; }
.hot-rank {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(255,77,79,.2);
}
/* 前三名红橙黄渐变 */
.hot-rank.hot { background: linear-gradient(135deg,#ff4d4f 0%,#ff7a45 100%); }
.hot-news-item:nth-child(2) .hot-rank.hot { background: linear-gradient(135deg,#ff7a45 0%,#ffa940 100%); }
.hot-news-item:nth-child(3) .hot-rank.hot { background: linear-gradient(135deg,#ffa940 0%,#ffc53d 100%); }
/* 第 4+：橙黄色渐变，继续往下区分 */
.hot-news-item:nth-child(n+4) .hot-rank { background: linear-gradient(135deg,#ff9c6e 0%,#ffc069 100%); box-shadow: 0 1px 2px rgba(255,156,110,.15); }

.hot-news-img {
    flex-shrink: 0;
    width: 96px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}
.hot-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hot-news-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hot-news-title {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}
.hot-news-item:hover .hot-news-title { color: #2319dc; }
.hot-news-desc {
    font-size: 12px;
    color: #8c8c8c;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}
.hot-news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: #bfbfbf;
    margin-top: 2px;
}
.hot-news-source {
    color: #8c8c8c;
}
.hot-news-time {
    color: #bfbfbf;
}

/* 快捷工具 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border-radius: 6px;
    transition: background 0.2s;
    cursor: pointer;
}
.tool-item:hover { background: #f0f4ff; }
.tool-icon {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 6px;
    margin-bottom: 4px;
}
.tool-name {
    font-size: 11px;
    color: #666;
}

/* ============ 底部 ============ */
.footer {
    background: #f8f9fa;
    padding: 12px 0;
    border-top: 1px solid #eee;
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 999;
}
.footer-info {
    text-align: center;
    color: #999;
    font-size: 12px;
    line-height: 1.6;
}
.sidebar-footer-links {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    gap: 16px;
}
.sidebar-footer-links a {
    color: #999;
    font-size: 12px;
    text-decoration: none;
    transition: color .2s;
}
.sidebar-footer-links a:hover { color: #2319dc; }
.sidebar-back-top {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    color: #666;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    cursor: pointer;
    position: fixed;
    right: 600px;
    bottom: 70px;
    z-index: 998;
    transition: all .3s;
}
.sidebar-back-top.show {
    display: flex;
}
.sidebar-back-top:hover { color: #2319dc; border-color: #2319dc; text-decoration: none; box-shadow: 0 4px 12px rgba(35,25,220,.15); }
.sidebar-back-top span:first-child { font-size: 14px; line-height: 1; margin-bottom: 2px; }

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
    .wrap { width: 100%; padding: 0 15px; }
    .sites-grid { grid-template-columns: repeat(8, 1fr); }
    .hot-sites { grid-template-columns: repeat(8, 1fr); }
    /* 精选宽度自适应，1200 以下继续 shrink；不限制字数 → 最大 48% 防止一条占一整行 */
    .featured-item { width: auto; min-width: 0; max-width: calc(50% - 8px); }
    .header-main { gap: 30px; }
    .header-search-wrap { max-width: 680px; }
    .search-box { height: 52px; }
    .hotrank-btn { height: 34px; }
    .header-logo h1 { font-size: 32px; }          /* 原 36 -> 32 */
    .header-logo-img { max-height: 48px; height: 48px; max-width: 200px; } /* 原 54 -> 48 */
    .search-input { font-size: 16px; }
    .search-btn { font-size: 16px; padding: 0 36px; }
}
@media (max-width: 992px) {
    .sites-grid { grid-template-columns: repeat(6, 1fr); }
    .hot-sites { grid-template-columns: repeat(6, 1fr); }
    .featured-item { width: auto; min-width: 0; max-width: calc(50% - 8px); }
    .header-main { gap: 22px; }
    .header-search-wrap { max-width: 100%; }
    .search-box { height: 50px; }
    .hotrank-btn { height: 32px; }
    .header-logo h1 { font-size: 28px; }          /* 原 32 -> 28 */
    .header-logo-img { max-height: 42px; height: 42px; max-width: 180px; } /* 原 48 -> 42 */
    .search-engine { padding: 0 34px 0 16px; font-size: 14px; }
}
@media (max-width: 768px) {
    /* 小屏幕下LOGO和搜索框改成上下两排，不并排 */
    .header-main { gap: 14px; justify-content: flex-start; }
    .header-logo { justify-content: flex-start; }
    .header-search-wrap { width: 100%; }
    .sites-grid { grid-template-columns: repeat(5, 1fr); }
    .hot-sites { grid-template-columns: repeat(3, 1fr); }
    .nav-tabs { flex-wrap: wrap; }
    .nav-tabs li a { padding: 5px 12px; font-size: 13px; }
    .hot-site-icon { width: 24px; height: 24px; font-size: 12px; }
    .hot-site-name { font-size: 13px; }
    /* 平板：精选宽度自适应但 4 列大致 */
    .featured-item { width: auto; min-width: calc(50% - 4px); max-width: calc(50% - 4px); padding: 6px 10px; }
    .search-box { height: 46px; border-radius: 0 24px 24px 0; }
    .search-input { font-size: 15px; padding: 0 16px; }
    .search-btn { font-size: 15px; padding: 0 24px; }
    .hotrank-btn { height: 30px; padding: 0 8px; }
    .header-logo h1 { font-size: 24px; }          /* 原 28 -> 24 */
    .header-logo-img { max-height: 36px; height: 36px; max-width: 160px; } /* 原 42 -> 36 */
    .header { padding: 16px 0 12px; }
    /* 小屏新闻榜：图缩小 */
    .hot-news-img { width: 84px; height: 64px; }
    .hot-news-title { font-size: 13px; }
}
@media (max-width: 480px) {
    .sites-grid { grid-template-columns: repeat(4, 1fr); }
    .hot-sites { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
    .topbar-left .lunar { display: none; }
    .hot-site-icon { width: 22px; height: 22px; font-size: 11px; border-radius: 5px; }
    .hot-site-name { font-size: 12px; }
    .featured-item { width: auto; min-width: calc(50% - 4px); max-width: 100%; padding: 5px 8px; }
    .featured-name { font-size: 13px; }
    .hotrank-btn { padding: 0 6px; height: 28px; margin: 0; font-size: 11px; }
    .hotrank-btn-icon { font-size: 12px; }
    .search-extra-btns { display: none; }
    .search-box { height: 44px; border-radius: 22px; }
    .search-engine { padding: 0 28px 0 12px; font-size: 13px; }
    .search-input { font-size: 14px; padding: 0 12px; }
    .search-btn { font-size: 14px; padding: 0 18px; }
    .header-logo h1 { font-size: 21px; }          /* 原 24 -> 21 */
    .header-logo-img { max-height: 32px; height: 32px; max-width: 130px; } /* 原 36 -> 32 */
    .header { padding: 14px 0 10px; }
    .hot-news-img { width: 72px; height: 54px; }
    .hot-rank { width: 18px; height: 18px; font-size: 10px; }
    .hot-news-item { gap: 8px; }
    .hot-news-desc { display: none; }
    .hot-news-title { font-size: 13px; }
}

/* ========== 展开区域：百度热搜榜 ========== */
.site-extra-wrap { display: none; }

.baidu-hotrank-wrap {
    display: block;
    margin-top: 22px;
    padding: 16px 20px 12px;
    background: linear-gradient(180deg,#fffaf7 0%,#ffffff 100%);
    border: 1px solid #ffe9d6;
    border-radius: 10px;
}
.baidu-hotrank-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ffd3b4;
}
.baidu-hotrank-title {
    font-size: 15px;
    font-weight: 600;
    color: #d4380d;
}
.baidu-hotrank-sub {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}
.baidu-hotrank-sub:hover { color: #2319dc; }
.baidu-hotrank-list {
    list-style: none;
    padding: 0;
    margin: 0;
    column-count: 3;
    column-gap: 15px;
}
.content-sidebar .baidu-hotrank-list {
    column-count: 1;
    column-gap: 0;
}
.baidu-hotrank-list li {
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
}
.baidu-hotrank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #fdf1e5;
    transition: color 0.15s;
}
.baidu-hotrank-list li:nth-last-child(-n+2) .baidu-hotrank-item { border-bottom: none; }
.baidu-hotrank-item:hover { color: #2319dc; }
.baidu-hotrank-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hotrank-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.hotrank-num.rank-top { background: #ff4d4f; }
.hotrank-num.rank-mid { background: #ff9c6e; }
.hotrank-num.rank-low { background: #bbb; }

/* 热搜榜分页 */
.hotrank-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 1px dashed #ffd3b4;
}
.hotrank-page-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    user-select: none;
}
.hotrank-page-btn:hover { color: #2319dc; background: #f0f4ff; }
.hotrank-page-info {
    font-size: 12px;
    color: #999;
}

@media (max-width: 768px) {
    .nav-bar-row { flex-direction: column; }
    .nav-sidebar { width: 100%; }
    .content { flex-direction: column; }
    .content-sidebar { width: 100%; position: static; }
    .content-sidebar .baidu-hotrank-wrap { position: static; }
    .baidu-hotrank-list { column-count: 1; column-gap: 0; }
    .baidu-hotrank-text { font-size: 13px; }
    .baidu-hotrank-wrap { margin-top: 16px; padding: 14px 14px 10px; }
    .hotrank-btn { padding: 0 10px; height: 32px; margin: 6px 3px 6px 0; }
    .search-box { height: 46px; border-radius: 24px; }
    .hotrank-dropdown { width: calc(100% - 30px) !important; left: 15px !important; }
    .hotrank-dropdown-list { grid-template-columns: 1fr; }
    .hotrank-num { width: 18px; height: 18px; font-size: 11px; }
    .video-nav-tabs { gap: 6px; }
    .video-nav-tab { padding: 5px 12px; font-size: 13px; }
    .video-grid { grid-template-columns: 1fr; }
    .video-card-item { border-right: none; }
    .video-card-cover { flex: 0 0 100px; width: 100px; height: 60px; }
    .video-card-title { font-size: 13px; }
}