/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background-color: #0d0d0d;
    color: #e0e0e0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 顶部导航 ========== */
.header {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 15px 0;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
    font-size: 15px;
    font-weight: 500;
}

.nav-links a {
    color: #aaa;
    transition: color 0.3s;
    padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffd200;
    border-bottom: 2px solid #ffd200;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
}

.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #333;
    background: #1e1e1e;
    color: #fff;
    outline: none;
    width: 200px;
    transition: border-color 0.3s;
}

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

.search-box button {
    padding: 8px 18px;
    border-radius: 20px;
    border: none;
    background: #ffd200;
    color: #0d0d0d;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.search-box button:hover {
    background: #f0c000;
    transform: scale(1.02);
}

/* ========== 首页轮播 ========== */
.banner-slider {
    margin: 20px 0 30px;
    border-radius: 12px;
    overflow: hidden;
    background: #181818;
}

.banner-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.banner-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

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

/* ========== 通用标题 ========== */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 35px 0 18px 0;
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 10px;
}

.section-title h2 {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
}

.section-title .more-link {
    color: #888;
    font-size: 14px;
    transition: color 0.3s;
}

.section-title .more-link:hover {
    color: #ffd200;
}

/* ========== 影视卡片 & 推荐网格 ========== */
.movie-grid,
.vod-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.movie-card,
.vod-item {
    background: #181818;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: 1px solid #252525;
    display: flex;
    flex-direction: column;
}

.movie-card:hover,
.vod-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(255, 210, 0, 0.12);
    border-color: #ffd200;
}

.movie-poster,
.vod-item-pic {
    height: 250px;
    background: linear-gradient(145deg, #2a2a2a, #111);
    position: relative;
    overflow: hidden;
}

.movie-poster img,
.vod-item-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.badge,
.vod-item-badge,
.vod-status {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 210, 0, 0.9);
    color: #0d0d0d;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    z-index: 2;
}

.rating {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 13px;
    color: #ffd200;
    font-weight: 600;
    z-index: 2;
}

.movie-info,
.vod-item-title {
    padding: 12px 14px;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-info h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-info .meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

/* ========== 详情页核心排版 (兼容vod-detail) ========== */
.detail-wrapper,
.vod-detail {
    margin: 25px 0 40px;
}

.detail-header,
.detail-main {
    display: flex;
    gap: 30px;
    background: #151515;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #252525;
    margin-bottom: 25px;
}

.detail-poster,
.vod-pic {
    flex: 0 0 240px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 340px;
    background: #1e1e1e;
}

.detail-poster img,
.vod-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.detail-info,
.vod-info {
    flex: 1;
    min-width: 0; /* 防止内容撑破布局 */
}

.detail-title,
.vod-info h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.detail-meta,
.vod-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 20px;
    list-style: none;
}

.detail-meta .meta-item,
.vod-meta li {
    background: #1a1a1a;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #ccc;
    border: 1px solid #222;
}

.vod-meta li span {
    color: #888;
}

.detail-desc,
.vod-content {
    background: #151515;
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 25px;
    border: 1px solid #252525;
}

.detail-desc h3,
.vod-content h2,
.vod-play-list h2,
.vod-related h2 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #ffd200;
}

.detail-desc p,
.content-text {
    color: #aaa;
    line-height: 1.8;
    font-size: 14px;
}

.detail-actions,
.play-btn {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-play {
    padding: 10px 32px;
    background: #ffd200;
    color: #0d0d0d;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-play:hover {
    background: #f0c000;
    transform: scale(1.02);
}

.btn-fav {
    padding: 10px 24px;
    background: transparent;
    color: #fff;
    border: 2px solid #444;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-fav:hover {
    border-color: #ffd200;
    color: #ffd200;
}

/* ========== 播放列表 & 线路 ========== */
.playlist-section,
.vod-play-list {
    background: #151515;
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 25px;
    border: 1px solid #252525;
}

.playlist-group,
.play-line {
    margin-bottom: 16px;
}

.playlist-title,
.play-line h3 {
    font-size: 14px;
    color: #ffd200;
    margin-bottom: 10px;
}

.playlist-grid,
.play-url-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.playlist-item,
.url-item {
    padding: 6px 14px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #aaa;
    font-size: 13px;
    transition: all 0.2s;
}

.playlist-item:hover,
.playlist-item.active,
.url-item:hover {
    background: #ffd200;
    color: #0d0d0d;
    border-color: #ffd200;
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid #1a1a1a;
    color: #555;
    font-size: 14px;
    margin-top: 40px;
}

/* ========== 响应式断点优化 ========== */
@media (max-width: 992px) {
    .detail-header,
    .detail-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-poster,
    .vod-pic {
        flex: 0 0 200px;
        width: 200px;
        height: 280px;
    }

    .detail-actions,
    .play-btn {
        justify-content: center;
    }

    .detail-meta,
    .vod-meta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
        gap: 12px;
        border-top: 1px solid #2a2a2a;
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .search-box input {
        width: 130px;
    }

    .movie-grid,
    .vod-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .movie-poster,
    .vod-item-pic {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .vod-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .movie-poster,
    .vod-item-pic {
        height: 175px;
    }

    .detail-actions,
    .play-btn {
        flex-direction: column;
        width: 100%;
    }

    .btn-play,
    .btn-fav {
        width: 100%;
        text-align: center;
    }
}