/* 基础重置与全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 14px;
}

a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #f0f7ff;
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部导航 - 恢复原有显示效果 */
.site-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* 头部内容布局：PC端欢迎语居中，统计项右上角 */
.header-inner {
    position: relative; /* 作为绝对定位的容器 */
    margin-bottom: 20px;
    height: 80px; /* 固定高度，保证布局稳定 */
    display: flex;
    align-items: center;
}

/* 左侧欢迎语 - PC端居中，手机端不变 */
.header-welcome {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.header-welcome h2 {
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.header-welcome p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* 右上角统计信息 - PC端再左移3个字符 */
.header-stats {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 1rem;
    white-space: nowrap;
}

.header-stats li {
    display: inline-block;
}

.header-stats .text {
    color: #ffd700; /* 金色突出显示数字 */
    font-weight: 700;
    margin-left: 5px;
}

/* 导航菜单 - 恢复原有横向滑动样式 */
.main-nav {
    width: 100%;
    overflow: hidden; /* 包裹滚动容器 */
}

.nav-menu {
    display: flex;
    gap: 30px;
    justify-content: flex-start; /* 取消居中，避免滑动后空白 */
    align-items: center;
    white-space: nowrap; /* 强制不换行 */
    overflow-x: auto; /* 横向滚动 */
    padding: 0 10px;
    scrollbar-width: none; /* 隐藏Firefox滚动条 */
    -ms-overflow-style: none; /* 隐藏IE/Edge滚动条 */
}

/* 隐藏Chrome/Safari滚动条（美化） */
.nav-menu::-webkit-scrollbar {
    display: none;
}

/* 滚动提示（可选：提示用户可滑动） */
.nav-menu::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.5;
    pointer-events: none;
    display: none; /* 仅移动端显示 */
}

.nav-menu > li {
    position: relative;
    flex: 0 0 auto; /* 禁止li被压缩 */
}

.nav-link {
    display: block;
    padding: 5px 0;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
}

/* 搜索框区域：背景宽度是container的宽度（和列表背景对齐） */
.search-section {
    padding: 40px 0 0 0;
    background-color: #fff; /* 搜索框背景是白色，占满container宽度 */
    text-align: center;
}

/* 搜索框输入区域：固定宽度800px，居中 */
.search-form-wrapper {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* 核心修改：搜索框Flex容器垂直居中 + 统一子元素高度 */
.search-form {
    display: flex;
    align-items: center; /* 强制子元素垂直居中 */
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid #e1e5eb;
}

/* 输入框：保持原有水平内边距，垂直内边距统一 */
.search-input {
    flex: 1;
    padding: 14px 20px; /* 垂直内边距14px */
    border: none;
    background: transparent;
    color: #333;
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

/* 核心修改：搜索按钮垂直内边距与输入框一致，保证上下对称 */
.search-btn {
    padding: 14px 30px; /* 垂直内边距14px，与输入框统一 */
    background: #4285f4;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #3367d6;
}

/* ========== 影片列表样式（自定义列宽：名称占一半，类别/时间平分剩下的） ========== */
.video-list-section {
    width: 100%; /* 背景占满container宽度，和搜索框背景一致 */
    margin: 0 auto 40px auto;
    background: #fff; /* 列表背景和搜索框背景同色 */
    padding: 0; /* 内部容器控制间距 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* 列表内部容器：和搜索框输入区域宽度一致（100%），居中 */
.video-list-inner {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0; /* 去掉左右padding，让内容铺满 */
}

/* 列表表头样式：自定义Flex比例分配宽度（新增序号列） */
.video-list-header {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 10px 20px; /* 保留左右内边距避免内容贴边 */
    background: #f5f7fa;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #444;
}

/* 新增序号列样式 */
.video-list-header .serial {
    flex: 0 0 60px; /* 固定宽度，不缩放 */
    text-align: center;
}

/* 调整列宽：序号+名称+类别+时间 */
.video-list-header .title {
    flex: 1; /* 剩余宽度给名称 */
    text-align: center;
}
.video-list-header .type,
.video-list-header .time {
    flex: 0 0 150px; /* 固定宽度 */
    text-align: center;
}

/* 影片列表容器 */
.video-list {
    width: 100%;
}

/* 影片列表项样式：和表头列宽保持一致（新增序号列） */
.video-list li {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 15px 20px; /* 保留左右内边距避免内容贴边 */
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

/* 序号样式 */
.video-list li .serial-number {
    flex: 0 0 60px; /* 和表头序号列对齐 */
    text-align: center;
    color: #4285f4; /* 蓝色序号，醒目 */
    font-weight: 700;
}

.video-list li:hover {
    background: #f9f9fa;
}

/* 列表项列宽和表头完全匹配 */
.video-list li .title {
    flex: 1; /* 和表头名称列对齐 */
    text-align: center;
}
.video-list li .type,
.video-list li .time {
    flex: 0 0 150px; /* 和表头对齐 */
    text-align: center;
}

/* 列表项标题链接样式调整：避免文字溢出 */
.video-list li .title a {
    color: #333;
    text-decoration: none;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-list li .title a:hover {
    color: #4285f4;
    text-decoration: underline;
}

.video-list li .title em {
    color: #999;
    font-style: normal;
    font-size: 0.9em;
    margin-left: 5px;
}

.video-list li .type a {
    color: #667eea;
}

.video-list li .time {
    color: #999;
    font-size: 0.9em;
}

/* 移动端列表适配 - 核心修正：彻底解决序号&名称对齐问题 */
@media (max-width: 768px) {
    /* 表头区域：强制Flex对齐+统一行高 */
    .video-list-header {
        padding: 12px 15px; /* 增加垂直内边距，和列表项匹配 */
        font-size: 0.95em;
        display: flex;
        align-items: center; /* 强制垂直居中 */
    }
    /* 表头序号列：固定宽度+居中+统一行高 */
    .video-list-header .serial {
        flex: 0 0 50px; /* 固定宽度（和列表项序号一致） */
        text-align: center;
        line-height: 24px; /* 固定行高，和列表项文字一致 */
    }
    /* 表头名称列：固定Flex+左对齐+统一行高 */
    .video-list-header .title {
        flex: 1;
        text-align: left;
        padding-left: 15px; /* 增加左内边距，和列表项匹配 */
        line-height: 24px; /* 固定行高，和序号列一致 */
    }
    /* 隐藏多余列 */
    .video-list-header .type,
    .video-list-header .time {
        display: none;
    }
    
    /* 列表项区域：强制Flex对齐+统一行高/内边距 */
    .video-list li {
        padding: 12px 15px; /* 垂直内边距和表头一致 */
        font-size: 0.95em;
        display: flex;
        align-items: center; /* 强制垂直居中 */
    }
    /* 列表项序号列：固定宽度+居中+统一行高+对齐基线 */
    .video-list li .serial-number {
        flex: 0 0 50px; /* 和表头序号列宽度完全一致 */
        text-align: center;
        line-height: 24px; /* 和名称列文字行高一致 */
        vertical-align: middle; /* 强制基线对齐 */
    }
    /* 列表项名称列：固定Flex+左对齐+统一行高+内边距 */
    .video-list li .title {
        flex: 1;
        text-align: left;
        padding-left: 15px; /* 和表头名称列内边距完全一致 */
        line-height: 24px; /* 和序号列行高一致 */
        vertical-align: middle; /* 强制基线对齐 */
    }
    /* 隐藏多余列 */
    .video-list li .type,
    .video-list li .time {
        display: none;
    }
    
    /* 名称链接：强制行高+基线对齐 */
    .video-list li .title a {
        font-size: 0.95em;
        line-height: 24px; /* 和容器行高一致 */
        vertical-align: middle;
    }
    
    /* 移动端隐藏PC页码，显示简化版 */
    .hidden-xs {
        display: none !important;
    }
    .visible-xs {
        display: block !important;
    }

    /* 移动端头部适配 - 恢复原有逻辑 */
    .header-inner {
        position: static;
        height: auto;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .header-welcome {
        position: static;
        transform: none;
        margin-bottom: 10px;
    }
    
    .header-stats {
        position: static;
        transform: none;
        right: auto; /* 移动端重置right值，保持居中 */
        font-size: 0.9rem;
        gap: 15px;
        justify-content: center; /* 移动端统计项居中显示 */
        width: 100%;
    }
    
    .nav-menu {
        gap: 20px;
        font-size: 1rem;
        padding-bottom: 5px; /* 避免滚动条遮挡 */
    }
    
    /* 移动端显示滑动提示箭头 */
    .nav-menu::after {
        display: block;
    }
    
    /* 移动端隐藏下拉菜单（滑动时不需要） */
    .dropdown {
        display: none !important;
    }
}

/* PC端适配：隐藏移动端页码，显示完整页码 + 放大导航文字 */
@media (min-width: 769px) {
    .hidden-xs {
        display: block !important;
    }
    .visible-xs {
        display: none !important;
    }
    /* PC端导航居中 */
    .nav-menu {
        justify-content: center;
    }
    /* PC端导航文字放大 */
    .nav-link {
        font-size: 1.2rem;
    }
}

/* 分页样式 - 适配自定义分页标签 */
.pagination {
    padding: 20px 0;
    text-align: center;
}

.pagination ul {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.pagination li {
    list-style: none;
    margin: 0 2px;
}

/* 分页按钮通用样式 */
.pagination li a,
.pagination li span.num {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #e1e5eb;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* 当前页高亮样式 */
.pagination li.active a {
    background-color: #4285f4;
    color: #fff;
    border-color: #4285f4;
    font-weight: 700;
    pointer-events: none;
}

/* 按钮hover效果 */
.pagination li a:hover {
    background-color: #f5f7fa;
    border-color: #c0c6cc;
}

/* 移动端分页适配（缩小按钮尺寸） */
@media (max-width: 768px) {
    .pagination li a,
    .pagination li span.num {
        padding: 4px 8px;
        font-size: 0.9em;
    }
}
/* ========== 影片列表样式结束 ========== */

/* 底部区域 - 保留最新修改的样式 */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-nav {
    margin-bottom: 20px;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
    display: inline-block;
    padding: 5px 0;
}

.footer-nav a:hover {
    color: #4285f4;
    text-decoration: underline;
}

.footer-text {
    font-size: 13px;
    line-height: 1.8;
    color: #ccc;
    max-width: 800px;
    margin: 0 auto 15px;
}

.footer-copyright {
    font-size: 12px;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #34495e;
}

/* 移动端页脚适配 */
@media (max-width: 768px) {
    .footer-nav a {
        margin: 0 5px;
        font-size: 13px;
    }
    
    .footer-text {
        padding: 0 15px;
        font-size: 12px;
    }
    .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

}