/* ==============================
   1. 全局基础重置
   ============================== */
:root {
    --theme-color: #4e6ef2; /* 百度蓝 */
    --theme-hover: #4662d9;
    --text-main: #333;
    --bg-body: #fff;
    --border-color: #e0e0e0;
}

body, html { margin: 0; padding: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text-main); background: var(--bg-body); font-size: 14px; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul, li { list-style: none; padding: 0; margin: 0; }
input, button { outline: none; -webkit-appearance: none; }
img { max-width: 100%; display: block; object-fit: cover; }

/* ==============================
   2. 首页专用样式 (修复部分)
   对应 HTML结构: .main-container, .logo, .search-section, .pic-scroll-wrap
   ============================== */
.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 垂直布局：上部留白，下部留出滚动栏空间 */
    padding-top: 12vh; 
    padding-bottom: 240px; 
    box-sizing: border-box;
    background: #fff;
    position: relative;
    width: 100%;
}

/* Logo区域 */
.logo { margin-bottom: 30px; text-align: center; user-select: none; }
.logo-text { font-size: 60px; font-weight: bold; letter-spacing: -2px; line-height: 1; }
.logo-text span { color: #2932e1; } /* 百度蓝 */
.logo-text b { color: #e12929; margin-left: 5px; } /* 红色强调 */

/* 搜索区域 */
.search-section { width: 100%; max-width: 680px; padding: 0 20px; box-sizing: border-box; z-index: 10; }
.search-box {
    display: flex;
    align-items: center;
    border: 2px solid #c4c7ce;
    border-radius: 12px; /* 圆角 */
    height: 50px;
    background: #fff;
    transition: all 0.3s;
    overflow: hidden;
    margin-bottom: 25px;
}
.search-box:hover, .search-box:focus-within { border-color: var(--theme-color); box-shadow: 0 2px 12px rgba(78, 110, 242, 0.15); }

.search-input {
    flex: 1;
    border: none;
    height: 100%;
    padding: 0 16px;
    font-size: 16px;
    background: transparent;
    width: 100%;
}

.search-btn-icon {
    border: none;
    background: transparent;
    padding: 0 20px;
    height: 100%;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid transparent;
}
.search-btn-icon:hover { color: var(--theme-color); background: #f5f5f5; }
.search-btn-icon svg { width: 22px; height: 22px; fill: currentColor; }

/* 按钮组 (百度一下/随机推荐) */
.btn-group { display: flex; justify-content: center; gap: 15px; width: 100%; }
.s_btn {
    background: #f4f5f7;
    border: none;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    padding: 10px 25px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}
.s_btn:hover { background: #e8e8eb; color: #000; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.s_btn.random { background-color: #fff; border: 1px solid #f0f0f0; } /* 差异化 */

/* 底部滚动视频流 */
.pic-scroll-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: rgba(20, 20, 20, 0.95); /* 深色背景 */
    backdrop-filter: blur(10px);
    padding: 20px 0;
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.scroll-box {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* iOS丝滑滚动 */
    padding: 0 40px; /* 留出箭头位置 */
    box-sizing: border-box;
}
/* 隐藏滚动条 */
.scroll-box::-webkit-scrollbar { display: none; }

.ulist { display: inline-flex; gap: 15px; padding-left: 10px; }

.video-card {
    width: 260px; /* 卡片宽度 */
    display: inline-block;
    vertical-align: top;
    white-space: normal; /* 允许标题换行 */
}

.card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    background: #333;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.video-card:hover .card-cover img { transform: scale(1.05); }

.card-tag {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.card-title {
    color: #ccc;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s;
}
.video-card:hover .card-title { color: #fff; }

/* 左右箭头 */
.arrow {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.arrow:hover { background: rgba(0,0,0,0.6); }
.arrow-prev { left: 0; }
.arrow-next { right: 0; }
.arrow::after {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}
.arrow-prev::after { transform: rotate(-135deg); }
.arrow-next::after { transform: rotate(45deg); }

/* 热门搜索标签云 */
.tag-cloud {
    margin-top: 30px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    line-height: 2;
    padding: 0 10px;
}
.tag-cloud div { font-size: 14px; margin-bottom: 10px; }
.tag-cloud a {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    color: #555;
    margin: 4px;
    background: #f1f2f4;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}
.tag-cloud a:hover { background: #e8f0fe; color: var(--theme-color); }

/* 首页底部 */
.main-container .footer {
    position: absolute;
    bottom: 230px; /* 在滚动栏之上 */
    width: 100%;
    text-align: center;
    color: #ccc;
    font-size: 12px;
    padding: 10px;
    pointer-events: none; /* 防止遮挡 */
}
.main-container .footer p { color: #999; margin: 0; }

/* 响应式适配 */
@media (max-width: 768px) {
    .main-container { padding-top: 10vh; padding-bottom: 200px; }
    .logo-text { font-size: 48px; }
    .search-section { padding: 0 15px; }
    .search-box { height: 44px; }
    .btn-group { gap: 10px; }
    .s_btn { padding: 8px 15px; width: 45%; }
    
    .pic-scroll-wrap { height: 180px; padding: 15px 0; }
    .video-card { width: 160px; }
    .card-cover { height: 90px; }
    .scroll-box { padding: 0 10px; }
    .arrow { display: none; } /* 手机端隐藏箭头，直接滑 */
    
    .tag-cloud { display: none; } /* 手机端隐藏热词，避免太乱 */
}


/* ==============================
   3. 内页样式 (搜索页/分类页/播放页)
   保留你之前的样式，防止内页崩坏
   ============================== */
/* 顶部导航栏 (.navbar) */
.navbar { 
    background: #fff; 
    border-bottom: 1px solid #ddd; 
    padding: 10px 0; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.container-fluid { 
    width: 1200px; 
    margin: 0 auto; 
    padding: 0 10px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

.navbar-header { display: flex; align-items: center; }
.navbar-brand { font-size: 24px; font-weight: bold; margin-right: 30px; }
.navbar-brand span:first-child { color: #ce6ad9; } /* 汁乎紫 */
.navbar-brand span:last-child { color: #66cc00; } /* AV片库绿 */

/* 内页顶部搜索框 */
.top-search { flex: 1; max-width: 600px; }
.top-search form { 
    display: flex; 
    border: 2px solid #ce6ad9; 
    border-radius: 20px; 
    overflow: hidden; 
    background: #fff;
}
.top-search input { 
    flex: 1; 
    border: none; 
    padding: 8px 15px; 
    font-size: 14px; 
}
.top-search button { 
    background: #fff; 
    border: none; 
    padding: 0 15px; 
    cursor: pointer; 
    display: flex; 
    align-items: center;
}
.top-search button svg { width: 20px; height: 20px; fill: #ce6ad9; }

.nav-right a { font-size: 15px; color: #666; font-weight: bold; }

/* 主体网格布局 (.main-grids) */
.main-grids { 
    width: 1200px; 
    margin: 0 auto; 
    padding: 0 10px; 
    min-height: 600px;
}

.titleinfo { 
    border-bottom: 1px solid #eee; 
    margin-bottom: 20px; 
    padding-bottom: 10px; 
}
.titleinfo h3 { 
    font-size: 18px; 
    border-left: 4px solid #ce6ad9; 
    padding-left: 10px; 
    margin: 0; 
    color: #333;
}
.titleinfo small { font-size: 12px; color: #999; margin-left: 10px; font-weight: normal; }

.mozaique {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px; 
    margin-bottom: 30px;
}

.thumb-block {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    border: 1px solid #eee;
}
.thumb-block:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.15); 
    border-color: #ce6ad9;
}

.resent-grid-img {
    position: relative;
    width: 100%;
    padding-bottom: 60%; 
    background: #000;
    overflow: hidden;
}
.resent-grid-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.dur {
    position: absolute;
    bottom: 5px; right: 5px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 1px 4px;
    border-radius: 3px;
}

.padder-v { padding: 10px; }
.text-ellipsis {
    display: block;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #444;
}
.thumb-block:hover .text-ellipsis { color: #ce6ad9; }

.pagination { text-align: center; margin: 40px 0; display: flex; justify-content: center; gap: 5px; }
.pagination a, .pagination span {
    display: inline-block; padding: 5px 12px; background: #fff; border: 1px solid #ddd; border-radius: 3px; color: #666;
}
.pagination a:hover, .pagination .current {
    background: #ce6ad9; color: #fff; border-color: #ce6ad9;
}

/* 内页底部 footer (与首页区分) */
body > .footer { 
    text-align: center; padding: 30px 0; background: #fff; border-top: 1px solid #eee; margin-top: 30px; color: #999; 
}

@media (max-width: 768px) {
    .container-fluid, .main-grids { width: 100%; }
    .mozaique { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .top-search { display: none; } 
    .navbar-header { justify-content: center; width: 100%; }
}