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

body {
    background-color: #000;
    color: #fff;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.swiper-container {
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* 使用动态视口高度，解决移动端浏览器地址栏问题 */
    position: fixed;
    top: 0;
    left: 0;
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #000;
    touch-action: pan-y;
}

.video-container {
    width: 100%;
    /* 占满整屏高度，随父容器(每个 slide 为整屏)自适应 */
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: height 0.3s ease;
}

.video-player {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    aspect-ratio: 9/16;
    position: relative;
}

.video-controls-area {
    width: 100%;
    height: 66px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 0 0px;
    box-sizing: border-box;
    /* 覆盖在视频之上 */
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.progress-bar-container {
    height: 26px;
    border-radius: 3px;
    margin: 0px 16px 0px 16px;
    cursor: pointer;
    position: relative;
    display: flex;
    touch-action: none;
    user-select: none;
}

.progress-bar-bg {
    height: 100%;
    background: rgba(255,255,255,0.3);
    height: 6px;
    margin-bottom: 10px;
    margin-top: 10px;
    border-radius: 3px;
    width: 0%;
    position: absolute;
    transition: width 0.1s ease;
}

.progress-bar {
    height: 100%;
    background: #FF4463;
    height: 6px;
    margin-bottom: 10px;
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s ease;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #FF4463;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    opacity: 1;
    transition: opacity 0.2s ease;
}

.progress-bar-container:hover .progress-bar::after,
.progress-bar-container.dragging .progress-bar::after {
    opacity: 1;
}

.progress-bar-container.dragging {
    cursor: grabbing;
}

.progress-bar-container.dragging .progress-bar {
    transition: none;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
}

.play-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 10px;
}

.play-pause-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-pause-btn:hover {
    transform: scale(1.1);
}

.play-pause-btn i {
    font-size: 16px;
    color: white;
}

.time-display {
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.time-display.show {
    opacity: 1;
}

.control-buttons {
    display: flex;
    gap: 12px;
    padding-right: 10px;
}

.playback-rate-btn {
    padding: 8px 12px;
    /* border-radius: 20px; */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* transition: all 0.3s ease;
    backdrop-filter: blur(10px); */
    position: relative;
    /* background: rgba(255,255,255,0.1); */
    font-size: 14px;
    color: white;
    font-weight: 500;
}

.playback-rate-menu {
    position: absolute;
    bottom: 50px;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px 0;
    display: none;
    width: 80px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.playback-rate-menu.show {
    display: block;
}

.playback-rate-item {
    padding: 8px 12px;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-align: center;
}

.playback-rate-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.playback-rate-item.active {
    color: #FF4463;
    background: rgba(255, 68, 99, 0.1);
}

/* 全局倍速按钮菜单样式 - 向下显示 */
#global-playback-rate-btn .playback-rate-menu {
    position: absolute !important;
    top: 50px !important;  /* 向下显示 */
    right: 0 !important;
    bottom: auto !important;  /* 移除bottom定位 */
    background: rgba(0, 0, 0, 0.9) !important;
    border-radius: 8px !important;
    padding: 8px 0 !important;
    display: none !important;
    width: 80px !important;
    overflow: hidden !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

#global-playback-rate-btn .playback-rate-menu.show {
    display: block !important;
}

/* CC字幕按钮样式 */
.cc-toggle-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    padding: 0;
}

.cc-toggle-btn .cc-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.cc-toggle-btn:hover .cc-icon {
    opacity: 1;
}

/* 静音按钮样式 */
.mute-toggle-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.mute-toggle-btn i {
    color: white;
    font-size: 16px;
}

.mute-toggle-btn.muted i {
    color: #FF4463;
}

/* CC字幕 Bottom Sheet 样式 */
.subtitle-bottomsheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
}

.subtitle-bottomsheet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.subtitle-bottomsheet-content {
    position: relative;
    width: 100%;
    background: #1a1a1a;
    border-radius: 16px 16px 0 0;
    max-height: 60vh;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.subtitle-bottomsheet.show .subtitle-bottomsheet-content {
    transform: translateY(0);
}

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

.subtitle-bottomsheet-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin: 0;
}

/* Switch 按钮样式 */
.subtitle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.subtitle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.subtitle-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.subtitle-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.subtitle-switch input:checked + .subtitle-switch-slider {
    background-color: #FF4463;
}

.subtitle-switch input:checked + .subtitle-switch-slider:before {
    transform: translateX(20px);
}

.subtitle-switch input:disabled + .subtitle-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.subtitle-bottomsheet-body {
    padding: 8px 0;
    max-height: calc(60vh - 73px);
    overflow-y: auto;
}

.subtitle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.subtitle-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.subtitle-option-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.subtitle-option.active .subtitle-option-text {
    color: #FF4463;
    font-weight: 600;
}

.subtitle-option-check {
    color: #FF4463;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.subtitle-option.active .subtitle-option-check {
    opacity: 1;
}


/* 剧集选择入口样式 */
.episode-selector-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 32px);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.episode-selector-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.episode-selector-icon {
    display: flex;
    align-items: center;
}

.episode-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.episode-selector-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    text-align: left;
    margin-left: 10px;
}

.episode-selector-arrow {
    display: flex;
    align-items: center;
}

.episode-arrow {
    width: 16px;
    height: 16px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.episode-selector-btn:hover .episode-arrow {
    transform: translateY(-2px);
}

/* 剧集选择弹出窗样式 */
.episode-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.episode-selector-modal.show {
    display: flex;
    opacity: 1;
}

.episode-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.episode-selector-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 20px 20px 0 0;
    max-height: 70vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* PC端最大宽度限制和右侧定位 */
    max-width: 400px;
    right: 20px;
    left: auto;
    transform: translateY(100%);
    display: flex;
    flex-direction: column;
}

.episode-selector-modal.show .episode-selector-panel {
    transform: translateY(0);
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .episode-selector-panel {
        max-width: none;
        left: 0;
        right: 0;
        transform: translateY(100%);
    }

    .episode-selector-modal.show .episode-selector-panel {
        transform: translateY(0);
    }
}

.episode-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 14px 20px;
    border-bottom: none;
}

.episode-selector-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.episode-selector-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.episode-selector-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.episode-selector-authors {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0 16px;
}

.author-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: rgb(55, 65, 81);
    margin-bottom: 8px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    color: rgb(209, 213, 219);
    text-align: center;
    max-width: 80px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.episode-selector-description {
    padding: 8px 16px 16px 16px;
}

.description-container {
    position: relative;
}

.description-text-wrapper {
    display: inline;
}

.description-text {
    line-height: 1.6;
    color: rgba(235, 235, 245, 0.6);
    font-size: 14px;
}

.show-more-btn,
.show-less-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    transition: color 0.2s;
    cursor: pointer;
    color: white;
    font-size: 12px;
}

.show-more-btn.hidden,
.show-less-btn.hidden {
    display: none;
}

.episode-range-title {
    text-align: left;
    color: white;
    font-size: 15px;
    margin-bottom: 14px;
    font-weight: 500;
    margin-left: 16px;
}

.episode-selector-scrollable-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.episode-selector-content {
    max-height: calc(70vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 16px;
}

.episode-grid-simple-container {
    min-height: 200px;
}

/* 播放指示器动画 */
.playing-indicator {
    position: absolute;
    bottom: 4px;
    left: 4px;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 12px;
}

.playing-indicator .bar {
    width: 2px;
    background-color: white;
    border-radius: 1px;
    animation: audioWave 0.8s ease-in-out infinite;
}

.playing-indicator .bar:nth-child(1) {
    height: 6px;
    animation-delay: 0s;
}

.playing-indicator .bar:nth-child(2) {
    height: 10px;
    animation-delay: 0.2s;
}

.playing-indicator .bar:nth-child(3) {
    height: 8px;
    animation-delay: 0.4s;
}

@keyframes audioWave {
    0%, 100% {
        transform: scaleY(0.5);
        opacity: 0.7;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

/* 分页按钮样式 */
.episode-pagination {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
    flex-shrink: 0; /* 防止分页按钮被压缩 */
    background: rgba(0, 0, 0, 0.95); /* 确保背景不透明 */
    position: sticky;
    top: 0;
    z-index: 10;
    margin-left: 1rem;
    margin-right: 1rem;
}

.episode-page-btn {
    color: #9CA3AF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    border: none;
    background: none;
}

.episode-page-btn.active {
    color: #FF4463;
}

.episode-page-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background: #FF4463;
}

.episode-page-btn:hover:not(.active) {
    color: #fff;
}

/* 剧集网格容器 */
.episode-grid-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.episode-grid-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.episode-grid-swiper {
    height: 100%;
}

.episode-grid-swiper .swiper-wrapper {
    height: 100%;
    align-items: flex-start;
}

.episode-grid-swiper .swiper-slide {
    height: auto;
    display: flex;
    flex-direction: column;
}

/* 剧集网格 */
.episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 12px;
    padding: 0;
    width: 100%;
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    .episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
        gap: 10px;
    }
}

/* 剧集按钮样式 */
.episode-btn {
    width: 100%;
    aspect-ratio: 1.2 / 1;
    min-height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: white;
    transition: all 0.2s;
    position: relative;
    overflow: visible;
}

.episode-btn.current {
    background: #FF4463;
}

/* 剧集按钮样式 */
.episode-grid-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #222222;
    color: #9CA3AF;
}

.episode-grid-item:hover:not(.current):not(.watched) {
    background: #FF4463;
    color: white;
}

.episode-grid-item.current {
    background: #FF4463;
    color: white;
    pointer-events: none;
}

.episode-grid-item.watched {
    background: #FF4463;
    color: white;
}

.episode-grid-item.locked {
    background: #444444;
    color: #666;
    cursor: not-allowed;
}

/* 等化器动画 */
.episode-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    justify-content: center;
}

.episode-equalizer-bar {
    width: 2px;
    background-color: #fff;
    height: 100%;
    transform-origin: bottom;
}

.episode-equalizer-bar:nth-child(1) {
    animation: equalize1 0.8s ease-in-out infinite;
}

.episode-equalizer-bar:nth-child(2) {
    animation: equalize2 0.8s ease-in-out infinite;
    animation-delay: 0.2s;
}

.episode-equalizer-bar:nth-child(3) {
    animation: equalize3 0.8s ease-in-out infinite;
    animation-delay: 0.3s;
}

.episode-equalizer-bar:nth-child(4) {
    animation: equalize1 0.8s ease-in-out infinite;
    animation-delay: 0.4s;
}

@keyframes equalize1 {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(0.8); }
}

@keyframes equalize2 {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

@keyframes equalize3 {
    0%, 100% { transform: scaleY(0.2); }
    50% { transform: scaleY(0.7); }
}

/* AD标签 */
.episode-ad-tag {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 8px;
    background: #444444;
    color: white;
    padding: 1px 2px;
    border-radius: 2px;
    line-height: 10px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.control-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.control-btn i {
    font-size: 16px;
    color: white;
}

.control-btn.liked {
    background: rgba(255,68,99,0.3);
    border-color: #FF4463;
}

.control-btn.liked i {
    color: #FF4463;
}

.video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    z-index: 10;
}

.video-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.3;
}

.video-description {
    font-size: 14px;
    color: #ccc;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
}

.video-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;
    display: flex;
    gap: 15px;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.control-btn:hover {
    background: rgba(0,0,0,0.7);
}

.control-btn i {
    font-size: 18px;
    color: #fff;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #FF4463;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes customSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 自定义loading动画样式 - 避免与现有样式冲突 */
.custom-loading-spinner {
    flex-shrink: 0;
}

/* 确保自定义loading动画在播放器容器中完美居中 */
[id^="player-container-"] .custom-loading-spinner {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 100 !important;
    animation: customSpin 1s linear infinite !important;
}

/* 自定义播放按钮样式 - 使用与tv_detail.hbs相同的样式 */
.custom-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 101;
}

.custom-play-button .play-icon {
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.custom-play-button .play-icon i {
    font-size: 24px;
    color: #fff;
    margin-left: 4px; /* 微调播放图标位置，让它看起来更居中 */
}

/* 确保自定义播放按钮在播放器容器中完美居中 */
[id^="player-container-"] .custom-play-button {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 101 !important;
}

.episode-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.7);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 20;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #FF4463;
    z-index: 30;
    transition: width 0.1s;
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.play-icon i {
    font-size: 24px;
    color: #fff;
}

#player-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 确保播放器容器与视频画面宽度一致 */
[id^="player-container-"] {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 0;
    aspect-ratio: 9/16;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

/* 确保播放器内容正确填充容器 */
[id^="player-container-"] .prism-player {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* 响应式设计 - 确保在不同屏幕尺寸下都能正确显示 */
@media (max-width: 768px) {
    [id^="player-container-"] {
        aspect-ratio: 9/16;
        width: 100%;
        height: 100%;
    }
}

@media (min-width: 769px) {
    [id^="player-container-"] {
        aspect-ratio: 9/16;
        width: auto;
        height: 100%;
        max-width: 56.25vh; /* 9/16 * 100vh */
    }
}

/* 确保加载动画和播放按钮在播放器容器中正确居中 */
[id^="player-container-"] .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

[id^="player-container-"] .play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

/* 确保阿里播放器的大播放按钮居中显示 */
[id^="player-container-"] .prism-big-play-btn {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100 !important;
}

/* 确保所有播放器容器内的播放相关按钮居中 */
[id^="player-container-"] .prism-big-play-btn,
[id^="player-container-"] .prism-play-btn,
[id^="player-container-"] .loading-center {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100 !important;
}

/* 针对小屏幕设备确保按钮正确居中 */
@media (max-width: 768px) {
    [id^="player-container-"] .prism-big-play-btn,
    [id^="player-container-"] .prism-play-btn,
    [id^="player-container-"] .loading-center,
    [id^="player-container-"] .loading-spinner,
    [id^="player-container-"] .play-pause-btn {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 100 !important;
    }

    /* 移动端浏览器视口高度修复 */
    .swiper-container {
        height: 100vh;
        height: -webkit-fill-available; /* Safari 移动端 */
        height: 100dvh; /* 现代浏览器动态视口高度 */
        /* JavaScript 动态设置的高度会覆盖上面的值 */
    }

    .swiper-slide {
        height: 100vh;
        height: -webkit-fill-available;
        height: 100dvh;
        /* JavaScript 动态设置的高度会覆盖上面的值 */
    }

    /* 确保视频容器和控制区域在移动端正确显示 */
    .video-container {
        height: calc(100%);
        height: calc(100dvh); /* 使用动态视口高度 */
        /* JavaScript 动态设置的高度会覆盖上面的值 */
    }

    .video-controls-area {
        height: 66px;
        position: absolute; /* 覆盖在 video-container 上 */
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
    }
}

.prism-player .prism-liveshift-progress,.prism-player .prism-progress {
    bottom: 4px;
    width: calc(100% - 20px);
    height: 5px;
    background: #4B5563;
    box-shadow: inset 1px 1px 1px 0 rgba(0,0,0,.06);
    position: relative;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 10px;
    margin-right: 10px;
    bottom: 55px !important;
}

.prism-player .prism-liveshift-progress::before,.prism-player .prism-progress::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 21px; /* 5px + 8px + 8px */
    cursor: pointer;
}
.prism-player .prism-progress .prism-progress-played{
    position:absolute;
    top:0;
    left:0;
    width:0;
    height:100%;
    background-color:rgb(255 68 99 / var(--tw-bg-opacity, 1));
}
/* 播放速度控制按钮样式 */
.prism-player .prism-playback-rate {
    position: absolute;
    right: 70px;
    bottom: 0;
    height: 40px;
    line-height: 40px;
    color: #fff;
    font-size: 14px;
    padding: 0 10px;
}
.prism-player .prism-playback-rate .rate-text {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0px 8px;
    border-radius: 410px;
    font-size: 12px;
    transition: color 0.2s;
    width: 41px;
    height: 25px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
}

.prism-player .prism-playback-rate-menu {
    position: absolute;
    bottom: 40px;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 4px;
    padding: 4px 0;
    display: none;
    width: 80px;
    overflow: hidden;
}
.prism-player .prism-playback-rate-menu.show {
    display: block;
}
.prism-player .prism-playback-rate-item {
    padding: 0px 12px;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.prism-player .prism-playback-rate-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.prism-player .prism-playback-rate-item.active {
    color: #FF4463;
}

/* 全屏按钮样式 */
.custom-fullscreen-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 40px;
    line-height: 40px;
    color: #fff;
    font-size: 14px;
    padding: 12px 10px;
    cursor: pointer;
}
.custom-fullscreen-btn svg {
    width: 16px;
    height: 16px;
}

/* 修改音量控制按钮的右边距 */
.prism-volume {
    margin-top: 0px !important;
    padding-right: 35px !important;
    padding-top: 14px !important;
    position: relative;
    cursor: pointer;
}

.prism-volume::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    bottom: -2px;
    z-index: 1;
}


@supports (-webkit-touch-callout: none) {
    .prism-player .prism-volume-control {
        display: none !important;
    }
}

/* 覆盖音量按钮的动画效果 */
.prism-player .prism-volume .volume-icon .long-horizontal,
.prism-player .prism-volume .volume-icon .short-horizontal {
    display: none !important;
}

.prism-player .prism-volume .volume-icon:hover {
    transform: none !important;
    transform-origin: unset !important;
    cursor: pointer;
}
.prism-player .prism-volume .volume-icon .long-horizontal {
    width: 3px !important;
    background: #ebecec !important;
    height: 18px !important;
    position: absolute !important;
    right: 5px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
}
.prism-player .prism-volume .volume-icon .short-horizontal {
    width: 3px !important;
    background: #ebecec !important;
    height: 8px !important;
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
}
.prism-player .prism-volume .volume-icon:hover .long-horizontal,
.prism-player .prism-volume .volume-icon:hover .short-horizontal {
    transform: translateY(-50%) !important;
    transition: none !important;
    animation: none !important;
}

.prism-player .prism-volume .volume-icon.muted {
    background: url('/volume-mute.png') no-repeat center center;
    background-size: contain;
}

.prism-player .prism-volume .volume-icon.muted .long-horizontal,
.prism-player .prism-volume .volume-icon.muted .short-horizontal {
    opacity: 0 !important;
}

.prism-cue {
    margin-bottom: 0px !important;
}

/* 播放器内部字幕组件位置调整 */
.prism-text-overlay {
    position: absolute !important;
    top: 62% !important; /* 使用百分比定位，从顶部62%的位置开始 */
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    width: 100% !important;
}

/* 播放器内部字幕内容样式 */
.prism-text-overlay .prism-cue {
    margin-bottom: 0 !important;
    position: relative !important;
    text-align: center !important;
    width: 100% !important;
}

/* 播放器内部字幕文字样式 */
.prism-text-overlay .prism-cue > div {
    display: inline-block !important;
    max-width: 90% !important;
    margin: 0 auto !important;
}

/* 响应式调整 - 使用top定位 */
@media (max-width: 768px) {
    .prism-text-overlay {
        top: 60% !important; /* 移动端字幕位置，使用百分比定位 */
        bottom: auto !important;
    }
}

@media (min-width: 769px) {
    .prism-text-overlay {
        top: 65% !important; /* 桌面端字幕位置，使用百分比定位 */
        bottom: auto !important;
    }
}

.prism-cue > div:first-child,
video::cue {
    font-size: 18px !important;
    color: #fff !important;
    background-color: rgba(0, 0, 0, 0) !important;
}

/* 添加人物介绍字幕样式 */
.prism-cue.task-intro {
    margin-bottom: 0px !important;
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
}

.prism-cue.task-intro > div:first-child {
    font-size: 16px !important;
    color: #FFFFFF !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    white-space: pre-line !important;
    position: absolute !important;
    pointer-events: none !important;
}

.prism-subtitle-bottom {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 auto !important;
    pointer-events: none !important;
}

.prism-player .prism-volume .volume-icon {
    width: 24px;
    height: 18px;
    background: url('/volume.png') no-repeat center center;
    background-size: contain;
}

.prism-player .prism-volume-control .volume-value {
    width: 100%;
    height: 0%;
    background: #FF4463;
    position: absolute;
    border-radius: 1px;
    bottom: 0;
}

.prism-player .prism-volume-control .volume-value::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    cursor: pointer;
}

.prism-player .prism-volume-control .volume-cursor {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
}

.prism-player .prism-volume-control .volume-cursor::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    cursor: pointer;
}

.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    justify-content: center;
}
.equalizer-bar {
    width: 2px;
    background-color: #fff;
    height: 100%;
    transform-origin: bottom;
}
.equalizer-bar:nth-child(1) {
    animation: equalize1 0.8s ease-in-out infinite;
}
.equalizer-bar:nth-child(2) {
    animation: equalize2 0.8s ease-in-out infinite;
    animation-delay: 0.2s;
}
.equalizer-bar:nth-child(3) {
    animation: equalize3 0.8s ease-in-out infinite;
    animation-delay: 0.3s;
}
.equalizer-bar:nth-child(4) {
    animation: equalize1 0.8s ease-in-out infinite;
    animation-delay: 0.4s;
}

@keyframes equalize1 {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(0.8); }
}
@keyframes equalize2 {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}
@keyframes equalize3 {
    0%, 100% { transform: scaleY(0.2); }
    50% { transform: scaleY(0.7); }
}

.prism-player .prism-liveshift-progress .prism-progress-cursor, .prism-player .prism-progress .prism-progress-cursor {
    position: absolute;
    border-radius: 50%;
    top: -5px;
    width: 10px;
    height: 10px;
    box-sizing: content-box;
    background: #FF4463;
    border: 3px solid white;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
    display: block !important;
    transition: transform 0.1s ease;
    cursor: pointer;
}

.prism-player .prism-liveshift-progress .prism-progress-cursor:hover, .prism-player .prism-progress .prism-progress-cursor:hover {
    transform: scale(1.1);
}

.prism-player .prism-liveshift-progress .prism-progress-cursor img, .prism-player .prism-progress .prism-progress-cursor img {
    display: none !important;
}

.prism-fullscreen {
    position: fixed !important;
    overflow: hidden !important;
    z-index: 99 !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

@media (hover: hover) {
    .episode-item:not(.episode-active):hover {
        background-color: #FF4463;
        color: white;
    }
}
@media (hover: none) {
    .episode-item:not(.episode-active) {
        background-color: #222222;
        color: #9CA3AF;
    }
}

.prism-player .prism-controlbar-bg {
    background: transparent !important;
}

.prism-player .prism-cue + .prism-cue {
    display: none;
}

.prism-player .prism-play-btn {
    position: relative;
}

/* 下一集按钮 */
.next-episode-btn {
    float: left;
    margin-left: 2px;
    margin-top: 7px;
    position: relative;
    width: 34px;
    height: 34px;

    background: url('/next-episode.png') no-repeat center center;
    background-size: contain;
    cursor: pointer;
}

.next-episode-btn:hover {
    opacity: 1;
}

#ad-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: #f00;*/
    pointer-events: none;
}

/* 全屏模式下的样式 */
.prism-fullscreen .prism-subtitle-bottom {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 auto !important;
}

/* 解锁弹窗样式 */
.unlock-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    pointer-events: none; /* 允许触摸事件穿透到底层，不影响滑动 */
}

.unlock-modal-content {
    background: #272727;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    position: relative;
    pointer-events: auto; /* 内容区域可以接收点击事件 */
}

.unlock-icon-container {
    margin-bottom: 20px;
    position: relative;
}

.unlock-video-icon {
    height: 100px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unlock-video-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ad-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #FF4463;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 1;
}

.unlock-text {
    margin-bottom: 25px;
}

.unlock-title {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.unlock-subtitle {
    color: white;
    font-size: 16px;
    margin-bottom: 2px;
}

.unlock-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.unlock-buttons .unlock-btn {
    flex: 1; /* 让两个按钮平分宽度 */
    max-width: 120px; /* 设置最大宽度 */
}

.unlock-btn {
    padding: 8px 0px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.cancel-btn {
    background: #FF4463;
    color: white;
}

.cancel-btn:hover {
    background: #e63950;
    transform: translateY(-1px);
}

.view-ad-btn {
    background: #FF4463;
    color: white;
}

.view-ad-btn:hover {
    background: #e63950;
    transform: translateY(-1px);
}

/* 新的3层解锁进度样式 */
.unlock-progress-container {
    margin-left: 0px;
    margin-right:  0px;
    margin-top: 10px;
    margin-bottom: 18px;
    padding: 0;
}

.unlock-tier-item {
    display: flex;
    align-items: center;
    padding: 8px;
    gap: 12px;
    border: 1px solid #3F3536;
    border-radius: 8px;
    margin-bottom: 12px;
}

.unlock-tier-item:last-child {
    margin-bottom: 0;
}

.tier-icon {
    width: 19px;
    height: 14px;
}


.tier-info {
    flex: 1;
    text-align: left;
}

.tier-label {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 2px;
}

.tier-range {
    font-size: 12px;
    color: #ccc;
}

.tier-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.tier-status i {
    font-size: 16px;
}

/* 固定字幕容器样式 */
.fixed-subtitle-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100% - 66px);
    pointer-events: none;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 字幕内容容器 - 保持9:16比例 */
.fixed-subtitle-container .subtitle-content {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    aspect-ratio: 9/16;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
}

/* 出场字幕样式 */
.fixed-subtitle-container .prism-subtitle-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1001;
    pointer-events: none;
}

/* 对话字幕样式 - 固定在底部1/3位置 */
.fixed-subtitle-container .prism-subtitle-dialogue {
    position: absolute;
    bottom: calc(100% / 7); /* 距离底部1/6的位置，更靠近底部 */
    max-width: calc(100% - 24px); /* 减去左右 padding 避免溢出 */
    /*left: 50%;*/
    /*transform: translateX(-50%);*/
    z-index: 1002;
    text-align: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    padding: 8px 12px; /* 增加上下 padding */
    border-radius: 6px;
    display: none;
    pointer-events: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap; /* 保留换行符 */
    line-height: 1.4; /* 改善多行字幕的可读性 */
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    .fixed-subtitle-container .subtitle-content {
        aspect-ratio: 9/16;
        width: 100%;
        height: 100%;
    }

    /* 小屏幕字幕尺寸优化 */
    .fixed-subtitle-container .prism-subtitle-dialogue {
        font-size: 14px;
        padding: 6px 10px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 375px) {
    .fixed-subtitle-container .prism-subtitle-dialogue {
        font-size: 13px;
        padding: 5px 8px;
        max-width: calc(100% - 16px);
    }
}

/* 响应式设计 - 桌面端 */
@media (min-width: 769px) {
    .fixed-subtitle-container .subtitle-content {
        aspect-ratio: 9/16;
        width: auto;
        height: 100%;
        max-width: 56.25vh; /* 9/16 * 100vh */
    }

    /* 大屏幕字幕尺寸优化 */
    .fixed-subtitle-container .prism-subtitle-dialogue {
        font-size: 18px;
        padding: 10px 16px;
    }
}

/* 超大屏幕优化 */
@media (min-width: 1440px) {
    .fixed-subtitle-container .prism-subtitle-dialogue {
        font-size: 20px;
        padding: 12px 20px;
    }
}

/* ==================== RTL（阿拉伯语）适配 ====================*/
[dir="rtl"] body,
[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

/* 进度条 - RTL适配 */
[dir="rtl"] .progress-bar,
[lang="ar"] .progress-bar {
    left: auto;
    right: 0;
    transform-origin: right;
}

[dir="rtl"] .progress-bar::after,
[lang="ar"] .progress-bar::after {
    right: auto;
    left: -6px;
}

/* 控制按钮 - RTL适配 */
[dir="rtl"] .play-controls,
[lang="ar"] .play-controls {
    padding-left: 0;
    padding-right: 10px;
}

[dir="rtl"] .control-buttons,
[lang="ar"] .control-buttons {
    padding-right: 0;
    padding-left: 10px;
}

/* 倍速按钮菜单 - RTL适配 */
[dir="rtl"] .playback-rate-menu,
[lang="ar"] .playback-rate-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] #global-playback-rate-btn .playback-rate-menu,
[lang="ar"] #global-playback-rate-btn .playback-rate-menu {
    right: auto !important;
    left: 0 !important;
}

/* 全屏按钮 - RTL适配 */
[dir="rtl"] .custom-fullscreen-btn,
[lang="ar"] .custom-fullscreen-btn {
    right: auto;
    left: 0;
}

/* 音量控制 - RTL适配 */
[dir="rtl"] .prism-volume,
[lang="ar"] .prism-volume {
    padding-right: 0 !important;
    padding-left: 35px !important;
}

/* 剧集选择器 - RTL适配 */
[dir="rtl"] .episode-selector-text,
[lang="ar"] .episode-selector-text {
    text-align: right;
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .episode-range-title,
[lang="ar"] .episode-range-title {
    text-align: right;
    margin-left: 0;
    margin-right: 16px;
}

/* 剧集分页按钮 - RTL适配 */
[dir="rtl"] .episode-pagination,
[lang="ar"] .episode-pagination {
    flex-direction: row-reverse;
    margin-left: 1rem;
    margin-right: 1rem;
}

/* 播放指示器 - RTL适配 */
[dir="rtl"] .playing-indicator,
[lang="ar"] .playing-indicator {
    left: auto;
    right: 4px;
}

/* 描述文本 - RTL适配 */
[dir="rtl"] .description-text,
[lang="ar"] .description-text {
    text-align: right;
}

[dir="rtl"] .show-more-btn,
[lang="ar"] .show-more-btn,
[dir="rtl"] .show-less-btn,
[lang="ar"] .show-less-btn {
    margin-left: 0;
    margin-right: 4px;
}

/* 下一集按钮 - RTL适配 */
[dir="rtl"] .next-episode-btn,
[lang="ar"] .next-episode-btn {
    float: right;
    margin-left: 0;
    margin-right: 2px;
}

/* 解锁弹窗 - RTL适配 */
[dir="rtl"] .tier-info,
[lang="ar"] .tier-info {
    text-align: right;
}

[dir="rtl"] .ad-badge,
[lang="ar"] .ad-badge {
    left: auto;
    right: -8px;
}

/* 视频控制 - RTL适配 */
[dir="rtl"] .video-controls,
[lang="ar"] .video-controls {
    right: auto;
    left: 20px;
}

/* 剧集选择器panel - RTL适配(PC端) */
@media (min-width: 769px) {
    [dir="rtl"] .episode-selector-panel,
    [lang="ar"] .episode-selector-panel {
        right: auto;
        left: 20px;
    }
}

/* AD标签 - RTL适配 */
[dir="rtl"] .episode-ad-tag,
[lang="ar"] .episode-ad-tag {
    right: auto;
    left: -2px;
}

/* 音量图标 - RTL适配 */
[dir="rtl"] .prism-player .prism-volume .volume-icon .long-horizontal,
[lang="ar"] .prism-player .prism-volume .volume-icon .long-horizontal {
    right: auto !important;
    left: 5px !important;
}

[dir="rtl"] .prism-player .prism-volume .volume-icon .short-horizontal,
[lang="ar"] .prism-player .prism-volume .volume-icon .short-horizontal {
    right: auto !important;
    left: 10px !important;
}

/* 播放器倍速控制 - RTL适配 */
[dir="rtl"] .prism-player .prism-playback-rate,
[lang="ar"] .prism-player .prism-playback-rate {
    right: auto;
    left: 70px;
}

[dir="rtl"] .prism-player .prism-playback-rate-menu,
[lang="ar"] .prism-player .prism-playback-rate-menu {
    right: auto;
    left: 0;
}

/* 播放按钮微调 - RTL适配 */
[dir="rtl"] .custom-play-button .play-icon i,
[lang="ar"] .custom-play-button .play-icon i {
    margin-left: 0;
    margin-right: 4px;
}

/* 剧集指示器 - RTL适配 */
[dir="rtl"] .episode-indicator,
[lang="ar"] .episode-indicator {
    left: auto;
    right: 20px;
}

/* Swiper容器 - RTL适配 */
[dir="rtl"] .swiper-container,
[lang="ar"] .swiper-container {
    direction: rtl;
}

/* CC字幕按钮 - RTL位置调整 */
[dir="rtl"] .cc-toggle-btn,
    /*[lang="ar"] .cc-toggle-btn {*/
    /*    right: auto;*/
    /*    left: 10px;*/
    /*}*/

    /* 播放按钮 - RTL适配 */
[dir="rtl"] .custom-play-button,
[lang="ar"] .custom-play-button {
    direction: ltr; /* 播放图标保持LTR */
}

/* 字幕容器 - RTL适配 */
[dir="rtl"] #fixed-subtitle-container,
[lang="ar"] #fixed-subtitle-container {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] #fixed-dialogue-subtitle .dialogue-intro div,
[lang="ar"] #fixed-dialogue-subtitle .dialogue-intro div {
    text-align: right;
}

[dir="rtl"] #fixed-desc-subtitle .task-intro div,
[lang="ar"] #fixed-desc-subtitle .task-intro div {
    text-align: right;
}

/* 剧集选择器弹窗 - RTL适配 */
[dir="rtl"] .episode-selector-panel,
[lang="ar"] .episode-selector-panel {
    direction: rtl;
}

/* 剧集网格 - RTL适配 */
[dir="rtl"] .episode-grid,
[lang="ar"] .episode-grid {
    direction: rtl;
}

/* 设置按钮面板 - RTL适配 */
[dir="rtl"] .settings-buttons,
[lang="ar"] .settings-buttons {
    flex-direction: row-reverse;
}

/* 倍速/字幕按钮 - RTL适配 */
[dir="rtl"] .speed-btn,
[lang="ar"] .speed-btn,
[dir="rtl"] .subtitle-btn,
[lang="ar"] .subtitle-btn {
    direction: rtl;
}

/* Bottom Sheet标题 - RTL适配 */
[dir="rtl"] .bottomsheet-header,
[lang="ar"] .bottomsheet-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .bottomsheet-close,
[lang="ar"] .bottomsheet-close {
    margin-left: 0;
    margin-right: auto;
}
