/* ====== 视频播放器 专属样式（通用卡片/按钮/分隔线等由 common.css 提供） ====== */

/* 顶部全宽播放器 */
.preview-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
.main-preview-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* 空状态上传区 */
.empty-preview {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    background: #fafafa;
}
.empty-preview.upload-zone {
    cursor: pointer;
    transition: all 0.2s;
}
.empty-preview.upload-zone:hover,
.empty-preview.upload-zone.drag-over {
    border-color: #8b5cf6;
    background: #f5f3ff;
}
.empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
}
.empty-text {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.empty-hint {
    font-size: 12px;
    color: #9ca3af;
}

/* header 计数 */
.header-count {
    font-size: 13px;
    color: #8b5cf6;
    background: #f5f3ff;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 列表空提示 */
.empty-tip {
    margin-top: 14px;
    padding: 18px;
    text-align: center;
    font-size: 13px;
    color: #9ca3af;
    background: #fafafa;
    border: 1px dashed #e5e7eb;
    border-radius: 10px;
}

/* 上传占位卡片（与 empty-preview 一致，复用其样式） */
.add-more-card {
    min-height: 140px;
}

/* 播放列表：网格卡片（参考 tupianyasuo 列表布局） */
.video-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.video-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: grab;
}
.video-card:active {
    cursor: grabbing;
}
.video-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.12);
}
.video-card.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
}
.video-card.dragging {
    opacity: 0.4;
}
.video-card.drag-over {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.4);
}

/* 卡片预览区（参考 shipinxuanzhuan 单卡片样式） */
.video-preview {
    position: relative;
    background: #1f2937;
    min-height: 120px;
    height: 140px;
}
.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.play-index {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
}
.video-del-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.video-del-btn:hover {
    background: #ef4444;
}
.video-info {
    padding: 12px;
}
.video-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.video-sub {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

/* 开关组件 */
.setting-control .switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.setting-control .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.setting-control .switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #d1d5db;
    border-radius: 999px;
    transition: .2s;
}
.setting-control .switch .slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s;
}
.setting-control .switch input:checked + .slider {
    background: #7c3aed;
}
.setting-control .switch input:checked + .slider::before {
    transform: translateX(20px);
}

/* 禁用态紫色按钮 */
.btn-purple:disabled {
    background: #e8e8e8;
    color: #999;
    opacity: 1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.btn-purple:not(:disabled) {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* 激活态按钮（倍速/静音/循环选中） */
.btn-active {
    background: #7c3aed !important;
    color: #fff !important;
    border-color: #7c3aed !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
}

.info-box strong {
    color: #374151;
}
