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

body {
    background: #000;
    overflow: hidden;
    font-family: -apple-system, system-ui, sans-serif;
    color: #fff;
}

#player {
    width: 100vw;
    height: 100vh;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    height: 44px;
}

.panel-title {
    padding-left: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
}

/* 顶部操作按钮 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-direction: row;
    position: relative;
}

.header-icon-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* 汉堡按钮 */
.header-hamburger {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    border-left: 1px solid rgb(255 255 255 / 10%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    cursor: pointer;
    display: none; /* 默认隐藏 */
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
}

.header-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 下拉浮层 */
.header-dropdown {
    position: absolute;
    top: 100%;
    margin-top: 2px;
    display: flex;
    gap: 2px;
    background: rgba(10, 10, 18, 0.99);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 1);
    z-index: 2100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.18s ease;
    pointer-events: none;
    flex-direction: column;
    min-width: 44px;
    align-items: center;
}

.header-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* 窄屏：折叠顶部图标按钮，显示汉堡按钮（不影响下拉菜单内按钮） */
@media (max-width: 768px) {
    .header-actions > .header-icon-btn {
        display: none !important;
    }

    .header-hamburger {
        display: flex !important;
    }
}

.panel-close-btn {
    height: 44px;
    width: 44px;
    border: none;
    background: transparent;
    border-left: 1px solid rgb(255 255 255 / 10%);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.panel-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    color: #fff;
}

/* 选集面板：播放源与集数信息栏 */
.ep-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    margin-bottom: 6px;
    border-radius: 7px;
    border-left: 3px solid #e50914;
    background: rgba(229,9,20,0.10);
    font-size: 0.72rem;
    color: #e50914;
    gap: 6px;
}

.ep-info-left {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: bold;
}

.ep-info-left i {
    font-size: 0.7rem;
}

.ep-info-right {
    font-size: 0.65rem;
    color: #aaa;
    font-weight: normal;
}

/* 线路标签栏 */
.ep-line-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    overflow-x: auto;
    white-space: nowrap;
}

/* 线路标签：默认/未选中 */
.side-ep-line-tab {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    cursor: pointer;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.07);
    color: #aaa;
    background: rgba(15,15,15,0.6);
    transition: all 0.2s;
}

/* 线路标签：选中 */
.side-ep-line-tab.active {
    color: #e50914;
    background: rgba(229,9,20,0.15);
    border-color: rgba(229,9,20,0.6);
    box-shadow: 0 0 8px rgba(229,9,20,0.35);
}

/* 左侧面板（首页居中） */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Artplayer 自定义按钮 */
.art-custom-button {
    cursor: pointer;
    color: #fff;
    font-size: 1.25rem;
    padding: 0 8px;
    transition: color 0.2s;
}

.art-custom-button:hover {
    color: #e50914;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #left-panel-internal {
        width: 95vw !important;
        height: 85vh !important;
    }

    #left-panel-internal .header-actions > .header-icon-btn {
        display: none;
    }

    #left-panel-internal .header-hamburger {
        display: flex;
    }
}

/* 气泡提示 toast */
.toast-bubble {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(16px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    min-width: 140px;
    max-width: min(85vw, 320px);
    background: radial-gradient(circle at top, rgba(255,255,255,0.10), rgba(8,8,18,0.98));
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
    box-shadow:
        0 18px 50px rgba(0,0,0,0.95),
        0 0 28px rgba(229,9,20,0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease;
}

/* 挂载在播放器容器内时，使用绝对定位以适配全屏 */
#player .toast-bubble {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1003;
    transform: translate(-50%, -50%) translateY(16px);
}

.toast-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) translateY(0);
}

#player .toast-bubble.show {
    transform: translate(-50%, -50%) translateY(0);
}

.toast-gif {
    width: 46px;
    height: auto;
    display: block;
    margin-bottom: 6px;
}

.toast-text {
    margin-top: 2px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ========== 视频详情弹窗 ========== */

.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Loading */
.detail-loading-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 120px;
    padding: 20px 26px;
    background: rgba(14, 14, 20, 0.98);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 50px rgba(0,0,0,0.95);
}

.detail-spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: #e50914;
    animation: detailSpin 0.8s linear infinite;
}

@keyframes detailSpin {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}

.detail-loading-text {
    color: #ccc;
    font-size: 0.82rem;
}

/* Card */
.detail-card {
    width: min(90vw, 680px);
    max-height: 90vh;
    background: rgba(12, 12, 18, 0.98);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow:
        0 24px 70px rgba(0,0,0,1),
        0 0 28px rgba(229,9,20,0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
}

/* Header */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.detail-title {
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.detail-close-btn {
    flex-shrink: 0;
    margin-left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #ddd;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.detail-close-btn:hover {
    background: rgba(229,9,20,0.9);
    color: #fff;
}

/* Body */
.detail-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 14px 14px;
}

.detail-body::-webkit-scrollbar {
    width: 4px;
}

.detail-body::-webkit-scrollbar-track {
    background: transparent;
}

.detail-body::-webkit-scrollbar-thumb {
    background: rgba(150,150,150,0.35);
    border-radius: 999px;
}

/* Info row: poster + meta */
.detail-info-row {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.detail-poster {
    flex-shrink: 0;
    width: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.detail-poster img {
    display: block;
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.detail-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.78rem;
    color: #ccc;
    overflow-x: hidden;
}

.detail-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 2px;
}

.detail-remarks {
    font-size: 0.74rem;
    color: #e50914;
    margin-bottom: 2px;
}

.detail-meta-row {
    display: flex;
    gap: 4px;
}

.detail-label {
    color: #888;
    flex-shrink: 0;
}

.detail-value {
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-content-wrap {
    margin-top: 4px;
    font-size: 0.74rem;
    color: #aaa;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-content-text {
    line-height: 1.5;
}

/* Episodes section */
.detail-episodes-section {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 8px;
    margin-top: 4px;
}



/* Tabs for multi-line */
.detail-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.detail-tab {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #bbb;
    cursor: pointer;
    transition: all 0.2s;
}

.detail-tab.active {
    background: rgba(229,9,20,0.9);
    border-color: rgba(229,9,20,1);
    color: #fff;
}

/* Episode panel */
.detail-ep-panel {
    max-height: 180px;
    overflow-y: auto;
    display: none;
    gap: 4px;
    flex-wrap: wrap;
}

.detail-ep-panel.active {
    display: flex;
}

.detail-ep-panel::-webkit-scrollbar {
    width: 3px;
}

.detail-ep-panel::-webkit-scrollbar-thumb {
    background: rgba(150,150,150,0.3);
    border-radius: 999px;
}

/* Episode buttons */
.detail-ep-btn {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: #ccc;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.detail-ep-btn:hover {
    background: rgba(76,175,80,0.9);
    border-color: rgba(76,175,80,1);
    color: #fff;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .detail-card {
        width: 98vw;
        max-height: 96vh;
        border-radius: 10px;
    }

    .detail-info-row {
        gap: 8px;
    }

    .detail-poster {
        width: 70px;
    }

    .detail-ep-panel {
        max-height: 160px;
    }
}

 
 /* 片头片尾滑块拖动时：隔离 Artplayer 进度条交互 */
.art-progress-no-interact,
.art-progress-no-interact * {
  pointer-events: none !important;
}
