/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body {
    background-color: #0a0a0a;
    color: #ccc;
    line-height: 1.6;
    font-size: 14px;
}

a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #e50914;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ========== 妖娆 LOGO ========== */
.logo-text {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(45deg, #ff0000, #ff4444, #ff7878, #e50914, #ff4444);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoGlow 3s ease-in-out infinite alternate;
    line-height: 1.2;
    display: inline-block;
    transition: all 0.3s;
}

.logo-text:hover {
    filter: brightness(1.3);
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.9), 0 0 60px rgba(229, 9, 20, 0.7);
}

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

/* 头部样式 */
.header {
    background-color: #1a1a1a;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    width: 40%;
    position: relative;
}

.search-box input {
    width: 100%;
    height: 35px;
    padding: 0 15px 0 20px;
    border: 1px solid #444;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    background: #2a2a2a;
    color: #ccc;
}

.search-box input:focus {
    border-color: #e50914;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background-color: #e50914;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 导航样式 */
.main-nav {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
}

.nav-list {
    display: flex;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: #ccc;
}

.nav-item.active > a,
.nav-item > a:hover {
    color: #e50914;
}

/* 向下箭头 */
.nav-item.has-submenu > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 12px;
    vertical-align: middle;
    display: inline-block;
    transition: transform 0.3s;
}

/* 下拉菜单 */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    border-radius: 0 0 6px 6px;
    z-index: 100;
    display: none;
}

.nav-item.has-submenu:hover .submenu {
    display: block;
}

.submenu li a {
    display: block;
    padding: 10px 20px;
    color: #ccc;
    transition: all 0.2s;
}

.submenu li a:hover,
.submenu li a.active {
    background-color: #333;
    color: #e50914;
    padding-left: 25px;
}

/* 主要内容区 */
.main-content {
    padding: 20px 0;
}

.section-title {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e50914;
    display: inline-block;
    color: #fff;
}

.section-title i {
    margin-right: 8px;
    color: #e50914;
}

/* Banner样式 */
.banner {
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 5px;
}

.banner-slider {
    position: relative;
    height: 450px;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-item.active {
    opacity: 1;
    z-index: 1;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
}

.banner-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.banner .container {
    position: relative;
}

.banner-controls {
    position: absolute;
    bottom: 20px;
    right: 50px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.banner-prev,
.banner-next {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.banner-prev:hover,
.banner-next:hover {
    background-color: #e50914;
}

.banner-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #e50914;
}

/* ========== 视频模块 PC 4列 3:2 比例 ========== */
.movie-section {
    margin-bottom: 30px;
}

.movie-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.movie-item {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.movie-pic {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background-color: #111;
}

.movie-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.movie-item:hover .movie-pic img {
    transform: scale(1.05);
}

.movie-rating {
    position: absolute;
    top: 4px;
    right: 0px;
    background: linear-gradient(135deg, #e50914, #ff4444);
    color: white;
    width: 30px;
    height: 16px;
    border-radius: 12%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.movie-info {
    padding: 1px 1px 1px;
}

.movie-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    line-height: 1.4;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
}

.movie-area,
.movie-year,
.movie-category {
    padding: 3px 8px;
    background-color: rgba(229, 9, 20, 0.12);
    border-radius: 12px;
    color: #ccc;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 友情链接 */
.links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background-color: #1a1a1a;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.links-list a {
    color: #ccc;
    padding: 5px 10px;
}

.links-list a:hover {
    color: #e50914;
    background-color: #333;
    border-radius: 3px;
}

/* 筛选条 */
.filter-bar {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.filter-group {
    margin-bottom: 10px;
}

.filter-label {
    display: inline-block;
    width: 60px;
    font-weight: bold;
    color: #ccc;
}

.filter-item {
    display: inline-block;
    padding: 5px 12px;
    margin-right: 10px;
    margin-bottom: 10px;
    background-color: #2a2a2a;
    border-radius: 3px;
    color: #ccc;
}

.filter-item.active {
    background-color: #e50914;
    color: white;
}

.filter-item:hover:not(.active) {
    background-color: #3a3a3a;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    padding: 15px;
}

.page-btn,
.page-num {
    display: inline-block;
    padding: 8px 15px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 3px;
    color: #ccc;
}

.page-btn:hover,
.page-num:hover:not(.active) {
    background-color: #3a3a3a;
    border-color: #666;
}

.page-num.active {
    background-color: #e50914;
    color: white;
    border-color: #e50914;
}

.page-ellipsis {
    padding: 0 10px;
    color: #aaa;
}

/* 播放页 */
.movie-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #fff;
}

.player-container {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    padding-top: 61.25%;
}

.player-container .MacPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.play-sources {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.sources-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #ccc;
}

.sources-title i {
    color: #e50914;
    margin-right: 5px;
}

.source-item {
    display: inline-block;
    line-height: 36px;
    text-align: center;
    background-color: #2a2a2a;
    border-radius: 3px;
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 5px 10px;
    color: #ccc;
}

.source-item.active {
    background-color: #e50914;
    color: white;
}

.movie-details {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.movie-poster {
    width: 200px;
    flex-shrink: 0;
}

.movie-poster img {
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.movie-info h2 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #fff;
}

.movie-english-name {
    color: #aaa;
    margin-bottom: 15px;
    font-style: italic;
}

.movie-meta p {
    margin-bottom: 8px;
    color: #ccc;
}

.movie-meta strong {
    display: inline-block;
    width: 60px;
    color: #aaa;
}

.rating {
    color: #e50914;
    font-weight: bold;
}

.movie-description {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.movie-description h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #fff;
}

.movie-description h3 i {
    color: #e50914;
    margin-right: 5px;
}

.movie-description p {
    margin-bottom: 10px;
    text-align: justify;
    color: #ccc;
}

.related-movies {
    margin-top: 30px;
}

.related-movies h3 {
    color: #fff;
    margin-bottom: 10px;
}

.related-movies .movie-list {
    margin-top: 10px;
}

/* 页脚 */
.footer {
    background-color: #111;
    color: #888;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    font-size: 13px;
}

.footer-content a {
    color: #aaa;
    margin: 0 5px;
}

.footer-content a:hover {
    color: #e50914;
}

.disclaimer {
    max-width: 800px;
    margin: 0 auto;
    font-size: 12px;
    color: #777;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .banner-slider {
        height: 350px;
    }
    .search-box {
        width: 35%;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    .logo-text {
        font-size: 28px;
        letter-spacing: 2px;
    }
    .search-box {
        flex: 1;
        width: auto;
    }

    .nav-list {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .nav-list::-webkit-scrollbar {
        display: none;
    }
    .nav-item {
        flex-shrink: 0;
    }
    .nav-item > a {
        padding: 12px 15px;
        font-size: 14px;
    }

    .nav-item.has-submenu:hover .submenu {
        display: none;
    }

    .movie-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .banner-slider {
        height: 250px;
    }
    .banner-info h3 {
        font-size: 18px;
    }
    .banner-info p {
        font-size: 12px;
    }

    .movie-details {
        flex-direction: column;
    }
    .movie-poster {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .banner-slider {
        height: 180px;
    }
    .banner-controls {
        bottom: 10px;
        right: 10px;
    }
    .banner-prev,
    .banner-next {
        width: 30px;
        height: 30px;
    }
    .movie-list {
        gap: 10px;
    }
    .section-title {
        font-size: 18px;
    }
    .page-btn,
    .page-num {
        padding: 5px 10px;
        font-size: 12px;
    }
    .player-container iframe {
        height: 200px;
    }
    .movie-title {
        font-size: 20px;
    }
}
/* ========== 移动端菜单按钮与下拉菜单 ========== */
.mobile-menu-btn {
    display: none;                  /* 默认隐藏，手机端显示 */
    background: none;
    border: none;
    color: #ccc;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}
.mobile-menu-btn:hover {
    color: #e50914;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;             /* 手机端显示菜单按钮 */
    }

    /* 导航默认隐藏，点击按钮后展开 */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #1a1a1a;
        z-index: 200;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    }
    .main-nav.mobile-open {
        display: block;
    }

    /* 展开后导航恢复竖向排列，清除横向滑动 */
    .main-nav .nav-list {
        flex-direction: column;
        overflow-x: visible;
        flex-wrap: wrap;
    }
    .nav-item {
        flex-shrink: 1;
        width: 100%;
    }
    .nav-item > a {
        padding: 12px 20px;
        border-bottom: 1px solid #333;
    }

    /* 子菜单在展开时直接显示，不再悬浮 */
    .has-submenu .submenu {
        position: static;
        display: block;
        background: none;
        box-shadow: none;
        border-radius: 0;
        min-width: auto;
        padding-left: 20px;
    }
    .submenu li a {
        padding: 10px 20px;
        font-size: 14px;
        color: #aaa;
        border-bottom: 1px solid #2a2a2a;
    }
    .submenu li a:hover,
    .submenu li a.active {
        background: none;
        color: #e50914;
        padding-left: 20px;
    }
}
/* ========== 手机端：点击主菜单展开子菜单（:focus-within） ========== */
@media (max-width: 768px) {
    /* 主菜单链接可聚焦 */
    .has-submenu > a {
        -webkit-tap-highlight-color: transparent;
    }

    /* 当主菜单链接获得焦点时（点击后），显示子菜单 */
    .has-submenu:focus-within .submenu {
        display: block !important;
    }

    /* 子菜单在移动端绝对定位，避免撑开布局 */
    .has-submenu .submenu {
        position: absolute;
        left: 0;
        top: 100%;
        min-width: 160px;
        background-color: #2a2a2a;
        box-shadow: 0 4px 12px rgba(0,0,0,0.6);
        border-radius: 0 0 6px 6px;
        z-index: 200;
        display: none;
    }

    /* 保持横向滑动，子菜单浮层不影响滑动 */
    .nav-list {
        position: relative;
    }
}
/* ========== 移动端菜单按钮 + 侧边栏 ========== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ccc;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}
.mobile-menu-btn:hover { color: #e50914; }

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 300;
}
.mobile-nav-close {
    display: none;
    position: absolute;
    top: 15px; right: 15px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 24px;
    cursor: pointer;
    z-index: 310;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;            /* 显示汉堡按钮 */
    }

    /* 导航默认隐藏在屏幕右侧 */
    .main-nav {
        position: fixed;
        top: 0;
        right: -280px;             /* 隐藏在右侧 */
        width: 170px;
        height: 100%;
        background-color: #1a1a1a;
        box-shadow: -2px 0 10px rgba(0,0,0,0.5);
        z-index: 350;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding-top: 50px;
    }
    .main-nav.mobile-open {
        right: 0;                  /* 滑入显示 */
    }
    .main-nav.mobile-open .mobile-nav-overlay {
        display: block;
    }
    .main-nav .mobile-nav-close {
        display: block;
    }

    /* 导航列表竖向排列 */
    .main-nav .nav-list {
        flex-direction: column;
        overflow-x: visible;
        flex-wrap: nowrap;
    }
    .nav-item {
        flex-shrink: 1;
        width: 100%;
    }
    .nav-item > a {
        padding: 14px 20px;
        border-bottom: 1px solid #333;
        font-size: 16px;
    }

    /* 子菜单始终可见（不再依赖 hover） */
    .has-submenu .submenu {
        position: static;
        display: block;
        background: none;
        box-shadow: none;
        border-radius: 0;
        min-width: auto;
        padding-left: 20px;
    }
    .submenu li a {
        padding: 10px 25px;
        font-size: 14px;
        color: #aaa;
        border-bottom: 1px solid #222;
    }
    .submenu li a:hover,
    .submenu li a.active {
        background: #222;
        color: #e50914;
        padding-left: 25px;
    }

    /* 取消移动端 hover 下拉（避免冲突） */
    .nav-item.has-submenu:hover .submenu {
        display: block;            /* 因为已经 block，保持即可 */
    }
}
/* ===================== 移动端侧边栏菜单（新增/覆盖） ===================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
}
.mobile-menu-btn:hover { color: #e50914; }

/* 独立遮罩层 */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 340;
}
.mobile-nav-overlay.active {
    display: block;
}

/* 关闭按钮 */
.mobile-nav-close {
    display: none;
    position: absolute;
    top: 15px; right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 360;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }

    /* 导航侧边栏 */
    .main-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100%;
        background-color: #1a1a1a;
        box-shadow: -2px 0 10px rgba(0,0,0,0.5);
        z-index: 350;
        transition: right 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;   /* iOS 顺滑滚动 */
        padding-top: 50px;
    }
    .main-nav.mobile-open { right: 0; }
    .main-nav .mobile-nav-close { display: block; }

    /* 所有链接强制白色，清晰可见 */
    .main-nav .nav-list a {
        color: #fff !important;
        font-weight: 500;
    }

    /* 导航列表竖向 */
    .main-nav .nav-list {
        flex-direction: column;
        overflow-x: visible;
        flex-wrap: nowrap;
    }
    .nav-item { width: 100%; }
    .nav-item > a {
        padding: 14px 20px;
        border-bottom: 1px solid #333;
        font-size: 16px;
    }

    /* 子菜单始终可见 */
    .has-submenu .submenu {
        position: static;
        display: block;
        background: none;
        box-shadow: none;
        border-radius: 0;
        min-width: auto;
        padding-left: 20px;
    }
    .submenu li a {
        padding: 10px 25px;
        font-size: 14px;
        color: #bbb;
        border-bottom: 1px solid #222;
    }
    .submenu li a:hover,
    .submenu li a.active {
        background: #222;
        color: #e50914 !important;
        padding-left: 25px;
    }
}