/* ArtPlayer 增强样式 - 顶部标题栏、电池、选集列表等 */

/* ========== 隐藏播放器加载指示器 ========== */
.player-box.loading {
    background: #000 !important;
    background-image: none !important;
}

.player-box.loading::before,
.player-box.loading::after {
    display: none !important;
    content: none !important;
}

.am-panel-bd.player-box.loading {
    background: #000 !important;
    background-image: none !important;
}

.am-panel-bd.player-box.loading::before,
.am-panel-bd.player-box.loading::after {
    display: none !important;
    content: none !important;
}

/* ========== 播放器全局文字加粗 ========== */
#artplayer-container,
#artplayer-container *,
.art-video-player,
.art-video-player *,
.artplayer-app,
.artplayer-app * {
    font-weight: 600 !important;
}

/* ========== 隐藏网页全屏按钮 ========== */
.art-video-player .art-control-fullscreenWeb {
    display: none !important;
    visibility: hidden !important;
}

/* ========== 顶部标题栏 ========== */
.header {
    opacity: 0;
    transform: translateY(-100%);
    height: 60px;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0));
    line-height: 60px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    color: #fff;
    padding: 0 10px;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

/* 全屏时使用fixed定位 */
.art-video-player.art-fullscreen .header {
    position: fixed;
}

/* 标题栏只在控制栏显示时才显示 */
.art-video-player.art-control-show .header,
.art-video-player.art-hover .header,
.art-video-player.art-mask-show .header {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto;
}

/* 当控制栏隐藏时，标题栏也隐藏 */
.art-video-player:not(.art-control-show):not(.art-hover):not(.art-mask-show) .header {
    opacity: 0 !important;
    transform: translateY(-100%) !important;
    pointer-events: none;
}

.header {
    display: flex !important;
    visibility: visible !important;
}

.header.ease {
    transition: all 0.3s ease;
}

.header.flex {
    display: flex;
    flex-wrap: wrap;
}

.header.between {
    flex-wrap: nowrap;
    justify-content: space-between;
}

.header .player-title {
    display: inline-block;
    font-size: 18px;
    width: 80%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 500;
}

.header .flex.qoe-normal {
    line-height: normal;
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 12px;
}

.header .kui-time {
    font-size: 18px;
    font-weight: 500;
}

/* ========== 电池显示样式 ========== */
.batteryShape {
    display: none;
    position: relative;
    width: 30px;
    height: 14px;
    border: 1px solid #333;
    border-radius: 3px;
    background-color: #fff;
    margin-left: 12px;
}

.batteryShape.show {
    display: block;
}

.batteryShape::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -4px;
    margin-left: 2px;
    transform: translateY(-50%);
    width: 4px;
    height: 8px;
    background: #333;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.batteryShape::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: rgba(255,255,255,.1);
}

.batteryShape .level {
    position: absolute;
    top: 2px;
    right: 2px;
    bottom: 2px;
    left: 2px;
    overflow: hidden;
}

.batteryShape .percentage {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: #55c612;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.batteryShape.battery-high .percentage {
    background: #55c612;
}

.batteryShape.battery-medium .percentage {
    background: #f37b1d;
}

.batteryShape.battery-low .percentage {
    background: #dd514c;
}

.batteryShape.battery-charging {
    animation: battery-charging 2s ease-in-out infinite;
}

@keyframes battery-charging {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== 移动端横屏隐藏音量按钮（更严格） ========== */
@media (orientation: landscape) and (max-width: 1024px) {
    .art-video-player .art-control-volume,
    .art-video-player .art-control-volume-close {
        display: none !important;
        visibility: hidden !important;
    }
    /* 同时隐藏画中画按钮 */
    .art-video-player .art-control-pip {
        display: none !important;
        visibility: hidden !important;
    }
}

/* ========== 选集列表面板（参考其他网站的artplayer.html） ========== */
.yxq-listbox {
    transform: scaleX(0);
    transform-origin: right;
    transition: all 0.3s ease-in-out;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10001;
    height: 100%;
    width: 336px;
    max-width: 80%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    pointer-events: none;
    font-style: normal !important;
    font-weight: normal !important;
}

.yxq-listbox.show {
    transform: scaleX(1);
    pointer-events: auto;
}

/* 全屏时使用fixed定位 */
.art-video-player.art-fullscreen .yxq-listbox {
    position: fixed;
    height: 100vh;
}

.yxq-listbox .anthology-wrap {
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

/* 关闭按钮区域 */
.yxq-listbox .video-list-cl {
    padding: 10px 15px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.yxq-listbox .video-list-cl .close-btn {
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-block;
}

.yxq-listbox .video-list-cl .close-btn:hover {
    opacity: 0.7;
}

.yxq-listbox .normal-title-wrap {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* 封面和标题区域 */
.yxq-listbox .pic-text-item {
    margin-bottom: 10px;
}

.yxq-listbox .pic-text-item > a {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}

.yxq-listbox .cover {
    width: 80px;
    height: 110px;
    flex-shrink: 0;
    margin-right: 12px;
    border-radius: 4px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
}

.yxq-listbox .cover img.bj {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yxq-listbox .anthology-title-wrap {
    flex: 1;
    min-width: 0;
}

.yxq-listbox .anthology-title-wrap .title {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.87);
    line-height: 1.4;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.yxq-listbox .anthology-title-wrap .subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yxq-listbox .thesis-wrap {
    width: 100%;
    height: 26px;
    line-height: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yxq-listbox .title-link {
    display: block;
    float: left;
    width: 180px;
    font-size: 16px;
    font-style: normal !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,0.87);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yxq-listbox .close-btn {
    float: right;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    color: rgba(255,255,255,0.6);
    font-size: 20px;
    transition: color 0.2s;
}

.yxq-listbox .close-btn:hover {
    color: #fff;
}

.yxq-listbox .title-info {
    max-height: 64px;
    width: 100%;
    font-size: 12px;
    line-height: 17px;
    overflow: auto;
    margin-top: 10px;
    text-align: left;
    color: rgba(255,255,255,0.6);
}

.yxq-listbox .scroll-area {
    padding: 0 20px;
    font-size: 14px;
    text-align: left;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    min-height: 0;
}

.yxq-listbox .scroll-area::-webkit-scrollbar {
    width: 5px;
}

.yxq-listbox .scroll-area::-webkit-scrollbar-thumb {
    background-color: #666;
    border-radius: 3px;
}

.yxq-listbox .scroll-area::-webkit-scrollbar-track {
    background-color: #1f1f1f;
}

.yxq-listbox .anthology-content {
    margin-top: 15px;
    width: 100%;
    font-size: 0;
}

.yxq-listbox .box-item {
    font-size: 14px;
    font-style: normal !important;
    font-weight: normal !important;
    background: rgba(69, 80, 79, 0.78);
    width: 48%;
    height: 40px;
    line-height: 40px;
    border-radius: 4px;
    text-align: center;
    color: #fff;
    display: inline-block;
    box-sizing: border-box;
    margin: 1%;
    padding: 0 10px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yxq-listbox .box-item:hover {
    background: rgba(69, 80, 79, 1);
    transform: scale(1.05);
}

.yxq-listbox .box-item.active {
    background: #38bdf8 !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5) !important;
    transform: scale(1.05) !important;
}

/* 加载更多按钮样式 */
.yxq-listbox .box-item.episode-load-more-btn {
    background: rgba(14, 144, 210, 0.9) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    width: 100% !important;
    margin: 8px 0 0 0 !important;
    box-shadow: 0 2px 8px rgba(14, 144, 210, 0.4) !important;
    border: 1px solid rgba(14, 144, 210, 0.6) !important;
}

.yxq-listbox .box-item.episode-load-more-btn:hover {
    background: rgba(14, 144, 210, 1) !important;
    box-shadow: 0 4px 12px rgba(14, 144, 210, 0.6) !important;
    transform: translateY(-1px) !important;
}

.yxq-listbox .box-item.episode-load-more-btn:active {
    background: rgba(11, 115, 168, 1) !important;
    transform: translateY(0) !important;
}

.yxq-listbox .component-title {
    position: relative;
    height: 20px;
    line-height: 20px;
    display: block;
    margin: 12px 0 16px;
    text-align: left;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-style: normal !important;
    font-weight: 500 !important;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

/* ========== 播放源选择器（在选集列表内） ========== */
.yxq-listbox .art-source-selector-container {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.yxq-listbox .art-source-selector-container span {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
    font-style: normal !important;
    margin-right: 10px;
    white-space: nowrap;
}

.yxq-listbox .art-source-selector-container .art-source-select {
    flex: 1;
    max-width: 200px;
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 4px !important;
    color: rgba(255,255,255,0.9) !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    outline: none !important;
    font-weight: 500 !important;
    font-style: normal !important;
    transition: all 0.2s ease-in-out !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.yxq-listbox .art-source-selector-container .art-source-select:hover {
    background: rgba(255,255,255,0.15) !important;
    border-color: rgba(255,255,255,0.3) !important;
    color: #fff !important;
}

.yxq-listbox .art-source-selector-container .art-source-select:focus {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.4) !important;
    color: #fff !important;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2) !important;
}

.yxq-listbox .art-source-selector-container .art-source-select option {
    background: rgba(0, 0, 0, 0.95) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 8px !important;
}

/* 移动端优化 */
@media (max-width: 767px) {
    .yxq-listbox .art-source-selector-container {
        padding: 10px 12px;
    }
    
    .yxq-listbox .art-source-selector-container span {
        font-size: 12px;
        margin-right: 8px;
    }
    
    .yxq-listbox .art-source-selector-container .art-source-select {
        max-width: 150px !important;
        font-size: 12px !important;
        padding: 5px 8px !important;
    }
}

/* ========== 选集列表切换按钮（在控制栏中） ========== */
.art-video-player .art-control.yxq-vod-list {
    cursor: pointer;
    font-style: normal !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.2s ease-in-out !important;
}

.art-video-player .art-control.yxq-vod-list:hover {
    color: #fff !important;
}

.art-video-player .art-control.yxq-vod-list .art-icon {
    font-size: 14px;
    font-style: normal !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.2s ease-in-out !important;
}

.art-video-player .art-control.yxq-vod-list:hover .art-icon {
    color: #fff !important;
}

.art-video-player .art-control.yxq-vod-list .art-icon i {
    font-style: normal !important;
    font-weight: 600 !important;
}

/* ========== 播放源选择器（在控制栏中） ========== */
.art-video-player .art-control.art-source-selector {
    cursor: pointer;
    font-style: normal !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.2s ease-in-out !important;
}

.art-video-player .art-control.art-source-selector:hover {
    color: #fff !important;
}

.art-video-player .art-control.art-source-selector .art-source-select {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
    color: rgba(255, 255, 255, 0.75) !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    outline: none !important;
    min-width: 80px !important;
    max-width: 120px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease-in-out !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.art-video-player .art-control.art-source-selector .art-source-select:hover {
    background: rgba(0, 0, 0, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
}

.art-video-player .art-control.art-source-selector .art-source-select:focus {
    background: rgba(0, 0, 0, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.3) !important;
}

.art-video-player .art-control.art-source-selector .art-source-select option {
    background: rgba(0, 0, 0, 0.95) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 8px !important;
}

/* 移动端优化 */
@media (max-width: 767px) {
    .art-video-player .art-control.art-source-selector .art-source-select {
        min-width: 70px !important;
        max-width: 100px !important;
        font-size: 11px !important;
        padding: 3px 6px !important;
    }
}

/* ========== 响应式设计 ========== */
@media (max-width: 767px) {
    .header {
        height: 40px;
        line-height: 40px;
        padding: 0 8px;
    }
    
    .header .player-title {
        font-size: 15px;
        width: 70%;
    }
    
    .header .kui-time {
        font-size: 15px;
    }
    
    .batteryShape {
        width: 26px;
        height: 12px;
        margin-left: 6px;
    }
    
    .yxq-listbox {
        width: 280px;
    }
    
    .yxq-listbox .box-item {
        width: 100%;
        margin: 2px 0;
    }
    
    /* 手机端隐藏音量调节按钮 */
    .art-video-player .art-control-volume,
    .art-video-player .art-control.art-control-volume {
        display: none !important;
        visibility: hidden !important;
    }
}

@media (max-width: 560px) {
    .header .player-title {
        font-size: 14px;
        width: 65%;
    }
    
    .yxq-listbox {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 966px) {
    .yxq-listbox {
        width: 300px;
    }
}

/* ========== 全屏时调整 ========== */
.art-video-player.art-fullscreen .header {
    position: fixed;
}

.art-video-player.art-fullscreen .yxq-listbox {
    position: fixed;
    z-index: 10002;
}

/* ========== 替换控制栏SVG图标样式（参考网站样式） ========== */
/* 默认状态：图标为灰色（调亮） */
.art-video-player .art-bottom .art-controls .art-control .art-icon svg {
    fill: rgba(255, 255, 255, 0.75) !important;
    transition: fill 0.2s ease-in-out !important;
}

.art-video-player .art-bottom .art-controls .art-control .art-icon svg path {
    fill: rgba(255, 255, 255, 0.75) !important;
    transition: fill 0.2s ease-in-out !important;
}

/* 悬停状态：图标为白色高亮 */
.art-video-player .art-bottom .art-controls .art-control:hover .art-icon svg {
    fill: #fff !important;
}

.art-video-player .art-bottom .art-controls .art-control:hover .art-icon svg path {
    fill: #fff !important;
}

/* ========== 优化控制栏按钮样式 ========== */
.art-video-player .art-bottom .art-controls .art-control {
    opacity: 1 !important;
    min-height: 40px !important;
    min-width: 40px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease-in-out !important;
    margin: 0 2px !important;
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.75) !important;
}

.art-video-player .art-bottom .art-controls .art-control:hover {
    opacity: 1 !important;
    background-color: transparent !important;
    transform: scale(1.05) !important;
    color: #fff !important;
}

.art-video-player .art-bottom .art-controls .art-control:active {
    transform: scale(0.95) !important;
    background-color: transparent !important;
}

.art-video-player .art-bottom .art-controls .art-control .art-icon {
    height: 40px !important;
    width: 40px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease-in-out !important;
}

.art-video-player .art-bottom .art-controls .art-control .art-icon svg {
    width: 20px !important;
    height: 20px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)) !important;
}

.art-video-player .art-bottom .art-controls .art-controls-left,
.art-video-player .art-bottom .art-controls .art-controls-right {
    gap: 4px !important;
    padding: 0 5px !important;
}

/* 优化控制栏背景 */
.art-video-player .art-bottom {
    background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8)) !important;
    /* 移除毛玻璃效果，避免遮挡视频 */
    /* backdrop-filter: blur(10px) !important; */
    /* -webkit-backdrop-filter: blur(10px) !important; */
}

/* 优化进度条样式 */
.art-video-player .art-bottom .art-progress .art-control-progress {
    height: 5px !important;
    border-radius: 3px !important;
}

.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner {
    height: 5px !important;
    border-radius: 3px !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played {
    background: linear-gradient(90deg, #38bdf8, #0ea5e9) !important;
    border-radius: 3px !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5) !important;
}

.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded {
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 3px !important;
}

.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {
    width: 14px !important;
    height: 14px !important;
    background: #fff !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6) !important;
}

.art-video-player .art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator {
    transform: scale(1.2) !important;
}

/* 优化时间显示 */
.art-video-player .art-bottom .art-controls .art-control-time {
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #bfbfbf !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
    padding: 0 8px !important;
    min-width: auto !important;
    transition: color 0.2s ease-in-out !important;
    cursor: default !important;
}

/* 优化音量控制 */
.art-video-player .art-bottom .art-controls .art-control-volume {
    position: relative !important;
}

.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel {
    position: absolute !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-bottom: 8px !important;
    /* 不额外加背景，避免和 ArtPlayer 默认皮肤叠出“双层背景” */
    background: transparent !important;
    border-radius: 4px !important;
    padding: 0 5px !important;
    z-index: 1000 !important;
    min-width: 40px !important;
    height: 100px !important;
    pointer-events: auto !important;
}

.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle {
    background: #fff !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5) !important;
}

/* 优化设置菜单 */
.art-video-player .art-bottom .art-controls .art-control-setting {
    position: relative !important;
}

.art-video-player .art-bottom .art-controls .art-control-setting .art-setting-panel {
    background: rgba(0, 0, 0, 0.95) !important;
    /* 移除毛玻璃效果，避免遮挡 */
    /* backdrop-filter: blur(10px) !important; */
    /* -webkit-backdrop-filter: blur(10px) !important; */
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

/* 响应式优化 */
@media (max-width: 767px) {
    .art-video-player .art-bottom .art-controls .art-control {
        min-height: 36px !important;
        min-width: 36px !important;
    }
    
    .art-video-player .art-bottom .art-controls .art-control .art-icon {
        height: 36px !important;
        width: 36px !important;
    }
    
    .art-video-player .art-bottom .art-controls .art-control .art-icon svg {
        width: 18px !important;
        height: 18px !important;
    }
}

