/* 引入字体图标 */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

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

body {
    background-color: #0b0b0f;
    color: #ededed;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
}

a {
    color: #ededed;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: #ff5e00;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 头部 ========== */
.header-top {
    background: #0b0b0f;
    border-bottom: 1px solid #1f1f2a;
    padding: 12px 0;
}

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

.logo img {
    height: 42px;
    width: auto;
}

.header-icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.icon-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #ededed;
    font-size: 15px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 40px;
    transition: 0.2s;
}

.icon-item i {
    font-size: 18px;
}

.icon-item span {
    display: inline-block;
}

.icon-item:hover,
.icon-item.active {
    color: #ff5e00;
    background: rgba(255, 94, 0, 0.1);
}

@media (max-width: 640px) {
    .icon-item span {
        display: none;
    }
    .icon-item {
        padding: 6px 10px;
    }
}

/* 头部第二行导航 */
.header-nav {
    background: #0f0f14;
    border-bottom: 1px solid #1f1f2a;
    position: relative;
}

.nav-wrapper {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    padding: 8px 0;
    display: flex;
    justify-content: center;
}

.nav-wrapper:active {
    cursor: grabbing;
}

.nav-wrapper::-webkit-scrollbar {
    display: none;
}

.nav-menu {
    display: flex;
    gap: 32px;
    white-space: nowrap;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-menu a.active {
    color: #ff5e00;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff5e00;
    border-radius: 2px;
}

/* ========== 通用模块 ========== */
.section {
    margin: 50px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 28px;
    border-left: 4px solid #ff5e00;
    padding-left: 18px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 600;
}

.section-header .more {
    font-size: 14px;
    color: #aaa;
}

.section-header .more:hover {
    color: #ff5e00;
}

/* ========== 卡片网格 ========== */
.vod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px;
}

.vod-card {
    background: #14141c;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.vod-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.6);
}

.vod-card-pic {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

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

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

.vod-card-info {
    padding: 14px 12px;
}

.vod-card-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vod-card-remark {
    font-size: 13px;
    color: #ff5e00;
}

/* ========== 幻灯片 ========== */
.swiper {
    position: relative;
    width: 100%;
    border-radius: 28px;
    overflow: hidden;
    margin: 30px 0 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.swiper-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 30px;
    left: 40px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.8), transparent);
    padding: 12px 28px;
    border-radius: 40px;
    backdrop-filter: blur(8px);
}

.slide-caption h3 {
    font-size: 22px;
    font-weight: 600;
}

.slide-caption p {
    font-size: 14px;
    color: #ff5e00;
}

.swiper-pagination {
    text-align: center;
    margin-top: 16px;
}

.swiper-pagination-bullet {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.swiper-pagination-bullet.active {
    background: #ff5e00;
    width: 24px;
    border-radius: 20px;
}

/* ========== 筛选器 ========== */
.filter-section {
    background: #101016;
    border-radius: 28px;
    padding: 20px 24px;
    margin: 40px 0 30px;
    border: 1px solid #222;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: nowrap;
}

.filter-label {
    width: 50px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #bbb;
}

.filter-scroll {
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.filter-scroll:active {
    cursor: grabbing;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-items {
    display: flex;
    gap: 12px;
    white-space: nowrap;
}

.filter-items a {
    display: inline-block;
    padding: 6px 18px;
    background: #1e1e2a;
    border-radius: 40px;
    font-size: 13px;
    transition: all 0.2s;
}

.filter-items a.active,
.filter-items a:hover {
    background: #ff5e00;
    color: #fff;
}

/* ========== 排序栏 ========== */
.sort-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.sort-bar a {
    padding: 6px 24px;
    background: #1e1e2a;
    border-radius: 40px;
    font-size: 14px;
}

.sort-bar a.active {
    background: #ff5e00;
    color: #fff;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    background: #1e1e2a;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
}

.pagination .active {
    background: #ff5e00;
    color: #fff;
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ========== 详情页 ========== */
.detail-container {
    display: flex;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
    align-items: flex-start;
}

.detail-poster {
    flex: 0 0 260px;
    flex-shrink: 0;
}

.detail-poster img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
    display: block;
    height: auto;
}

.detail-info {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.detail-remark {
    color: #ff5e00;
    font-size: 18px;
    margin-bottom: 20px;
}

.detail-meta p {
    margin: 10px 0;
    font-size: 15px;
    color: #ccc;
}

.play-btn {
    display: inline-block;
    background: #ff5e00;
    padding: 12px 32px;
    border-radius: 50px;
    margin-top: 25px;
    font-weight: bold;
    transition: transform 0.2s;
}

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

/* 片源收集中提示样式 */
.no-source-tip {
    background: #1e1e2a;
    border-radius: 28px;
    padding: 40px 20px;
    text-align: center;
    margin: 30px 0;
    border: 1px dashed #ff5e00;
}
.no-source-tip i {
    font-size: 48px;
    color: #ff5e00;
    margin-bottom: 15px;
    display: inline-block;
}
.no-source-tip p {
    font-size: 18px;
    color: #ccc;
}

/* ========== 播放组选项卡 ========== */
.play-group-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin: 30px 0 20px;
    padding-bottom: 8px;
}

.play-group-tab {
    padding: 10px 28px;
    background: #1e1e2a;
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.2s;
}

.play-group-tab.active,
.play-group-tab:hover {
    background: #ff5e00;
    color: #fff;
}

/* ========== 剧集列表 ========== */
.episode-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.btn-highlight {
    background: #ff5e00 !important;
    color: #fff !important;
    border: none;
    padding: 6px 16px;
    border-radius: 40px;
    cursor: pointer;
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 20px 0;
}

.episode-list a {
    padding: 8px 20px;
    background: #1e1e2a;
    border-radius: 40px;
    font-size: 14px;
    text-decoration: none;
    color: #ededed;
    transition: all 0.2s;
}

.episode-list a.active {
    background: #ff5e00;
    color: #fff;
}

.episode-list a:hover {
    background: #ff5e00;
    color: #fff;
}

/* ========== 播放页 ========== */
.play-info {
    margin: 20px 0 10px;
}

.video-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.left-buttons,
.right-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 按钮样式统一 */
.btn-normal,
.btn-highlight,
.btn-disabled {
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    display: inline-block;
    text-decoration: none;
}

.btn-normal {
    background: #2a2a35;
    color: #ededed;
    cursor: pointer;
}

.btn-normal:hover {
    background: #ff5e00;
    color: #fff;
}

.btn-highlight {
    background: #ff5e00;
    color: #fff;
    cursor: pointer;
}

.btn-highlight:hover {
    background: #e05500;
}

.btn-disabled {
    background: #2a2a35;
    color: #888;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 剧集列表操作栏（倒序按钮） */
.episode-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

/* ========== 播放器容器 ========== */
.player-wrapper {
    background: linear-gradient(145deg, #1a1a24, #0a0a0f);
    margin: 30px 0;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
}

.player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.MacPlayer,
#playleft {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========== 报错弹窗 ========== */
.report-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.report-content {
    background: #1a1a24;
    border-radius: 28px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #ff5e00;
}

.report-content h3 {
    margin-bottom: 20px;
    color: #ff5e00;
}

.report-content textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border-radius: 16px;
    background: #0b0b0f;
    border: 1px solid #333;
    color: #fff;
    margin-bottom: 20px;
}

.report-content button {
    padding: 8px 20px;
    border-radius: 40px;
    cursor: pointer;
    margin-right: 10px;
}

/* ========== 底部 ========== */
.footer {
    background: #08080c;
    border-top: 1px solid #1f1f2a;
    padding: 50px 0 30px;
    margin-top: 70px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-links a {
    color: #aaa;
    font-size: 14px;
}

.footer-links a:hover {
    color: #ff5e00;
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: #777;
    border-top: 1px solid #1a1a22;
    padding-top: 30px;
    margin-top: 20px;
}

/* ========== 历史记录模块（无滚动条 + 拖拽滚动） ========== */
.history-panel {
    background: #0f0f14;
    border-bottom: 1px solid #1f1f2a;
    padding: 16px 0;
    display: none;
}

.history-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2a35;
}

.history-title {
    font-size: 16px;
    font-weight: 600;
    color: #ff5e00;
}
.history-title i {
    margin-right: 8px;
}

.history-clear {
    background: rgba(255, 94, 0, 0.2);
    border: none;
    color: #ff5e00;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
}
.history-clear:hover {
    background: #ff5e00;
    color: #fff;
}

.history-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-scroll {
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.history-scroll:active {
    cursor: grabbing;
}
.history-scroll::-webkit-scrollbar {
    display: none;
}

.history-list {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    flex-wrap: nowrap;
}

.history-card {
    flex: 0 0 140px;
    background: #14141c;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
}
.history-card:hover {
    transform: translateY(-4px);
}
.history-card-pic {
    aspect-ratio: 2 / 3;
    overflow: hidden;
}
.history-card-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.history-card:hover .history-card-pic img {
    transform: scale(1.05);
}
.history-card-info {
    padding: 8px;
}
.history-card-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.history-card-episode {
    font-size: 11px;
    color: #ff5e00;
    margin-bottom: 4px;
}
.history-card-time {
    font-size: 10px;
    color: #888;
}

.history-arrow {
    background: #1e1e2a;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    flex-shrink: 0;
}
.history-arrow:hover {
    background: #ff5e00;
}

/* ========== 响应式（移动端修复） ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .vod-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 16px;
    }

    /* 修复详情页移动端布局 */
    .detail-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .detail-poster {
        flex: none;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        text-align: center;
    }
    .detail-poster img {
        width: 100%;
        height: auto;
        margin: 0 auto;
        display: block;
    }
    .detail-info {
        width: 100%;
        margin-top: 0;
        padding: 0;
    }
    .detail-title,
    .detail-remark,
    .detail-meta,
    .play-btn {
        clear: both;
        position: relative;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .slide-caption {
        left: 20px;
        bottom: 15px;
        padding: 6px 16px;
    }
    .slide-caption h3 {
        font-size: 16px;
    }

    /* ========== 修复筛选栏移动端布局（标签与内容在同一行，增加间距） ========== */
    .filter-group {
        flex-wrap: nowrap;          /* 禁止换行，保持在同一行 */
        align-items: center;
                    /* 增加标签与滚动区之间的间距 */
    }
    .filter-label {
        width: auto;                /* 宽度自适应内容 */
        min-width: 40px;            /* 保证最小宽度，避免过窄 */
        flex-shrink: 0;
        margin-right: 0;
    }
    .filter-scroll {
        flex: 1;
        overflow-x: auto;
    }

    /* 其他移动端样式保留 */
    .player-actions {
        flex-wrap: wrap;
    }
    .nav-wrapper {
        justify-content: flex-start;
    }

    /* 历史记录模块移动端适配 */
    .history-container {
        padding: 0 16px;
    }
    .history-card {
        flex: 0 0 110px;
    }
    .history-card-info {
        padding: 6px;
    }
    .history-card-title {
        font-size: 12px;
    }
    .history-card-episode,
    .history-card-time {
        font-size: 10px;
    }
    .history-arrow {
        width: 28px;
        height: 28px;
    }
}