/* 基础CSS变量 - 暗黑色系配色 */
:root {
    --primary-color: #6a5acd;      /* 紫色 */
    --dark-bg: #121826;            /* 深蓝色背景 */
    --card-bg: #1a202c;            /* 卡片背景 */
    --card-hover: #222831;         /* 卡片悬停背景 */
    --text-primary: #ffffff;       /* 主要文字 */
    --text-secondary: #b0b7c3;     /* 次要文字 */
    --border-color: #2d3748;       /* 边框颜色 */
    --header-bg: #0f141f;          /* 头部背景 */
    --pagination-bg: #1e2533;      /* 分页背景 */
    --gradient-gold: linear-gradient(90deg, #ffd700, #ff69b4, #9370db);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', 'Noto Sans SC', Oxygen, Ubuntu, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px; /* 为底部版权留出空间 */
}

/* 导航栏容器 */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

/* 渐变标题样式 */
.logo {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 菜单按钮样式 */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 30px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--header-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    display: none;
    flex-direction: column;
    z-index: 999;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* 流畅滚动 */
}

.dropdown-menu.active {
    display: flex;
}

/* 阻止下拉菜单滚动时影响页面 */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    gap: 10px;
}

.category-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.category-item .icon {
    font-size: 1.3rem;
}

/* 搜索区域 */
.search-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.search-box {
    display: flex;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.search-input {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    width: 250px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #5a4acd;
}

/* 移动端搜索框 */
.mobile-search {
    display: none;
    margin-top: 1rem;
}

.mobile-search .search-box {
    width: 100%;
}

.mobile-search .search-input {
    width: 100%;
}

/* 左侧导航区域 */
.nav-left {
    display: flex;
    align-items: center;
}

/* 右侧搜索区域 */
.nav-right {
    display: flex;
    align-items: center;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.1rem;
}

/* 视频网格布局 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* 视频卡片样式 */
.video-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(106, 90, 205, 0.2);
    background-color: var(--card-hover);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 66.25%; /* 16:9 比例 */
    background-color: var(--border-color);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.video-info {
    padding: 0.4rem;
}

.video-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    
    /* 防止换行，超出部分用省略号 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* 对于中文字符，1ch大约等于半个中文字符，所以要显示13个中文字符需要26ch */
    /* 但更好的做法是使用百分比或固定像素值 */
    max-width: 100%; /* 使用父容器宽度 */
    
    /* 确保正确显示 */
    display: block;
}

/* 添加title属性悬停提示的样式（如果需要） */
.video-title[title] {
    cursor: help;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--pagination-bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* 底部版权 */
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--header-bg);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #5a4acd;
    transform: translateY(-3px);
}

/* 阻止页面滚动当下拉菜单打开时 */
body.no-scroll {
    overflow: hidden;
}

.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-image.loaded {
    opacity: 1;
}

.lazy-loading {
    background: #f0f0f0 url(/static/loading.gif) center center no-repeat;
    background-size: 30px 30px;
    min-height: 150px;
}

.latest h2 {
    font-size: 1.8rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: inline-block;
}

/* 响应式设计 */
@media (max-width: 1024px) {

    .search-box .search-input {
        width: 200px;
    }
    
    /* 平板端：3个一行 */
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    

    
    .search-area .search-box {
        display: none;
    }
    
    .mobile-search {
        display: flex;
    }
    
    .dropdown-menu {
        padding: 1rem;
        max-height: 60vh;
    }
    
    /* 手机端：2个一行 */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .video-title {
        font-size: 0.9rem;
    }
    
    .back-to-top {
        bottom: 120px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    /* 超小手机：保持2个一行，但调整间隙 */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* 视频卡片内文字调整 */
    .video-title {
        font-size: 0.85rem;
    }
    
    .video-meta {
        font-size: 0.75rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .back-to-top {
        bottom: 120px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* 针对中文字符的特殊处理 */
@media (min-width: 769px) {
    /* PC端：让标题显示更多字符 */
    .video-title {
        /* PC端可以显示更多字符，不使用ch单位，而是依靠父容器宽度 */
        max-width: 250px; /* 固定宽度，大约可以显示13-15个中文字符 */
    }
}

@media (max-width: 768px) {
    /* 移动端：调整宽度以适应屏幕 */
    .video-title {
        max-width: 190px; /* 移动端固定宽度 */
    }
}


/* 跑马灯容器 - 固定在底部 */
.marquee-containers {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
   /*  border-top: 1px solid var(--border-color);*/
    padding: 0.05rem 0;
    z-index: 900;
    overflow: hidden;
}

/* 跑马灯轨道 */
.marquee-containers .marquees {
    display: flex;
    width: max-content; /* 让内容宽度自适应 */
    animation: marquee-left 15s linear infinite; /* 减少时间到15秒，更快 */
}

/* 跑马灯内容 */
.marquee-containers .marquees a {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.01rem 0.1rem;
    border-radius: 1px;
    margin: 0 0.1rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s ease;
   /*  background-color: var(--card-bg);
    border: 0.1px solid var(--border-color);*/
}

/* 跑马灯悬停效果 */
.marquee-containers .marquees a:hover {
    color: var(--text-primary);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 90, 205, 0.3);
}

/* 跑马灯动画 - 从右侧移动到左侧消失 */
@keyframes marquee-left {
    0% {
        transform: translateX(100vw); /* 从屏幕最右侧开始 */
    }
    100% {
        transform: translateX(-100%); /* 移动到屏幕左侧完全消失 */
    }
}

/* 悬停暂停效果 */
.marquee-containers:hover .marquees {
    animation-play-state: paused;
}

/* 确保版权信息不被遮挡 */
.footer {
    margin-bottom: -10px; /* 为跑马灯留出空间 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .marquee-containers {
        padding: 0.6rem 0;
    }
    
    .marquee-containers .marquees {
        animation-duration: 12s; /* 移动端更快 */
    }
    
    .marquee-containers .marquees a {
        padding: 0.2rem 0.6rem;
        font-size: 0.9rem;
        margin: 0 0.3rem;
    }
    
    .footer {
        margin-bottom: 45px;
    }
}

@media (max-width: 480px) {
    .marquee-containers .marquees {
        animation-duration: 10s; /* 超小屏幕更快 */
    }
    
    .footer {
        margin-bottom: 40px;
    }
}
dd {
    margin-bottom: 0.5rem;
    margin-left: 0;
}

#navbarNav {
	border-radius: 10px;
    padding: 12px 6px;
    background: rgba(0, 0, 0, 0.8);
}



a {
	text-decoration: none;
	color: #ffffff;
}



@keyframes scroll-left {
	from {
		transform: translateX(50%)
	}

	to {
		transform: translateX(-100%)
	}
}



.nimad {
	width: 100%;
	display: flex;
	justify-content: center;
	margin: 1px 0;
}

.nimad a {
	display: block
}

.abcdHF {
	width: 1200px;
	height: 60px
}

.abcdHF1 {
	width: 1200px;
	height: 120px
}

@media (max-width:768px) {
	.abcdHF {
		height: 40px;
		width: 100vw
	}

	.abcdHF1 {
		height: 80px;
		width: 100vw
	}
}

.bba-container {
	max-width: 1200px;
	margin: auto;
	display: block;
	box-sizing: border-box
}

@media screen and (max-width:750px) {
	.menu {
		margin: 0px 0 0;
		border-radius: 0;
		padding: 0;
		width: 100%
	}
}

.menu-wrap dl {
	margin: auto;
	display: block;
	float: left;
	width: 100%;
	padding: 15px 0;

}

.menu-wrap dt {
	width: 8%;
	font-size: 20px;
	color: #000
}

.menu-wrap dt, .menu-wrap dd {
	float: left;
	line-height: 40px;
	text-align: center
}

@media screen and (max-width:750px) {
	.menu dt {
		width: 14%;
		line-height: 70px;
		font-size: 14px
	}
}

.menu-wrap dd {
	width: 11.5%;
	font-size: 16px
}

@media screen and (max-width:750px) {
	.menu-wrap dl {
		padding: 10px 0
	}
}

.menu dl:first-child {
	border-top: 0
}

.menu-wrap dt a {
	background: #e7cdaa;
	padding: 5px;
	border-radius: 10px;
	color: black;
	font-size: 16px;
}

.menu-wrap::after {
	content: "";
	display: table;
	clear: both
}

@-webkit-keyframes hue {
	from {
		-webkit-filter: hue-rotate(0deg);
		-moz-filter: hue-rotate(0deg)
	}

	to {
		-webkit-filter: hue-rotate(-360deg);
		-moz-filter: hue-rotate(-360deg)
	}
}

.bba-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
	gap: 4px;
	max-width: 1200px;
	margin: 2px auto;
	padding: 5px;
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1)
}

@media screen and (max-width:750px) {
	.menu-wrap dd {
		width: 21%;
		line-height: 30px;
		font-size: 12px
	}

	.bba-grid {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(55px, 1fr));
		gap: 4px;
		max-width: 85%;
		margin: 2px 0;
		padding: 5px;
		border-radius: 8px;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0)
	}
}

.bba-item {
	margin: 2px;
	text-align: center;
	border-radius: 8px;
	transition: transform 0.3s ease, box-shadow 0.3s ease
}

.bba-item img {
	width: 80%;
	object-fit: contain;
	border-radius: 10px;
	max-width: 80px
}

.bba-item div {
	font-size: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-weight: bold;
	color: #f35626;
	background-image: -webkit-linear-gradient(92deg, #f35626, #7100ff);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	-webkit-animation: hue 10s infinite linear;
}

.bba-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2)
}

@media (max-width:768px) {
	.bba-item img {
		width: 100%
	}
}

#ppap {
	position: relative;
	z-index: 9999
}

.ppap {
	position: fixed;
	z-index: 9999;
	cursor: pointer;
	transition: transform 0.3s ease
}

.ppap:hover {
	transform: scale(1.1)
}

.ppap.zuo1 {
	top: 20%;
	right: 1%;
}

.ppap.zuo2 {
	top: 30%;
	right: 1%
}

.ppap.zuo3 {
	top: 40%;
	right: 1%
}

.ppap.zuo4 {
	top: 50%;
	right: 1%
}

.ppap.zuo5 {
	top: 60%;
	right: 1%
}

.ppap.zuo6 {
	top: 70%;
	right: 1%
}

.ppap.xia1 {
	top: 88%;
	left: 5%
}

.ppap.xia2 {
	top: 88%;
	left: 29%
}

.ppap.xia3 {
	top: 88%;
	left: 53%
}

.ppap.xia4 {
	top: 88%;
	left: 78%
}

.ppap img {
	width: 60px;
	height: 60px;
	border-radius: 10px
}