/**
 * 大狗影院 - 播放页专用样式
 * 与主站 style.css 保持一致的 dark theme
 */

/* ========== 播放器容器 ========== */
.player-section {
    max-width: 1100px;
    margin: 80px auto 0;
    padding: 0 20px 40px;
}

.player-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.player-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.player-meta-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

.player-meta-bar .tag {
    padding: 2px 10px;
    background: rgba(229, 9, 20, 0.2);
    color: #e50914;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* ========== 集数选择器 ========== */
.ep-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ep-selector-label {
    font-size: 14px;
    color: #999;
    margin-right: 4px;
}

.ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 34px;
    padding: 0 12px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    color: #999;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.ep-btn:hover {
    border-color: #e50914;
    color: #fff;
    background: #2a2a2a;
}

.ep-btn.active {
    background: #e50914;
    border-color: #e50914;
    color: #fff;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
}

/* ========== 播放源切换 ========== */
.source-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.source-tab {
    padding: 6px 16px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    color: #999;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.source-tab:hover {
    border-color: #e50914;
    color: #fff;
}

.source-tab.active {
    background: #e50914;
    border-color: #e50914;
    color: #fff;
}

/* ========== 播放器 ========== */
.player-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

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

/* ArtPlayer 样式覆盖 */
.ap-player {
    border-radius: 12px;
}

/* 确保 ArtPlayer 控制栏和图标正常显示 */
.ap-controls,
.ap-bottom,
.ap-icon,
.ap-svg {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.ap-icon svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    fill: currentColor !important;
}

.ap-volume {
    width: 110px !important;
}

/* ========== 加载状态 ========== */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 10;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #e50914;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 16px;
    color: #999;
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 错误状态 ========== */
.error-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 10;
    color: #999;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.error-message {
    font-size: 15px;
    margin-bottom: 16px;
    text-align: center;
    max-width: 400px;
    line-height: 1.6;
}

.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: #e50914;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* ========== 视频描述 ========== */
.player-desc {
    margin-top: 20px;
    color: #999;
    font-size: 14px;
    line-height: 1.8;
}

/* ========== 返回按钮 ========== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    color: #999;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    margin-bottom: 20px;
    text-decoration: none;
}

.back-btn:hover {
    background: #2a2a2a;
    color: #fff;
    border-color: #e50914;
}

/* ========== 猜你喜欢 ========== */
.player-recommend {
    margin-top: 40px;
}

/* ========== 返回导航 ========== */
.player-back-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.breadcrumb a {
    color: #999;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #e50914;
}

.breadcrumb .sep {
    color: #666;
}

.breadcrumb .current {
    color: #fff;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .player-section {
        margin-top: 60px;
        padding: 0 12px 20px;
    }

    .player-header {
        flex-direction: column;
    }

    .player-title {
        font-size: 20px;
    }

    .ep-btn {
        min-width: 34px;
        height: 30px;
        font-size: 12px;
        padding: 0 8px;
    }

    .player-box {
        border-radius: 8px;
    }

    .source-tabs {
        flex-wrap: wrap;
    }

    .source-tab {
        padding: 5px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .player-title {
        font-size: 17px;
    }

    .ep-btn {
        min-width: 30px;
        height: 28px;
        font-size: 11px;
    }
}
