/* =========================================
   1. 核心变量 (THEME: STRANGER THINGS RED)
   ========================================= */
:root {
    --bg-color: #0a0a12;
    --neon-red: #FF003C; 
    --neon-blue: #00f3ff; 
    --neon-green: #0aff0a;
    --text-glow: 0 0 10px var(--neon-red);
    --font-retro: 'Courier New', Courier, monospace;
    
    /* 导航栏变量 */
    --nav-height: 80px;
}

body {
    background-color: var(--bg-color);
    color: #e0e0e0;
    font-family: var(--font-retro);
    margin: 0;
    padding-bottom: 50px;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
input, textarea, select, button { font-family: inherit; }

.main-wrapper { position: relative; z-index: 5; }

/* CRT 扫描线 */
.crt-scanline {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none; z-index: 0;
}

/* =========================================
   3. 导航栏 (Stranger Things: Absolute Fixed)
   ========================================= */
:root {
    --nav-h: 80px;
    --st-red: #ff003c;
}

.st-navbar {
    height: var(--nav-h);
    padding: 0 40px;
    background: #000; /* 纯黑，不透光，保证清晰 */
    border-bottom: 1px solid rgba(255, 0, 60, 0.3);
    
    /* --- 强制对齐核心 --- */
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直绝对居中 */
    
    position: sticky; top: 0; z-index: 5000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
}

/* --- 1. 左侧 Logo (对齐修正) --- */
.st-logo {
    font-family: 'Georgia', 'Times New Roman', serif; /* 衬线体 */
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    
    /* 消除文字基线偏移 */
    line-height: 1; 
    display: flex; 
    align-items: center;
    height: 100%; 
    
    /* 镂空描边 */
    color: transparent;
    -webkit-text-stroke: 1.5px var(--st-red);
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.4);
    transition: 0.3s;
}

.st-logo:hover {
    color: var(--st-red);
    text-shadow: 0 0 25px var(--st-red);
}

/* --- 2. 右侧容器 (强制对齐) --- */
.st-nav-right {
    display: flex;
    align-items: center; /* 这一行保证所有子元素垂直居中 */
    gap: 20px;
    height: 100%;
}

/* --- 3. 按钮 (无框，纯SVG) --- */
.st-btn {
    background: transparent;
    border: none; /* 去掉方框 */
    padding: 8px;
    cursor: pointer;
    position: relative;
    
    /* 让SVG在按钮内居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.st-icon {
    width: 24px; height: 24px;
    fill: #aaa; /* 默认灰色 */
    transition: 0.3s;
}

/* 悬停特效：形状发光 (不是方框！) */
.st-btn:hover .st-icon {
    fill: #fff;
    filter: drop-shadow(0 0 5px var(--st-red)); /* 只有图标发光 */
    transform: scale(1.1);
}

/* 消息红点 */
.st-dot {
    position: absolute; top: 6px; right: 6px;
    width: 6px; height: 6px;
    background: var(--st-red);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--st-red);
    animation: pulse-red 1.5s infinite;
}

/* --- 4. 头像与菜单 --- */
.st-profile {
    position: relative;
    display: flex; align-items: center;
    height: 100%; cursor: pointer;
    margin-left: 10px;
}

/* 红色方块头像 */
.st-avatar {
    width: 36px; height: 36px;
    background: #000;
    border: 1px solid var(--st-red);
    color: var(--st-red);
    font-family: 'Georgia', serif;
    font-weight: bold; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s;
}

.st-profile:hover .st-avatar {
    background: var(--st-red); color: #000;
    box-shadow: 0 0 15px var(--st-red);
}

/* 下拉菜单 */
.st-dropdown {
    position: absolute; top: 65px; right: 0; width: 160px;
    background: #000; border: 1px solid var(--st-red);
    box-shadow: 0 10px 40px #000; padding: 10px 0;
    
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.2s ease;
}
.st-dropdown::before { content:''; position:absolute; top:-20px; left:0; width:100%; height:20px; }

.st-profile:hover .st-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.dd-header { padding:10px 20px; font-size:11px; color:#666; border-bottom:1px solid #222; margin-bottom:5px; }
.dd-link { display:block; padding:10px 20px; color:#ccc; text-decoration:none; font-size:13px; transition:0.2s; }
.dd-link:hover { background:var(--st-red); color:#fff; }
.dd-sep { height:1px; background:#222; margin:5px 0; }
.danger:hover { background:#fff; color:#f00; }

.st-login { color:#fff; font-weight:bold; text-decoration:none; font-size:14px; }
.st-login:hover { text-shadow:0 0 10px #fff; }

/* =========================================
   搜索全屏弹窗 (修复版)
   ========================================= */
.search-modal {
    /* 强制固定全屏 */
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.search-modal.open { opacity: 1; visibility: visible; }

.search-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); backdrop-filter: blur(5px);
}

.search-content {
    position: relative; z-index: 10000; width: 80%; max-width: 800px;
    text-align: center;
    transform: scale(0.9); transition: 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.search-modal.open .search-content { transform: scale(1); }

.st-input {
    width: 100%; background: transparent; border: none;
    border-bottom: 2px solid #333;
    color: #fff; font-family: 'Georgia', serif;
    font-size: 3rem; font-weight: bold;
    text-transform: uppercase; text-align: center;
    padding: 20px 0; outline: none; transition: 0.3s;
}
.st-input:focus {
    border-bottom-color: var(--st-red);
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
    box-shadow: 0 20px 30px -20px rgba(255, 0, 60, 0.3);
}

.search-tip { margin-top: 20px; color: #555; font-size: 12px; letter-spacing: 2px; }

@keyframes pulse-red { 0% {opacity:0.5;} 50% {opacity:1;} 100% {opacity:0.5;} }

@media (max-width: 768px) {
    .st-navbar { padding: 0 20px; }
    .st-input { font-size: 1.5rem; }
}
/* =========================================
   4. 布局容器与标题
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section-title {
    /* 左侧装饰线条改为红色 */
    border-left: 4px solid var(--neon-red);
    padding-left: 15px;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.5);
}

/* =========================================
   5. 影视列表 (卡片动态描边)
   ========================================= */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 30px;
    margin-top: 30px;
    align-items: stretch;
}

.movie-card {
    background: #101015;
    border: 1px solid #333;
    transition: all 0.3s ease;
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    /* 【修复】让卡片变成弹性盒子，强制上下撑满 */
    display: flex;
    flex-direction: column;
    height: 100%; 
}

/* 鼠标悬停时：触发红色呼吸灯描边 */
.movie-card:hover {
    transform: translateY(-8px);
    animation: neon-pulse-red 1.5s infinite alternate; /* 呼吸动画 */
    border-color: var(--neon-red);
}

.poster-wrapper {
    position: relative;
    overflow: hidden;
    /* 图片区域不伸缩，保持比例 */
    flex-shrink: 0; 
}

.movie-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    filter: grayscale(20%); /* 默认稍微灰一点 */
    transition: 0.5s;
}
.movie-card:hover .movie-poster {
    filter: grayscale(0%); /* 悬停变彩色 */
}

.movie-info {
    padding: 15px;
    background: linear-gradient(to bottom, #101015, #000);
    /* 【修复】让信息区填满剩余高度 */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* 标题在上，日期在下 */
    /* 新增下面这一行 */
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
}

.movie-title {
    color: #fff;
    /* 新增下面这一行：使用系统默认无衬线字体 (微软雅黑/苹方/Arial) */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0,0,0,0.8);
    /* 【修复】限制显示2行，并预留2行的高度，防止卡片参差不齐 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em; /* 强制预留两行高度 */
}

/* =========================================
   6. 移动端适配
   ========================================= */
@media (max-width: 768px) {
    .top-nav { padding: 0 15px; height: 60px; }
    .logo { font-size: 20px; }
    .user-nav { gap: 10px; }
    
    .movie-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
        padding: 0 5px;
    }
    .movie-title { font-size: 13px; }
    .movie-info { padding: 10px; }
}

/* =========================================
   7. 角标与标签 (精修版) - 【文字清晰度修复】
   ========================================= */
.badge-container {
    position: absolute; display: flex; flex-direction: column; gap: 6px;
    z-index: 20; pointer-events: none;
}
.badge-container.top-right { top: 8px; right: 8px; align-items: flex-end; }
.badge-container.bottom-left { bottom: 8px; left: 8px; align-items: flex-start; }

/* --- 修复版：右上角状态标签 (更新至/全N季) --- */
.season-badge {
    position: absolute;
    /* 核心修复：强制固定在右上角，远离底部的拥挤区域 */
    top: 0; 
    right: 0;
    bottom: auto; /* 清除底部定位 */
    
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 900; /* 字体加粗 */
    border-radius: 0 0 0 6px; /* 只圆左下角，稍微有设计感一点 */
    z-index: 50;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

/* 连载中：黑底 + 霓虹蓝字 + 边框发光 */
.season-badge.on-going {
    background: rgba(0, 0, 0, 0.9);
    color: var(--neon-blue);
    border-left: 1px solid var(--neon-blue);
    border-bottom: 1px solid var(--neon-blue);
    box-shadow: -2px 2px 10px rgba(0, 243, 255, 0.2);
}

/* 已完结：红底 + 白字 (Netflix风格) */
.season-badge.finished {
    background: var(--neon-red);
    color: #fff;
    box-shadow: -2px 2px 10px rgba(255, 0, 60, 0.4);
}

/* --- 底部状态 (播放/下载) 【修复重点】 --- */
.badge-status {
    padding: 3px 6px; 
    font-size: 10px; 
    font-weight: 900; /* 极粗字体 */
    border-radius: 3px; 
    border: 1px solid transparent;
    
    /* 【修复】强制黑底，确保文字清晰可见 */
    background: rgba(0, 0, 0, 0.95) !important; 
    backdrop-filter: blur(2px);
}

/* 可播放：绿色边框 + 绿色字 */
.badge-status.play { 
    color: var(--neon-green) !important; 
    border-color: var(--neon-green); 
    box-shadow: 0 0 8px rgba(10,255,10,0.2); 
    text-shadow: 0 0 5px rgba(10,255,10,0.5);
}

/* 可下载：蓝色边框 + 蓝色字 */
.badge-status.down { 
    color: var(--neon-blue) !important; 
    border-color: var(--neon-blue); 
    box-shadow: 0 0 8px rgba(0,243,255,0.2); 
    text-shadow: 0 0 5px rgba(0,243,255,0.5);
}

/* --- 底部类型 (电影/剧集) --- */
.type-badge {
    position: absolute; bottom: 8px; right: 8px; font-size: 10px; padding: 3px 6px; font-weight: 900; z-index: 20;
    color: #000 !important; text-transform: uppercase; border-radius: 2px; opacity: 1 !important;
}
.type-badge.bg-movie { background: #d63dfc !important; box-shadow: 0 0 8px #d63dfc; }
.type-badge.bg-series { background: #00f3ff !important; box-shadow: 0 0 8px #00f3ff; }
.type-badge.bg-anime { background: #ff9100 !important; box-shadow: 0 0 8px #ff9100; }
.type-badge.bg-variety { background: #ffee00 !important; box-shadow: 0 0 8px #ffee00; }

/* =========================================
   8. 播放页 (Player) - 【16:9 完美比例修复】
   ========================================= */
.player-wrapper {
    position: relative; 
    z-index: 9005; /* 确保在 CRT 扫描线之上 */
    border: 1px solid #333; 
    background: #000;
    box-shadow: 0 0 30px rgba(0,0,0,0.6); 
    margin-bottom: 20px;
    width: 100%;
}

.player-box { 
    width: 100%; 
    /* 核心修复：强制使用 16:9 比例，自动计算高度 */
    aspect-ratio: 16 / 9; 
    height: auto !important; /* 覆盖掉任何固定的高度设置 */
    position: relative; 
}

/* 针对 DPlayer 的内部修正 */
.dplayer {
    width: 100% !important;
    height: 100% !important;
}

/* 选集按钮：红色交互 */
.episode-list { display: flex; flex-wrap: wrap; gap: 10px; }
.ep-btn {
    background: #15151f; border: 1px solid #333; color: #aaa; padding: 10px 15px; transition: 0.3s;
}
.ep-btn:hover {
    border-color: var(--neon-red); color: #fff; box-shadow: 0 0 10px var(--neon-red);
}
.ep-btn.active {
    background: var(--neon-red); color: #fff; border-color: var(--neon-red); font-weight: bold;
    box-shadow: 0 0 15px var(--neon-red);
}

/* =========================================
   9. 身份验证 (Auth) - 红色主题
   ========================================= */
.auth-wrapper { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.neon-card {
    background: rgba(16, 16, 20, 0.95); border: 1px solid #333; padding: 30px; width: 100%; max-width: 420px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8); position: relative; overflow: hidden; border-radius: 8px; z-index: 8000; 
}
.neon-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    /* 顶部光条改为红色主导 */
    background: linear-gradient(90deg, #000, var(--neon-red), #000);
    animation: scan-light 3s infinite linear;
}
.auth-title { font-size: 24px; text-align: center; margin-bottom: 25px; color: #fff; letter-spacing: 2px; text-shadow: 0 0 10px var(--neon-red); }
.input-group { margin-bottom: 20px; }
.input-label { display: block; color: #888; font-size: 12px; margin-bottom: 8px; text-transform: uppercase; }

.neon-input {
    width: 100%; background: #050508; border: 1px solid #333; color: var(--neon-red);
    padding: 12px; box-sizing: border-box;
}
.neon-input:focus { border-color: var(--neon-red); outline: none; box-shadow: 0 0 10px rgba(255,0,60,0.2); }

.neon-btn-block {
    width: 100%; padding: 12px; background: transparent; border: 1px solid var(--neon-red); color: var(--neon-red);
    font-weight: bold; cursor: pointer; transition: 0.3s; text-transform: uppercase; margin-top: 10px;
}
.neon-btn-block:hover { background: var(--neon-red); color: #fff; box-shadow: 0 0 20px var(--neon-red); }

.auth-link { display: block; text-align: center; margin-top: 20px; font-size: 12px; color: #666; }
.alert-box { background: rgba(255,0,60,0.1); border-left: 3px solid var(--neon-red); color: #ffcccc; padding: 10px; margin-bottom: 20px; }

/* =========================================
   10. 开场遮罩 (修复霓虹效果)
   ========================================= */
#intro-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #000;
    background-image: radial-gradient(circle, #200 0%, #000 80%); /* 改为暗红色背景 */
    z-index: 10000; 
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    transition: opacity 0.8s ease-out;
}

/* 修复：增强欢迎文字的红色霓虹效果 */
.welcome-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff; /* 核心白 */
    text-align: center;
    /* 多层阴影叠加实现强发光 */
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--neon-red),
        0 0 40px var(--neon-red),
        0 0 80px var(--neon-red),
        0 0 100px var(--neon-red);
    animation: heavy-flicker 4s infinite; /* 新的闪烁动画 */
}

/* 按钮样式更新为红色 */
.btn-enter {
    margin-top: 50px; background: transparent; 
    border: 2px solid var(--neon-red); color: var(--neon-red);
    padding: 15px 40px; cursor: pointer; 
    box-shadow: 0 0 10px var(--neon-red), 0 0 20px var(--neon-red) inset;
    font-size: 1.2rem; letter-spacing: 3px; font-weight: bold;
    text-shadow: 0 0 5px var(--neon-red);
    transition: 0.3s;
}
.btn-enter:hover {
    background: var(--neon-red); color: #fff;
    box-shadow: 0 0 40px var(--neon-red);
}

/* 弹窗 */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 10001; backdrop-filter: blur(5px);
}
.modal-window {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 400px; background: #100; border: 1px solid var(--neon-red); box-shadow: 0 0 20px rgba(255,0,60,0.3);
}
.modal-header { padding: 15px; background: rgba(255,0,60,0.1); border-bottom: 1px solid #333; display: flex; justify-content: space-between; color: var(--neon-red); }
.modal-body { padding: 20px; }
.dl-link { display: block; padding: 12px; margin-bottom: 10px; background: #1a0505; color: #fff; border: 1px solid #333; }
.dl-link:hover { border-color: var(--neon-red); color: var(--neon-red); box-shadow: 0 0 10px rgba(255,0,60,0.2); }

/* 动画定义 */
@keyframes scan-light {
    0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; }
}
@keyframes pulse-border {
    0% { box-shadow: 0 0 5px var(--neon-blue); } 50% { box-shadow: 0 0 12px var(--neon-blue); } 100% { box-shadow: 0 0 5px var(--neon-blue); }
}
/* 强烈的故障闪烁 */
@keyframes heavy-flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 1; }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.4; }
}

/* =========================================
   影视级开场动画 (Cinema Glitch Intro)
   ========================================= */

/* 1. 容器与背景氛围 */
#intro-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    /* 深红各向异性背景 */
    background: radial-gradient(circle at center, #1a0505 0%, #000 80%);
    z-index: 10000;
    display: flex; justify-content: center; align-items: center;
    overflow: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s ease-in;
}

/* 背景网格线 (增加科技感) */
.intro-grid {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: 
        linear-gradient(rgba(255, 0, 60, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 60, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    perspective: 500px;
    transform: scale(1.2);
    opacity: 0.5;
    pointer-events: none;
}

.intro-content {
    position: relative; z-index: 2; text-align: center;
}

/* 2. 故障标题特效 (核心) */
.glitch-title {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    position: relative;
    letter-spacing: 5px;
    margin-bottom: 20px;
    /* 强烈的红色发光 */
    text-shadow: 
        0 0 10px rgba(255, 0, 60, 0.8),
        0 0 20px rgba(255, 0, 60, 0.6),
        0 0 40px rgba(255, 0, 60, 0.4);
    animation: title-float 3s ease-in-out infinite alternate;
}

/* 利用伪元素制作红蓝错位重影 */
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; /* 遮挡底字 */
    overflow: hidden;
    opacity: 0.8;
}

/* 红色重影层 */
.glitch-title::before {
    left: 2px;
    text-shadow: -2px 0 #ff003c;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

/* 蓝色重影层 */
.glitch-title::after {
    left: -2px;
    text-shadow: -2px 0 #00f3ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

/* 3. 状态文字 */
.intro-status {
    color: var(--neon-red);
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 60px;
    opacity: 0.8;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.status-dot {
    width: 8px; height: 8px; background: var(--neon-red); border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-red);
    animation: pulse-dot 1s infinite;
}

/* 4. 科技感按钮 */
.btn-enter-glitch {
    position: relative;
    padding: 15px 40px;
    background: transparent;
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 3px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 0 15px rgba(255, 0, 60, 0.2);
}

.btn-enter-glitch:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 30px var(--neon-red), 0 0 10px var(--neon-red) inset;
    transform: scale(1.05);
}

/* 按钮上的扫描线装饰 */
.btn-decor {
    position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-25deg);
    animation: btn-scan 3s infinite;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .glitch-title { font-size: 3rem; }
}

/* ================== 动画关键帧 ================== */

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 10px, 0); }
    5% { clip: rect(60px, 9999px, 90px, 0); }
    10% { clip: rect(80px, 9999px, 10px, 0); }
    15% { clip: rect(10px, 9999px, 90px, 0); }
    20% { clip: rect(20px, 9999px, 20px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip: rect(50px, 9999px, 10px, 0); }
    5% { clip: rect(10px, 9999px, 60px, 0); }
    10% { clip: rect(90px, 9999px, 20px, 0); }
    15% { clip: rect(20px, 9999px, 80px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

@keyframes title-float {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-5px); opacity: 0.9; }
}

@keyframes pulse-dot {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes btn-scan {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* =========================================
   11. 幻灯片 (Fixed: Full Width & 2.35:1 Ratio)
   ========================================= */

/* 防止全宽导致横向滚动条 */
body { overflow-x: hidden; }

.carousel-container {
    position: relative;
    
    /* --- 1. 强制全宽策略 --- */
    width: 100vw; 
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    left: 50%;
    right: 50%;
    transform: translateX(-50%);
    
    /* --- 2. 锁定 2.35:1 电影比例 --- */
    height: auto;
    aspect-ratio: 2.35 / 1;
    
    overflow: hidden; 
    background: #000;
    margin-bottom: 0; 
    box-shadow: 0 10px 30px #000;
    user-select: none;
    z-index: 10;
}

.carousel-viewport { width: 100%; height: 100%; overflow: hidden; }

.carousel-track {
    display: flex;
    height: 100%;
    will-change: transform;
    /* 强制不换行 */
    flex-wrap: nowrap; 
}

.carousel-slide {
    /* --- 3. 核心布局修复 --- */
    /* flex-grow:0, flex-shrink:0 (禁止收缩), flex-basis:65% */
    flex: 0 0 65%; 
    width: 65%; /* 双重保险 */
    height: 100%;
    
    margin: 0 0.5%; /* 间距 */
    
    background-size: cover; 
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    
    /* 默认状态：暗、稍微缩小 */
    filter: brightness(0.3) saturate(0.5); 
    transform: scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1; /* 默认层级 */
}

/* --- 4. 激活状态高亮 --- */
.carousel-slide.active {
    filter: brightness(1) saturate(1.1); /* 恢复亮度 */
    transform: scale(1); /* 恢复大小 */
    z-index: 10; /* 核心：层级最高，浮在遮罩之上 */
    box-shadow: 0 0 50px rgba(0,0,0,0.8); /* 增加立体感 */
}

/* 图片内部的暗角遮罩 */
.carousel-vignette {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, #000 0%, transparent 60%),
                linear-gradient(90deg, rgba(0,0,0,0.8) 0%, transparent 40%);
    z-index: 2;
    pointer-events: none;
}

/* --- 5. 容器两侧的渐变遮罩 (修复右侧纯黑问题) --- */
.carousel-container::before, .carousel-container::after {
    content: ''; position: absolute; top: 0; 
    width: 15%; /*稍微变窄，露更多图*/
    height: 100%; 
    z-index: 5; /* 层级低于 active 的 slide (10) */
    pointer-events: none;
}
/* 左侧渐变：黑 -> 透明 */
.carousel-container::before { 
    left: 0; 
    background: linear-gradient(to right, #000 0%, transparent 100%); 
}
/* 右侧渐变：透明 <- 黑 */
.carousel-container::after { 
    right: 0; 
    background: linear-gradient(to left, #000 0%, transparent 100%); 
}

/* 内容布局 */
.carousel-content {
    position: absolute; bottom: 10%; left: 5%; 
    z-index: 11; /* 文字层级最高 */
    max-width: 80%; 
    color: #fff;
    opacity: 0; transform: translateY(20px); transition: 0.5s;
}
.carousel-slide.active .carousel-content { opacity: 1; transform: translateY(0); }

.slide-title {
    font-family: 'Georgia', serif; 
    font-size: 3.5vw; 
    font-weight: 700;
    margin: 10px 0 20px 0; 
    text-shadow: 0 5px 15px #000;
    line-height: 1.2;
}

/* 品牌与按钮 */
.meta-line { display: flex; align-items: center; gap: 10px; font-size: 0.9vw; font-weight: bold; letter-spacing: 2px; }
.brand-tag { color: var(--neon-red); }
.action-row { display: flex; gap: 15px; }
.hero-btn { 
    display: inline-flex; align-items: center; gap: 8px; 
    padding: 0.8vw 2.5vw; border-radius: 4px; 
    font-size: 1vw; font-weight: bold; text-decoration: none; transition: 0.3s; 
}
.hero-btn.primary { background: #fff; color: #000; }
.hero-btn.primary:hover { background: #ddd; transform: translateY(-2px); }

/* 左右箭头 */
.carousel-btn {
    position: absolute; top: 0; width: 10%; height: 100%;
    background: transparent; border: none; color: #fff; font-size: 3rem;
    cursor: pointer; z-index: 20; opacity: 0; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.carousel-container:hover .carousel-btn { opacity: 0.6; }
.carousel-btn:hover { opacity: 1 !important; text-shadow: 0 0 20px var(--neon-red); }
.prev-btn { left: 0; }
.next-btn { right: 0; }

/* 指示器 */
.carousel-indicators {
    position: absolute; bottom: 15px; width: 100%;
    display: flex; justify-content: center; gap: 8px; z-index: 20;
}
.indicator-dot { width: 30px; height: 3px; background: rgba(255,255,255,0.2); cursor: pointer; transition: 0.3s; }
.indicator-dot.active { background: transparent; border: 1px solid var(--neon-red); box-shadow: 0 0 10px var(--neon-red); transform: scaleY(1.5); }

/* 移动端适配 */
@media (max-width: 768px) {
    .carousel-container { aspect-ratio: 16 / 9; min-height: 250px; }
    .carousel-slide { flex: 0 0 85%; width: 85%; } 
    .carousel-content { left: 20px; bottom: 30px; max-width: 85%; }
    .slide-title { font-size: 1.8rem; }
    .meta-line { font-size: 10px; }
    .hero-btn { padding: 8px 20px; font-size: 12px; }
}

/* =========================================
   12. 新增：怪奇物语倒计时 (Countdown)
   ========================================= */
.countdown-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #000;
    border: 2px solid #333;
    border-top: 2px solid var(--neon-red); /* 顶部红线 */
    padding: 15px 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 15px rgba(255,0,60,0.1);
    position: relative;
    overflow: hidden;
}

/* 红色微光扫描背景 */
.countdown-bar::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,0,60,0.05) 50%, transparent 60%);
    background-size: 200% 200%;
    animation: scan-light 4s infinite;
    pointer-events: none;
}

.cd-left .cd-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: #fff;
    text-shadow: 2px 2px 0px var(--neon-red); /* 复古重影 */
    text-transform: uppercase;
}

.cd-right {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Courier New', monospace; /* 打字机字体 */
}

.timer-box {
    text-align: center;
    color: var(--neon-red);
}

.timer-box span {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    text-shadow: 0 0 10px var(--neon-red);
}

.timer-box small {
    font-size: 0.6rem;
    color: #666;
    letter-spacing: 1px;
}

.timer-sep {
    font-size: 1.5rem; color: #444; margin-top: -15px;
}

@media (max-width: 768px) {
    .countdown-bar { flex-direction: column; gap: 15px; text-align: center; padding: 15px; }
    .cd-left .cd-title { font-size: 1.2rem; }
    .timer-box span { font-size: 1.5rem; }
}

/* =========================================
   14. 播放页新版 UI (Watch New)
   ========================================= */
.movie-header-bar {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 30px; border-bottom: 1px solid #333; padding-bottom: 20px;
}
.mh-left h1 { margin: 0 0 10px 0; font-size: 2rem; text-shadow: 0 0 10px var(--neon-red); }
.meta-tags { display: flex; gap: 10px; }
.tag { background: #222; padding: 2px 8px; font-size: 0.8rem; border-radius: 3px; color: #aaa; }
.tag.date { color: var(--neon-blue); border: 1px solid var(--neon-blue); }

.mh-right { display: flex; gap: 15px; }
.action-btn {
    background: transparent; border: 1px solid #444; color: #888;
    padding: 8px 20px; cursor: pointer; font-weight: bold; transition: 0.3s;
    display: flex; align-items: center; gap: 5px;
}
.action-btn:hover { border-color: #fff; color: #fff; }
.action-btn.active { 
    background: var(--neon-red); border-color: var(--neon-red); color: #fff; 
    box-shadow: 0 0 15px var(--neon-red);
}
.action-btn.download {
    border-color: var(--neon-blue); color: var(--neon-blue);
}
.action-btn.download:hover {
    background: var(--neon-blue); color: #000; box-shadow: 0 0 15px var(--neon-blue);
}

/* 选集按钮美化 */
.section-box { margin-bottom: 40px; background: #0a0a12; padding: 20px; border: 1px solid #222; }
.section-title { margin-top: 0; border-left: 3px solid var(--neon-blue); padding-left: 10px; color: #fff; }
.ep-btn {
    background: #111; color: #aaa; border: 1px solid #333; padding: 10px 20px; margin: 0 10px 10px 0;
    cursor: pointer; transition: 0.3s; font-family: inherit;
}
.ep-btn:hover { border-color: #fff; color: #fff; }
.ep-btn.active {
    background: var(--neon-blue); color: #000; border-color: var(--neon-blue); font-weight: bold;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* 评论区 */
.comment-form textarea {
    width: 100%; height: 80px; background: #000; border: 1px solid #333; color: #fff; padding: 10px;
    resize: vertical; box-sizing: border-box;
}
.comment-form textarea:focus { border-color: var(--neon-blue); outline: none; }
.comment-form button {
    margin-top: 10px; padding: 8px 25px; background: #222; color: #fff; border: 1px solid #444; cursor: pointer;
}
.comment-form button:hover { background: var(--neon-blue); color: #000; }

.comment-list { margin-top: 30px; }
.comment-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px dashed #333; padding-bottom: 20px; }
.cmt-avatar {
    width: 40px; height: 40px; background: #333; color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: bold;
}
.cmt-body { flex-grow: 1; }
.cmt-user { color: var(--neon-red); font-weight: bold; margin-bottom: 5px; }
.cmt-time { color: #555; font-size: 0.8rem; margin-left: 10px; font-weight: normal; }
.cmt-content { color: #ccc; line-height: 1.5; }

/* 下载弹窗 */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 10000; backdrop-filter: blur(5px);
}
.modal-window {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 90%; max-width: 400px; background: #111; border: 1px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}
.modal-header {
    background: rgba(0, 243, 255, 0.1); padding: 15px; color: var(--neon-blue);
    font-weight: bold; display: flex; justify-content: space-between;
    border-bottom: 1px solid #333;
}
.close-btn { cursor: pointer; font-size: 1.2rem; }
.modal-body { padding: 20px; }
.dl-link-item {
    display: flex; justify-content: space-between; padding: 12px;
    background: #000; border: 1px solid #333; margin-bottom: 10px;
    color: #fff; transition: 0.3s;
}
.dl-link-item:hover {
    border-color: var(--neon-blue); color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

@media (max-width: 768px) {
    .movie-header-bar { flex-direction: column; align-items: flex-start; gap: 15px; }
    .mh-right { width: 100%; justify-content: space-between; }
    .action-btn { flex-grow: 1; justify-content: center; padding: 8px; }
}

/* =========================================
   14. 播放页重构 (Modern Cinema Style)
   ========================================= */

/* 1. 主容器：限制最大宽度，居中，防止内容太散 */
.watch-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 2. 影院屏幕 (修复播放器缩成一团的问题) */
.cinema-screen {
    width: 100%;
    /* 强制 16:9 比例，确保像电影一样 */
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    position: relative;
}

/* 让 VideoJS 填满容器 */
.video-js { width: 100% !important; height: 100% !important; }

.no-source-box {
    height: 100%; display: flex; flex-direction: column; 
    align-items: center; justify-content: center; color: #444;
}

/* 3. 信息栏 (磨砂玻璃效果) */
.info-glass-panel {
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.info-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.ih-left h1 {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.ih-meta { display: flex; gap: 10px; }
.meta-badge {
    padding: 4px 10px; font-size: 12px; font-weight: bold; border-radius: 4px;
    letter-spacing: 1px;
}
.meta-badge.year { background: rgba(255,255,255,0.1); color: #aaa; }
.meta-badge.type { background: var(--neon-blue); color: #000; box-shadow: 0 0 10px var(--neon-blue); }

.ih-desc {
    color: #bbb; line-height: 1.8; font-size: 0.95rem;
}

/* 现代按钮 */
.ih-right { display: flex; gap: 10px; }
.modern-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #aaa;
    padding: 10px 20px;
    border-radius: 50px; /* 胶囊形状 */
    cursor: pointer;
    transition: 0.3s;
    display: flex; align-items: center; gap: 8px;
    font-size: 14px;
}
.modern-btn:hover {
    border-color: #fff; color: #fff; background: rgba(255,255,255,0.05);
}
.modern-btn.active {
    background: var(--neon-red); border-color: var(--neon-red); color: #fff;
    box-shadow: 0 0 15px rgba(255,0,60,0.4);
}
.modern-btn.download {
    border-color: var(--neon-blue); color: var(--neon-blue);
}
.modern-btn.download:hover {
    background: var(--neon-blue); color: #000; box-shadow: 0 0 15px var(--neon-blue);
}

/* 4. 选集 (网格化) */
.glass-section {
    background: rgba(20, 20, 25, 0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}
.section-head {
    margin-top: 0; font-size: 1.1rem; color: #fff;
    border-left: 3px solid var(--neon-red); padding-left: 12px; margin-bottom: 20px;
}

.ep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* 自动适应宽度 */
    gap: 12px;
}

.ep-item {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: #888;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: 0.3s;
    display: flex; flex-direction: column;
}
.ep-item:hover {
    border-color: #fff; color: #fff; transform: translateY(-2px);
}
.ep-item.active {
    background: var(--neon-red); border-color: var(--neon-red); color: #fff;
    box-shadow: 0 0 15px rgba(255,0,60,0.3);
}
.ep-num { font-size: 12px; opacity: 0.7; margin-bottom: 4px; }
.ep-name { font-weight: bold; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 5. 评论区 (聊天气泡风) */
.cmt-input-box form {
    display: flex; gap: 10px; margin-bottom: 30px;
}
.cmt-input-box textarea {
    flex-grow: 1; height: 50px; background: rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.1); border-radius: 25px;
    color: #fff; padding: 15px 20px; resize: none; outline: none; transition: 0.3s;
}
.cmt-input-box textarea:focus {
    border-color: var(--neon-blue); height: 80px;
}
.send-btn {
    width: 100px; border-radius: 25px; border: none; 
    background: #333; color: #fff; cursor: pointer; transition: 0.3s;
}
.send-btn:hover { background: var(--neon-blue); color: #000; }

.cmt-list { display: flex; flex-direction: column; gap: 15px; }
.cmt-card { display: flex; gap: 15px; }
.cmt-avatar {
    width: 40px; height: 40px; background: linear-gradient(45deg, #333, #555);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; border: 1px solid #666; flex-shrink: 0;
}
.cmt-content {
    background: rgba(255,255,255,0.05); padding: 12px 15px; border-radius: 0 15px 15px 15px;
    flex-grow: 1;
}
.cmt-top { margin-bottom: 5px; font-size: 12px; }
.cmt-user { color: var(--neon-blue); font-weight: bold; margin-right: 10px; }
.cmt-date { color: #555; }
.cmt-text { color: #ddd; font-size: 14px; line-height: 1.5; }

@media (max-width: 768px) {
    .cinema-screen { aspect-ratio: 16/9; height: auto; }
    .info-header { flex-direction: column; gap: 15px; }
    .ep-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================
   15. 季选择与VIP样式 (Fixed: Scrollable Tabs)
   ========================================= */

/* --- 季 Tab 容器 (横向滚动模式) --- */
.season-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    
    /* === 核心修复开始 === */
    overflow-x: auto;          /* 允许横向滚动 */
    overflow-y: hidden;        /* 禁止纵向 */
    flex-wrap: nowrap;         /* 强制不换行，这是解决“季数过多”的关键 */
    white-space: nowrap;       /* 强制文字不换行，这是解决“季字掉下去”的关键 */
    -webkit-overflow-scrolling: touch; /* 手机端顺滑滚动 */
    padding-bottom: 0;         /* 移除底部内边距，靠 border */
    
    /* 隐藏滚动条 (美观) */
    scrollbar-width: none;     /* Firefox */
    -ms-overflow-style: none;  /* IE 10+ */
    /* === 核心修复结束 === */
}

/* 隐藏 Chrome/Safari 的滚动条 */
.season-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.season-tab {
    padding: 10px 16px;       /*稍微增加内边距，方便手指点击*/
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
    font-weight: bold;
    letter-spacing: 1px;
    
    /* === 核心修复 === */
    flex-shrink: 0;           /* 禁止这个 Tab 被挤压，保持原始宽度 */
    white-space: nowrap;      /* 双重保险：禁止文字换行 */
}

.season-tab:hover { color: #fff; }

.season-tab.active {
    color: var(--neon-blue);
    border-bottom-color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

/* 隐藏非当前季的容器 */
.ep-grid.hidden { display: none; }

/* E01 E02 样式 */
.ep-num {
    font-family: 'Courier New', monospace;
    color: var(--neon-blue);
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

/* --- VIP 锁定界面 (拦截播放器) --- */
.vip-lock-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #050505;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    border-radius: 8px;
    text-align: center;
    color: #fff;
}

.lock-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px var(--neon-red);
}

.vip-lock-box h2 {
    margin: 0 0 10px 0;
    color: var(--neon-red);
    letter-spacing: 2px;
}

.vip-lock-box p {
    color: #888;
    margin-bottom: 30px;
}

.vip-btn {
    background: transparent;
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    padding: 10px 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.vip-btn:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 20px var(--neon-red);
}

/* 标题旁的 VIP 标签 */
.vip-tag {
    background: var(--neon-green);
    color: #000;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 10px;
    font-weight: 900;
    box-shadow: 0 0 10px var(--neon-green);
}

/* =========================================
   16. 分类导航栏 (Stranger Things Title Style)
   ========================================= */

.category-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* 间距拉大，更有呼吸感 */
    margin: 40px auto 20px;
    padding: 0;
    background: transparent; /* 去掉背景 */
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

/* 分隔符 (/) */
.category-filter .sep {
    color: #333;
    font-size: 14px;
    font-weight: bold;
    user-select: none;
}

/* 链接文字基础样式 */
.category-filter a {
    position: relative;
    padding: 5px 0; /* 上下留空间给横线 */
    font-family: 'Courier New', Courier, serif; /* 复古打字机/衬线字体 */
    font-size: 16px;
    font-weight: 900; /* 极粗 */
    color: #666; /* 默认暗淡 */
    text-decoration: none;
    text-transform: uppercase; /* 强制大写 */
    letter-spacing: 2px; /* 宽字间距 */
    transition: all 0.4s ease;
    border: none;
    background: transparent;
}

/* 鼠标悬停 */
.category-filter a:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    transform: scale(1.1); /* 微微放大 */
}

/* === 选中状态 (核心视觉) === */
.category-filter a.active {
    color: var(--neon-red); /* 标志性红色 */
    font-size: 20px; /* 选中项变大 */
    
    /* 红色霓虹光晕 */
    text-shadow: 
        0 0 10px var(--neon-red),
        0 0 20px rgba(255, 0, 60, 0.5);
        
    transform: scale(1.15);
    z-index: 10;
}

/* 上横线 (Logo 风格) */
.category-filter a.active::before {
    content: '';
    position: absolute;
    top: -5px; left: 0; width: 100%; height: 2px;
    background: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red);
    animation: expand-width 0.4s ease-out;
}

/* 下横线 (Logo 风格) */
.category-filter a.active::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 100%; height: 2px;
    background: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red);
    animation: expand-width 0.4s ease-out;
}

/* 横线展开动画 */
@keyframes expand-width {
    from { width: 0%; left: 50%; }
    to { width: 100%; left: 0; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .category-filter {
        gap: 15px;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 10px 20px;
        margin: 20px 0;
    }
    /* 手机上隐藏分隔符，直接排开 */
    .category-filter .sep { display: none; }
    
    .category-filter a {
        font-size: 14px;
        flex-shrink: 0;
    }
    .category-filter a.active {
        font-size: 16px;
    }
}

/* === 核心修复：强制冻结所有动画 === */
.stop-animations,
.stop-animations * {
    transition: none !important;
    animation: none !important;
}

/* =========================================
   移动端按钮栏优化：横向滑动不换行
   ========================================= */
@media (max-width: 768px) {
    /* 1. 容器改为横向滚动 */
    .ih-right {
        width: 100%;
        display: flex;
        gap: 10px; /* 按钮间距 */
        
        /* === 核心：横向滚动 === */
        overflow-x: auto;          /* 允许左右滑 */
        overflow-y: hidden;
        flex-wrap: nowrap;         /* 禁止换行 */
        justify-content: flex-start; /* 从左对齐 */
        
        /* 优化触摸体验 */
        -webkit-overflow-scrolling: touch; 
        
        /* 隐藏滚动条 */
        scrollbar-width: none; 
        padding-bottom: 5px; /* 预留一点底部空间 */
    }
    
    /* 隐藏 Chrome/Safari 滚动条 */
    .ih-right::-webkit-scrollbar {
        display: none; 
    }

    /* 2. 按钮防止挤压 */
    .modern-btn {
        /* 禁止按钮变形 */
        flex-shrink: 0; 
        white-space: nowrap; /* 禁止按钮内文字换行 */
        
        /*稍微改小一点内边距和字体，让一屏能多显示几个*/
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* =========================================
   下载弹窗样式 (Added for Watch Page)
   ========================================= */
.modal-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* 深色背景遮罩 */
    z-index: 10000;
    backdrop-filter: blur(5px); /* 毛玻璃效果 */
}

.modal-window {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a1a;
    width: 90%;
    max-width: 400px;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    background: #111;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: bold;
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #666;
    line-height: 1;
}
.close-btn:hover { color: #fff; }

.modal-body {
    padding: 20px;
    max-height: 60vh; /* 防止弹窗太高 */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #252525;
    color: #ddd;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.dl-link-item:hover {
    background: #333;
    border-color: var(--neon-red, #ff003c);
    color: #fff;
    transform: translateX(5px); /* 悬停微动特效 */
}

.dl-icon { font-size: 1.2em; }

/* --- 网盘图标样式 --- */
.dl-brand-icon {
    width: 20px;
    height: 20px;
    object-fit: contain; /* 保持图标比例 */
    margin-left: 8px;
    vertical-align: middle;
}

/* 如果没有匹配到图标，回退显示的文字/Emoji样式 */
.dl-fallback-icon {
    font-size: 1.2em;
    margin-left: 8px;
}

/* =========================================
   顶部主菜单样式 (Added for Navbar)
   ========================================= */
.st-main-menu {
    display: flex;
    gap: 30px;
    position: absolute; /* 绝对定位在中间 */
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    align-items: center;
}

.st-menu-link {
    color: #888;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

/* 悬停效果 */
.st-menu-link:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* 激活状态 (当前页面) */
.st-menu-link.active {
    color: var(--neon-red); /* 使用你主题定义的红色 */
    text-shadow: 0 0 10px var(--neon-red);
}

/* 激活状态下的小红点或下划线 */
.st-menu-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px; /* 贴在导航栏底部边缘 */
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red);
}

/* 移动端适配：屏幕太小时隐藏中间菜单，避免重叠 */
@media (max-width: 768px) {
    .st-main-menu {
        display: none; /* 手机端暂隐藏，或者你可以改为底部导航栏 */
    }
}