/* ==================================================
   1. 基础和全局 (V3.1 - 响应式辉光背景 & 滚动优化)
=================================================== */
:root {
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --neon-purple: #9d00ff;
    --dark-bg: #10101a;
    --content-bg: #1a1a2e;
}

body {
    background-color: var(--dark-bg);
    background-image: 
        radial-gradient(ellipse at left center, rgba(157, 0, 255, 0.2), transparent 50%),
        radial-gradient(ellipse at right center, rgba(0, 255, 255, 0.2), transparent 50%);
    background-attachment: fixed;
    color: #e0e0e0;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
}

.main-container { 
    max-width: 1200px; 
    margin: 20px auto; 
    background-color: var(--content-bg); 
    padding: 20px; 
    border-radius: 12px; 
    border: 1px solid rgba(157, 0, 255, 0.3);
    background-color: rgba(26, 26, 46, 0.95); 
}
a { color: #e0e0e0; text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--neon-pink); }
hr { border-top: 1px solid rgba(157, 0, 255, 0.2); }

/* --- 2. 头部导航 --- */
.site-header-neon { z-index: 1020; background: linear-gradient(to right, rgba(26, 26, 46, 0.8), rgba(20, 20, 30, 0.8)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--neon-purple); box-shadow: 0 0 25px rgba(157, 0, 255, 0.6); padding: 10px 0; }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo-brand { flex-shrink: 0; font-size: 1.6rem; font-weight: bold; color: #fff !important; text-shadow: 0 0 5px #fff, 0 0 10px var(--neon-blue); }
.logo-brand img { max-height: 40px; width: auto; }
.main-navigation { flex-grow: 1; margin: 0 2rem; min-width: 0; }
.main-navigation .nav-list { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: nowrap; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; }
.main-navigation .nav-list::-webkit-scrollbar { display: none; }
.main-navigation .nav-item .nav-link { display: block; padding: 8px 18px; font-size: 16px; font-weight: 500; text-transform: uppercase; white-space: nowrap; background-color: transparent; color: #ccc !important; border-radius: 20px; border: 1px solid var(--neon-blue); box-shadow: inset 0 0 8px rgba(0, 255, 255, 0.6); transition: all 0.3s; }
.main-navigation .nav-item .nav-link:hover, .main-navigation .nav-item .nav-link.active { background-color: var(--neon-blue); color: #000 !important; border-color: var(--neon-blue); box-shadow: 0 0 15px var(--neon-blue); transform: translateY(-2px); }

/* --- 3. 子导航 --- */
.sub-nav-container { background-color: rgba(16, 16, 26, 0.9); padding: 12px 0; display: none; border-bottom: 1px solid rgba(157, 0, 255, 0.3); }
.sub-nav-list { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sub-nav-item { background-color: transparent; color: #ccc; padding: 6px 15px; border-radius: 15px; font-size: 14px; border: 1px solid var(--neon-blue); box-shadow: inset 0 0 5px rgba(0, 255, 255, 0.5); transition: all 0.3s; }
.sub-nav-item:hover { background-color: var(--neon-blue); color: #000; box-shadow: 0 0 10px var(--neon-blue); }

/* --- 4. 主搜索框 --- */
.main-search-form { margin: 1.5rem 0; }
.main-search-form .form-control { background-color: rgba(0,0,0,0.3); border: 1px solid var(--neon-blue); color: #fff; border-radius: 25px 0 0 25px; padding: 10px 20px; font-size: 1.1rem; }
.main-search-form .form-control::placeholder { color: #888; }
.main-search-form .btn { background: linear-gradient(to right, var(--neon-pink), var(--neon-blue)); color: #000; font-weight: bold; border: none; border-radius: 0 25px 25px 0; padding: 10px 20px; }

/* --- 5. 视频卡片 --- */
.content-wrapper .section-header { color: var(--neon-blue); font-weight: bold; font-size: 1.5rem; padding-bottom: 8px; border-bottom: 1px solid var(--neon-blue); margin-bottom: 1.5rem; text-shadow: 0 0 8px rgba(0, 255, 255, 0.5); }
.main-container .video-grid .row { display: flex !important; flex-wrap: wrap !important; margin: 0 -10px; }
.main-container .video-grid .video-grid-item { width: 25% !important; padding: 0 10px; margin-bottom: 20px; box-sizing: border-box; }
@media (max-width: 992px) { .main-container .video-grid .video-grid-item { width: 33.333% !important; } }
@media (max-width: 576px) { .main-container .video-grid .video-grid-item { width: 50% !important; } }
.video-card { background-color: var(--card-bg); border-radius: 8px; overflow: hidden; border: 1px solid var(--neon-blue); box-shadow: 0 0 10px rgba(0, 255, 255, 0.5); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.video-card:hover { transform: scale(1.05); border-color: var(--neon-pink); box-shadow: 0 0 20px var(--neon-pink); }
.video-thumb-container { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.video-thumb-container img { width: 100%; height: 100%; object-fit: cover; }
.video-title { padding: 12px; font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; background-color: rgba(0,0,0,0.3); border-top: 1px solid var(--neon-purple); }

/* --- 6. 广告和页脚 --- */

/* --- 修复横幅广告溢出问题 & 调整间距 --- */
.banner-ads-section {
    width: 100%;
    /* vvv 这里改大了，拉开与下方文字广告的距离 vvv */
    margin-bottom: 1px; 
    /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
    overflow: hidden; /* 防止任何形式的溢出 */
}

.ad-banner-item {
    width: 100%;
    margin-bottom: 10px; /* 每个横幅广告之间的间距 */
    text-align: center;  /* 居中显示 */
}

/* 强制限制图片和iframe的最大宽度，防止撑破布局 */
.ad-banner-item img, 
.ad-banner-item iframe,
.ad-banner-item video {
    max-width: 100% !important; /* 核心代码：强制宽度不超过容器 */
    height: auto !important;    /* 高度自动，保持比例 */
    display: block;             /* 消除图片底部的微小空隙 */
    margin: 0 auto;             /* 确保居中 */
    border-radius: 8px;         /* 给广告加一点圆角 */
}

/* --- 文字广告网格 --- */
.text-ads-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 无论电脑还是手机，始终一行5个 */
    gap: 10px;
    margin-bottom: 1.5rem;
}

.text-ads-grid a {
    display: flex; justify-content: center; align-items: center;
    background: linear-gradient(to right, var(--neon-pink), var(--neon-blue));
    color: #000 !important; font-weight: bold; padding: 8px; border-radius: 5px; text-align: center;
    /* 这里的 font-size 会自动缩小以适应手机屏幕 */
    white-space: nowrap; font-size: min(14px, 2.5vw); line-height: 1.2; overflow: hidden; text-overflow: clip; transition: all 0.2s;
}
.text-ads-grid a:hover { transform: scale(1.05); box-shadow: 0 0 10px var(--neon-pink); }

.text-ads-grid a {
    display: flex; justify-content: center; align-items: center;
    background: linear-gradient(to right, var(--neon-pink), var(--neon-blue));
    color: #000 !important; font-weight: bold; padding: 8px; border-radius: 5px; text-align: center;
    white-space: nowrap; font-size: min(14px, 3vw); line-height: 1.2; overflow: hidden; text-overflow: clip; transition: all 0.2s;
}
.text-ads-grid a:hover { transform: scale(1.05); box-shadow: 0 0 10px var(--neon-pink); }

/* --- 友情链接 --- */
.friend-links { text-align: left; padding: 1.5rem 0; margin-bottom: 1.5rem; border-top: 1px solid rgba(157, 0, 255, 0.2); border-bottom: 1px solid rgba(157, 0, 255, 0.2); }
.friend-links h4 { font-size: 1.1rem; color: var(--neon-blue); margin-bottom: 1rem; }
.friend-links a { margin-right: 20px; font-weight: normal; color: #ccc; }
.friend-links a:hover { color: var(--neon-pink); }

/* --- 页脚 --- */
.site-footer { padding: 1rem 0; font-size: 0.9rem; color: #888; text-align: center; }

/* --- 7. 分页样式 --- */
.pagination-container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.pagination-list { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; gap: 0.5rem; }
.pagination-list .page-link { display: block; padding: 0.5rem 1rem; background-color: var(--card-bg); color: #ccc; border-radius: 5px; border: 1px solid #333; transition: all 0.2s; white-space: nowrap; }
.pagination-list .page-item:not(.disabled) .page-link:hover { background-color: var(--neon-pink); color: #000; border-color: var(--neon-pink); }
.pagination-list .page-item.active .page-link { background-color: var(--neon-blue); color: #000; border-color: var(--neon-blue); font-weight: bold; }
.pagination-list .page-item.disabled .page-link { color: #666; background-color: #222; cursor: not-allowed; }
.pagination-jump { display: flex; margin-left: 1rem; }
.pagination-jump .jump-input { width: 70px; background-color: #000; border: 1px solid #333; color: #e0e0e0; text-align: center; border-radius: 5px 0 0 5px; padding: 0.5rem; }
.jump-input { -moz-appearance: textfield; }
.jump-input::-webkit-outer-spin-button, .jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pagination-jump .jump-btn { background-color: #333; border: 1px solid #333; border-left: none; color: #e0e0e0; padding: 0.5rem 1rem; border-radius: 0 5px 5px 0; cursor: pointer; white-space: nowrap; }
.pagination-jump .jump-btn:hover { background-color: var(--neon-pink); }

/* --- 8. 详情页和播放页 (V2 按钮复刻版) --- */
.breadcrumb-nav { margin-bottom: 1.5rem; font-size: 0.9rem; color: #888; }
.breadcrumb-nav a { color: #ccc; text-decoration: none; transition: all 0.2s; }
.breadcrumb-nav a:hover { color: var(--neon-pink); text-shadow: 0 0 5px var(--neon-pink); }
.breadcrumb-nav span { margin: 0 8px; }

/* 容器：保持居中，背景和边框保持 V1 原有的紫色/深色风格 */
.video-detail-container { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1.5rem; 
    background-color: var(--card-bg); 
    padding: 2rem; 
    border-radius: 8px; 
    border: 1px solid var(--neon-purple); 
    text-align: center; 
}

/* 封面图：复刻 V2 效果，悬停时显示金色边框 */
.video-thumb-wrapper { 
    display: inline-block; 
    max-width: 80%; 
    border-radius: 12px; 
    border: 2px solid var(--neon-blue); 
    box-shadow: 0 0 25px var(--neon-blue); 
    transition: all 0.3s ease; 
}
.video-thumb-wrapper:hover { 
    border-color: #FFD700; /* V2 金色 */
    box-shadow: 0 0 35px #FFD700; 
    transform: scale(1.03); 
}
.video-thumb-wrapper img { display: block; width: 100%; border-radius: 10px; }

.video-meta { margin-bottom: 20px; color: #6c757d; }

/* 立即播放按钮：完全复刻 V2 (黑金/春绿配色 + 呼吸动画) */
.play-now-btn {
    display: inline-block; 
    padding: 15px 50px; 
    margin-top: 2rem; 
    font-size: 1.3rem; 
    font-weight: bold;
    /* 核心改动：强制黑色文字 + V2 硬编码渐变 */
    color: #000 !important; 
    background: linear-gradient(90deg, #FFD700, #00FF7F); 
    border-radius: 30px; 
    border: none;
    box-shadow: 0 0 20px #2E8B57; /* 海绿色阴影 */
    transition: all 0.3s ease;
    animation: button-pulse 2s infinite;
}

/* 按钮悬停效果 */
.play-now-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #00FF7F, #FFD700); /* 渐变反转 */
    box-shadow: 0 0 40px #FFD700; /* 金色强辉光 */
    color: #000 !important;
}

/* 呼吸动画：使用 V2 的颜色逻辑 */
@keyframes button-pulse {
    0% { transform: scale(1); box-shadow: 0 0 20px #2E8B57; }
    50% { transform: scale(1.05); box-shadow: 0 0 35px #FFD700; }
    100% { transform: scale(1); box-shadow: 0 0 20px #2E8B57; }
}

/* 播放器容器 (保持 V1 风格以免过于突兀) */
.player-container { width: 100%; aspect-ratio: 16 / 9; background: #000; margin-bottom: 1.5rem; border-radius: 12px; border: 2px solid var(--neon-blue); box-shadow: 0 0 25px var(--neon-blue); animation: pulse-border 3s infinite ease-in-out; }
@keyframes pulse-border { 0% { box-shadow: 0 0 20px var(--neon-blue); } 50% { box-shadow: 0 0 30px var(--neon-pink); } 100% { box-shadow: 0 0 20px var(--neon-blue); } }

/* 正在播放条：同步改为 V2 样式，视觉更统一 */
.now-playing-bar { 
    background: linear-gradient(90deg, #FFD700, #00FF7F); 
    color: #000; 
    font-weight: bold; 
    text-align: center; 
    padding: 10px; 
    margin-bottom: 1.5rem; 
    border-radius: 8px; 
}

/* --- 10. 简介与标签 --- */
.video-description-section { background-color: rgba(18,18,18,0.7); padding: 20px; border-radius: 12px; margin-bottom: 2rem; color: #ccc; }
.video-tags-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid #444; }
.video-tags-section strong { margin-right: 10px; color: #fff; }
.tag-link { display: inline-block; background-color: rgba(0,0,0,0.5); border: 1px solid var(--neon-blue); color: #ccc; padding: 5px 12px; margin: 4px; border-radius: 15px; transition: all 0.2s; }
.tag-link:hover { background-color: var(--neon-blue); color: #000; }

/* --- 11. 弹窗样式 --- */
#age-gate-overlay, #popup-notice-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; align-items: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 9999; }
#age-gate-modal-content, .popup-notice-content { background: #2c2c2e; color: #e5e5e7; padding: 25px 30px; border-radius: 12px; text-align: center; max-width: 500px; width: 90%; border: 1px solid #444; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); position: relative; animation: fadeIn .3s ease-out; }
#age-gate-title, .popup-title { color: #fff; margin-top: 0; margin-bottom: 20px; font-size: 1.5em; padding-bottom: 0.75rem; border-bottom: 1px solid #495057; }
#age-gate-modal-content p, .popup-body p { line-height: 1.7; margin-bottom: 25px; }
.popup-body { text-align: left; margin-bottom: 1rem; }
.popup-body strong { color: #ffc107; }
.modal-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 1.5rem; }
.modal-buttons button { padding: 12px 25px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 1em; transition: all 0.2s ease-in-out; }
#age-gate-enter-btn { background-color: #007bff; color: white; }
#age-gate-leave-btn { background-color: #6c757d; color: white; }
#age-gate-enter-btn:hover { background-color: #0056b3; transform: translateY(-2px); }
#age-gate-leave-btn:hover { background-color: #5a6268; }
.popup-close-btn { position: absolute; top: 10px; right: 15px; background: transparent; border: none; font-size: 2.5rem; color: #aaa; cursor: pointer; line-height: 1; padding: 0; text-shadow: none; opacity: 0.7; z-index: 10; transition: color 0.2s, transform 0.2s, opacity 0.2s; }
.popup-close-btn:hover { color: #fff; opacity: 1; transform: scale(1.1); }

/* --- 12. SEO 与其他 --- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.home-category-section { margin-bottom: 2rem; }
.static-page-content { color: #ccc; line-height: 1.8; font-size: 0.9em; }
.static-page-content h5 { color: var(--neon-blue); margin-top: 1.5rem; }

/* 移动端子导航强制 4 列修正 */
@media (max-width: 768px) {
    .sub-nav-list { display: flex; flex-wrap: wrap; gap: 6px !important; justify-content: center; padding: 0 5px; }
    .sub-nav-item {
        flex: 0 0 calc(25% - 6px) !important; width: calc(25% - 6px) !important; max-width: calc(25% - 6px) !important;
        padding: 4px 0 !important; font-size: 12px !important; text-align: center;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 !important; box-sizing: border-box;
    }
}

/* ===============================
   13. 热门推荐 - 滚动样式优化
 ================================= */
.scrolling-wrapper {
    width: 100%;
    overflow: hidden;
    margin-bottom: 2.5rem;
    /* 增加两侧渐变遮罩，让滚动消失得更自然 */
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.scrolling-content {
    display: flex;
    width: fit-content;
    /* 速度调整为 40s，丝滑流畅 */
    animation: scroll-left 40s linear infinite;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); } /* 滚动一半距离，实现无缝衔接 */
}

/* 鼠标悬停暂停 */
.scrolling-wrapper:hover .scrolling-content {
    animation-play-state: paused;
}

.scroll-item {
    position: relative;
    flex-shrink: 0;
    width: 300px;
    margin: 0 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--neon-blue); 
    transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.scroll-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--neon-pink);
    border-color: var(--neon-pink);
    z-index: 10;
}

.scroll-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* 【新增】滚动项内部样式 */
.scroll-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.scroll-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    transition: background 0.3s;
}

.scroll-item:hover .scroll-caption {
    background: rgba(0,0,0,0.9);
    color: var(--neon-pink);
}

@media (max-width: 768px) {
    .scroll-item {
        width: 220px;
    }
}


/* 修复移动端导航 */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 5px;
  }

  .main-navigation {
    width: 100%;
    order: 3;
    margin: 10px 0 0 0;
    padding: 0;
    overflow: hidden;
  }

  .main-navigation .nav-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 15px 10px 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .main-navigation .nav-list::-webkit-scrollbar {
    display: none;
  }

  .main-navigation .nav-list li {
    flex: 0 0 auto;
    margin-right: 12px;
  }
}


/* ==================================================
   文字公告
=================================================== */
.ad-return-notice {
    background-color: rgba(26, 26, 46, 0.9); /* 匹配主体背景色 */
    border: 1px solid var(--neon-purple);     /* 紫色霓虹边框 */
    border-left: 4px solid var(--neon-blue);  /* 左侧青色强调条 */
    color: var(--neon-blue);                  /* 青色霓虹文字 */
    padding: 12px 20px;
    margin: 0 0 20px 0;                       /* 调整间距 */
    border-radius: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 增加霓虹发光动感 */
    box-shadow: 0 0 15px rgba(157, 0, 255, 0.2), inset 0 0 10px rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* 图标：使用粉色霓虹增加警示感 */
.ad-return-notice i {
    margin-right: 12px;
    color: var(--neon-pink);
    font-size: 1.2rem;
    text-shadow: 0 0 8px var(--neon-pink);
}

/* 移动端适配：确保手机端排版整齐 */
@media (max-width: 768px) {
    .ad-return-notice {
        font-size: 0.85rem;
        padding: 10px 15px;
        text-align: left;
        justify-content: flex-start; /* 手机端居左更易阅读 */
        line-height: 1.5;
    }
    
    .ad-return-notice i {
        font-size: 1rem;
        margin-right: 8px;
    }
}