/* 管理员视频管理页面样式 - SPA版本 */

.admin-container {
    min-height: 100vh;
    background-color: var(--bs-light);
}

.sidebar {
    background-color: var(--bs-white);
    border-right: 1px solid var(--bs-border-color);
    min-height: 100vh;
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: var(--bs-dark);
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0.25rem 0.5rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.sidebar .nav-link:hover {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.sidebar .nav-link.active {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.main-content {
    padding: 2rem;
}

.page-header {
    background-color: var(--bs-white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.action-buttons {
    background-color: var(--bs-white);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* SPA内容区域切换 */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* 按钮组显示控制 */
.action-group {
    display: none;
}

.action-group.active {
    display: block;
}

.content-card {
    background-color: var(--bs-white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.video-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.video-title {
    font-weight: 500;
    /* max-width: 200px; */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.video-description {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-secondary);
    font-size: 0.875rem;
}

/* 播放列表样式 */
.playlist-name {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.playlist-description {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-secondary);
    font-size: 0.875rem;
}

/* 评论样式 */
.comment-content {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
}

.comment-user {
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-video {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--bs-secondary);
    font-size: 0.875rem;
}

.upload-progress {
    margin-top: 1rem;
}

.search-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-filters .form-control,
.search-filters .form-select {
    min-width: 200px;
}

.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: var(--bs-light);
    border-bottom: 2px solid var(--bs-border-color);
    font-weight: 600;
}

.btn-group .btn {
    border-radius: 0.25rem !important;
    margin: 0 0.125rem;
}

.pagination {
    margin-top: 1.5rem;
    justify-content: center;
}

.modal-header {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.modal-header .btn-close {
    filter: invert(1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2055;
}

/* 页面切换动画 */
.content-section {
    transition: opacity 0.3s ease-in-out;
}

.content-section:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.content-section.active {
    opacity: 1;
    pointer-events: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .search-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filters .form-control,
    .search-filters .form-select {
        min-width: auto;
        width: 100%;
    }
    
    .video-title,
    .video-description,
    .playlist-name,
    .playlist-description,
    .comment-content {
        max-width: 150px;
    }
    
    .comment-user,
    .comment-video {
        max-width: 120px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin: 0.125rem 0;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .video-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .video-title,
    .video-description,
    .playlist-name,
    .playlist-description,
    .comment-content {
        max-width: 100px;
    }
    
    .comment-user,
    .comment-video {
        max-width: 80px;
    }
}

/* 深色模式 */
[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #ffffff;
}

[data-theme="dark"] .admin-container {
    background-color: #1a1a1a;
    color: #ffffff;
}

[data-theme="dark"] .sidebar {
    background-color: #2d2d2d;
    border-right-color: #404040;
}

[data-theme="dark"] .sidebar .nav-link {
    color: #ffffff;
}

[data-theme="dark"] .sidebar .nav-link:hover {
    background-color: #0d6efd;
}

[data-theme="dark"] .page-header,
[data-theme="dark"] .action-buttons,
[data-theme="dark"] .content-card {
    background-color: #2d2d2d;
    color: #ffffff;
}

[data-theme="dark"] .table {
    color: #ffffff;
    --bs-table-bg: transparent;
}

[data-theme="dark"] .table th {
    background-color: #404040;
    border-bottom-color: #555555;
    color: #ffffff;
}

[data-theme="dark"] .table td {
    border-top-color: #404040;
    color: #ffffff !important;
    background-color: transparent;
}

/* 确保表格中的数字字段在深色模式下清晰可见 */
[data-theme="dark"] .table td:nth-child(5),  /* 观看次数 */
[data-theme="dark"] .table td:nth-child(6),  /* 点赞数 */
[data-theme="dark"] .table td:nth-child(7) { /* 上传时间 */
    color: #ffffff !important;
    font-weight: 500;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .table-hover > tbody > tr:hover > td {
    background-color: rgba(255, 255, 255, 0.075);
}

/* 表格响应式容器深色模式 */
[data-theme="dark"] .table-responsive {
    background-color: #2d2d2d;
    border: 1px solid #404040;
}

/* 表格内的文字元素深色模式 */
[data-theme="dark"] .table .video-title,
[data-theme="dark"] .table .playlist-name,
[data-theme="dark"] .table .comment-user {
    color: #ffffff !important;
}

[data-theme="dark"] .table .video-description,
[data-theme="dark"] .table .playlist-description,
[data-theme="dark"] .table .comment-content,
[data-theme="dark"] .table .comment-video {
    color: #adb5bd !important;
}

/* 表格内的徽章和状态标签深色模式 */
[data-theme="dark"] .table .badge {
    background-color: #404040 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .table .badge.bg-success {
    background-color: #198754 !important;
}

[data-theme="dark"] .table .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

[data-theme="dark"] .table .badge.bg-danger {
    background-color: #dc3545 !important;
}

/* 表格内的按钮深色模式 */
[data-theme="dark"] .table .btn {
    border-color: #555555;
}

[data-theme="dark"] .table .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

[data-theme="dark"] .table .btn-outline-secondary {
    color: #adb5bd;
    border-color: #adb5bd;
}

[data-theme="dark"] .table .btn-outline-danger {
    color: #ea868f;
    border-color: #ea868f;
}

[data-theme="dark"] .table .btn-outline-info {
    color: #6edff6;
    border-color: #6edff6;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #404040;
    border-color: #555555;
    color: #ffffff;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #404040;
    border-color: #0d6efd;
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

[data-theme="dark"] .form-control::placeholder {
    color: #adb5bd;
}

[data-theme="dark"] .modal-content {
    background-color: #2d2d2d;
    color: #ffffff;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #404040;
    background-color: #0d6efd;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #404040;
}

[data-theme="dark"] .btn-outline-primary {
    color: #6ea8fe;
    border-color: #6ea8fe;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background-color: #6ea8fe;
    border-color: #6ea8fe;
    color: #000000;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: #adb5bd;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #adb5bd;
    border-color: #adb5bd;
    color: #000000;
}

[data-theme="dark"] .btn-outline-danger {
    color: #ea868f;
    border-color: #ea868f;
}

[data-theme="dark"] .btn-outline-danger:hover {
    background-color: #ea868f;
    border-color: #ea868f;
    color: #000000;
}

[data-theme="dark"] .btn-outline-info {
    color: #6edff6;
    border-color: #6edff6;
}

[data-theme="dark"] .btn-outline-info:hover {
    background-color: #6edff6;
    border-color: #6edff6;
    color: #000000;
}

[data-theme="dark"] .btn-outline-warning {
    color: #ffda6a;
    border-color: #ffda6a;
}

[data-theme="dark"] .btn-outline-warning:hover {
    background-color: #ffda6a;
    border-color: #ffda6a;
    color: #000000;
}

[data-theme="dark"] .border-bottom {
    border-color: #404040 !important;
}

[data-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-theme="dark"] .bg-light {
    background-color: #404040 !important;
}

[data-theme="dark"] .pagination .page-link {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] .pagination .page-link:hover {
    background-color: #404040;
    border-color: #555555;
    color: #ffffff;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #ffffff;
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #6c757d;
}

/* 封面选择模态框样式 */
.video-container {
    position: relative;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.cover-controls {
    background-color: var(--bs-white);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.cover-preview {
    background-color: var(--bs-white);
    border-radius: 0.5rem;
    padding: 1rem;
}

#coverPreviewContainer {
    background-color: var(--bs-light);
    border: 2px dashed var(--bs-border-color);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#coverPreviewContainer img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.time-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* 深色模式支持 */
[data-theme="dark"] .cover-controls {
    background-color: #2d2d2d;
    color: #ffffff;
}

[data-theme="dark"] .cover-preview {
    background-color: #2d2d2d;
    color: #ffffff;
}

[data-theme="dark"] #coverPreviewContainer {
    background-color: #404040;
    border-color: #555555;
    color: #ffffff;
}

[data-theme="dark"] .video-container {
    background: #000;
}

/* 主内容区深色模式优化 */
[data-theme="dark"] .main-content {
    background-color: #1a1a1a;
    color: #ffffff;
}

[data-theme="dark"] .video-description,
[data-theme="dark"] .playlist-description,
[data-theme="dark"] .comment-video {
    color: #adb5bd;
}

[data-theme="dark"] .upload-progress {
    background-color: #2d2d2d;
}

[data-theme="dark"] .upload-progress .progress {
    background-color: #404040;
}

[data-theme="dark"] .alert {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] .alert-success {
    background-color: #0f5132;
    border-color: #0a3622;
    color: #75b798;
}

[data-theme="dark"] .alert-danger {
    background-color: #58151c;
    border-color: #842029;
    color: #ea868f;
}

[data-theme="dark"] .alert-warning {
    background-color: #664d03;
    border-color: #997404;
    color: #ffda6a;
}

[data-theme="dark"] .alert-info {
    background-color: #055160;
    border-color: #087990;
    color: #6edff6;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .dropdown-item {
    color: #ffffff;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] .dropdown-divider {
    border-color: #404040;
}

[data-theme="dark"] .toast {
    background-color: #2d2d2d;
    border-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] .toast-header {
    background-color: #404040;
    border-bottom-color: #555555;
    color: #ffffff;
}

/* 进度条样式优化 */
.form-range {
    height: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    width: 1rem;
    height: 1rem;
    background-color: var(--bs-primary);
    border: 2px solid var(--bs-white);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.form-range::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    background-color: var(--bs-primary);
    border: 2px solid var(--bs-white);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

[data-theme="dark"] .form-range::-webkit-slider-thumb {
    border-color: #2d2d2d;
}

[data-theme="dark"] .form-range::-moz-range-thumb {
    border-color: #2d2d2d;
}

/* 视频多选功能样式 */
.video-selection-container {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    background-color: var(--bs-body-bg);
}

.video-selection-list {
    background-color: var(--bs-body-bg);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.video-selection-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    background-color: var(--bs-white);
    position: relative;
}

.video-selection-item:hover {
    background-color: var(--bs-light);
    border-color: var(--bs-primary);
}

.video-selection-item.selected {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-color: var(--bs-primary);
}

.video-selection-item .form-check-input {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    cursor: pointer;
    z-index: 2;
}

.video-selection-item .video-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    background-color: var(--bs-light);
}

.video-selection-item .video-info {
    flex: 1;
    min-width: 0;
}

.video-selection-item .video-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--bs-dark);
    line-height: 1.3;
}

.video-selection-item .video-meta {
    font-size: 0.75rem;
    color: var(--bs-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.video-selection-item .video-duration {
    font-size: 0.75rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
}

.video-selection-item .video-thumbnail-container {
    position: relative;
    display: block;
    margin-bottom: 0.5rem;
}

.video-selection-item .video-actions {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
}

.selected-videos-summary {
    padding: 0.5rem;
    background-color: var(--bs-light);
    border-radius: 0.25rem;
    text-align: center;
}

/* 深色模式支持 */
[data-theme="dark"] .video-selection-container {
    background-color: #2d2d2d;
    border-color: #495057;
}

[data-theme="dark"] .video-selection-item {
    background-color: #343a40;
    border-color: #495057;
}

[data-theme="dark"] .video-selection-item:hover {
    background-color: #495057;
}

[data-theme="dark"] .video-selection-item.selected {
    background-color: rgba(13, 110, 253, 0.2);
}

[data-theme="dark"] .video-selection-item .video-title {
    color: #ffffff;
}

[data-theme="dark"] .video-selection-item .video-meta {
    color: #adb5bd;
}

[data-theme="dark"] .selected-videos-summary {
    background-color: #495057;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .video-selection-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .video-selection-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    #coverSelectionModal .modal-dialog {
        margin: 0.5rem;
    }
    
    .video-container {
        margin-bottom: 1rem;
    }
    
    #coverVideo {
        max-height: 250px;
    }
    
    .cover-preview {
        margin-top: 1rem;
    }
    
    .video-selection-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 0.5rem;
        padding: 0.5rem 0;
    }
    
    .video-selection-item .video-thumbnail {
        height: 100px;
    }
}

/* 播放列表缩略图样式 */
.playlist-thumbnail {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--bs-border-color);
    transition: transform 0.2s ease-in-out;
}

.playlist-thumbnail:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 深色模式下的播放列表缩略图 */
[data-theme="dark"] .playlist-thumbnail {
    border-color: #495057;
}

[data-theme="dark"] .playlist-thumbnail:hover {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* 批量上传样式 */
.batch-drop-zone {
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 3rem 2rem;
    text-align: center;
    background-color: var(--bs-light);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.batch-drop-zone:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.batch-drop-zone.drag-over {
    border-color: var(--bs-success);
    background-color: rgba(var(--bs-success-rgb), 0.1);
    transform: scale(1.02);
}

.batch-drop-zone i {
    font-size: 3rem;
    color: var(--bs-secondary);
    margin-bottom: 1rem;
}

.batch-drop-zone.drag-over i {
    color: var(--bs-success);
}

.batch-file-item {
    background-color: var(--bs-white);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.batch-file-item:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-color: var(--bs-primary);
}

.batch-file-status .badge {
    font-size: 0.75rem;
}

.batch-progress-item {
    background-color: var(--bs-white);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.batch-progress-item .progress {
    height: 6px;
    margin-top: 0.5rem;
}

.batch-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.batch-result-card {
    background-color: var(--bs-white);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.batch-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.batch-result-card .card-img-top {
    height: 140px;
    background-color: var(--bs-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.batch-result-card .card-img-top img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.batch-result-card .card-body {
    padding: 1rem;
}

.batch-result-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 新播放列表字段动画 */
.new-playlist-fields {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

.new-playlist-fields.show {
    max-height: 200px;
    opacity: 1;
}

.new-playlist-fields.hide {
    max-height: 0;
    opacity: 0;
}

/* 批量上传模态框样式 */
.batch-upload-modal .modal-dialog {
    max-width: 800px;
}

.batch-upload-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* 深色模式适配 */
[data-theme="dark"] .batch-drop-zone {
    background-color: var(--bs-dark);
    border-color: #495057;
    color: var(--bs-light);
}

[data-theme="dark"] .batch-drop-zone:hover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

[data-theme="dark"] .batch-drop-zone.drag-over {
    border-color: var(--bs-success);
    background-color: rgba(var(--bs-success-rgb), 0.15);
}

[data-theme="dark"] .batch-file-item {
    background-color: var(--bs-dark);
    border-color: #495057;
    color: var(--bs-light);
}

[data-theme="dark"] .batch-file-item:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0.125rem 0.25rem rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .batch-progress-item {
    background-color: var(--bs-dark);
    border-color: #495057;
    color: var(--bs-light);
}

/* 视频选择控制按钮样式 */
.video-selection-controls {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bs-border-color);
    margin-bottom: 0.5rem;
}

.video-selection-controls .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.video-selection-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.video-selection-controls .btn:active {
    transform: translateY(0);
}

.video-selection-controls .btn i {
    font-size: 1rem;
}

/* 全选按钮特殊样式 */
#selectAllVideosBtn {
    background-color: transparent;
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

#selectAllVideosBtn:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.3);
}

/* 全部取消按钮特殊样式 */
#deselectAllVideosBtn {
    background-color: transparent;
    border-color: var(--bs-secondary);
    color: var(--bs-secondary);
}

#deselectAllVideosBtn:hover {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--bs-secondary-rgb), 0.3);
}

/* 深色模式下的视频选择控制按钮 */
[data-theme="dark"] .video-selection-controls {
    border-bottom-color: #495057;
}

[data-theme="dark"] .video-selection-controls .btn:hover {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #selectAllVideosBtn {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

[data-theme="dark"] #selectAllVideosBtn:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--bs-primary-rgb), 0.4);
}

[data-theme="dark"] #deselectAllVideosBtn {
    border-color: #6c757d;
    color: #6c757d;
}

[data-theme="dark"] #deselectAllVideosBtn:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.4);
}

[data-theme="dark"] .batch-result-card {
    background-color: var(--bs-dark);
    border-color: #495057;
    color: var(--bs-light);
}

[data-theme="dark"] .batch-result-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .batch-result-card .card-img-top {
    background-color: #495057;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .batch-upload-modal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .batch-drop-zone {
        padding: 2rem 1rem;
        min-height: 150px;
    }
    
    .batch-drop-zone i {
        font-size: 2rem;
    }
    
    .batch-result-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 0.75rem;
    }
    
    .batch-file-item {
        padding: 0.75rem;
    }
}

/* 编辑播放列表模态框固定定位样式 */
#editPlaylistModal .modal-content {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    border-radius: 0;
}

#editPlaylistModal .modal-dialog {
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    max-width: none;
    width: 100%;
}

#editPlaylistModal .modal-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#editPlaylistModal .modal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    background-color: var(--bs-white);
    border-top: 1px solid var(--bs-border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

#editPlaylistModal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    margin-top: 80px; /* 为固定header留出空间 */
    margin-bottom: 80px; /* 为固定footer留出空间 */
    background-color: var(--bs-body-bg);
}

/* 深色模式支持 */
[data-theme="dark"] #editPlaylistModal .modal-header {
    background-color: var(--bs-dark);
    border-bottom-color: #495057;
    color: var(--bs-light);
}

[data-theme="dark"] #editPlaylistModal .modal-footer {
    background-color: var(--bs-dark);
    border-top-color: #495057;
}

[data-theme="dark"] #editPlaylistModal .modal-body {
    background-color: var(--bs-dark);
}

/* 响应式调整 */
@media (min-width: 992px) {
    #editPlaylistModal .modal-dialog {
        width: 90%;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    #editPlaylistModal .modal-content {
        border-radius: 0.5rem;
        height: 90vh;
        max-height: 90vh;
        margin: 5vh auto;
    }
    
    #editPlaylistModal .modal-header {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        border-radius: 0.5rem 0.5rem 0 0;
    }
    
    #editPlaylistModal .modal-footer {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        border-radius: 0 0 0.5rem 0.5rem;
    }
    
    #editPlaylistModal .modal-body {
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* 视频排序样式 */
.video-sorting-container {
    background-color: var(--bs-white);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.video-sorting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.video-sorting-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bs-dark);
    margin: 0;
}

.save-order-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.save-order-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.save-order-btn:disabled {
    background: var(--bs-secondary);
    transform: none;
    box-shadow: none;
}

.sorting-instructions {
    background-color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--bs-secondary);
}

.sortable-video-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    background-color: var(--bs-white);
}

.sortable-video-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color);
    background-color: var(--bs-white);
    transition: all 0.2s ease;
    cursor: move;
}

.sortable-video-item:last-child {
    border-bottom: none;
}

.sortable-video-item:hover {
    background-color: var(--bs-light);
}

.sortable-video-item.sortable-chosen {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
}

.sortable-video-item.sortable-ghost {
    opacity: 0.5;
    background-color: var(--bs-secondary-bg);
}

.sortable-video-item.sortable-drag {
    opacity: 0.8;
    transform: rotate(2deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 0.75rem;
    color: var(--bs-secondary);
    cursor: grab;
    transition: color 0.2s ease;
}

.video-drag-handle:hover {
    color: var(--bs-primary);
}

.video-drag-handle:active {
    cursor: grabbing;
}

.sortable-video-item .video-thumbnail {
    position: relative;
    width: 80px;
    height: 60px;
    margin-right: 0.75rem;
    border-radius: 0.375rem;
    overflow: hidden;
    flex-shrink: 0;
}

.sortable-video-item .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sortable-video-item .video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.sortable-video-item .video-info {
    flex: 1;
    min-width: 0;
    margin-right: 0.75rem;
}

.sortable-video-item .video-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--bs-dark);
    margin: 0 0 0.25rem 0;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}

.sortable-video-item .video-info small {
    color: var(--bs-secondary);
    font-size: 0.8rem;
}

.video-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.move-up-btn,
.move-down-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.move-up-btn:hover:not(:disabled),
.move-down-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.move-up-btn:disabled,
.move-down-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 深色模式样式 */
[data-theme="dark"] .video-sorting-container {
    background-color: var(--bs-dark);
    border-color: #495057;
}

[data-theme="dark"] .video-sorting-title {
    color: var(--bs-light);
}

[data-theme="dark"] .sorting-instructions {
    background-color: #343a40;
    border-color: #495057;
    color: var(--bs-light);
}

[data-theme="dark"] .sortable-video-list {
    background-color: var(--bs-dark);
    border-color: #495057;
}

[data-theme="dark"] .sortable-video-item {
    background-color: var(--bs-dark);
    border-color: #495057;
}

[data-theme="dark"] .sortable-video-item:hover {
    background-color: #343a40;
}

[data-theme="dark"] .sortable-video-item.sortable-chosen {
    background-color: rgba(13, 110, 253, 0.2);
    border-color: var(--bs-primary);
}

[data-theme="dark"] .sortable-video-item.sortable-ghost {
    background-color: #495057;
}

[data-theme="dark"] .sortable-video-item .video-title {
    color: var(--bs-light);
}

[data-theme="dark"] .video-drag-handle {
    color: #adb5bd;
}

[data-theme="dark"] .video-drag-handle:hover {
    color: var(--bs-primary);
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .video-sorting-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .save-order-btn {
        width: 100%;
        justify-content: center;
    }
    
    .sortable-video-item {
        padding: 0.5rem;
    }
    
    .sortable-video-item .video-thumbnail {
        width: 60px;
        height: 45px;
        margin-right: 0.5rem;
    }
    
    .sortable-video-item .video-title {
        font-size: 0.875rem;
    }
    
    .video-actions {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .move-up-btn,
    .move-down-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .video-drag-handle {
        width: 20px;
        height: 20px;
        margin-right: 0.5rem;
    }
    
    .sorting-instructions {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .sortable-video-item {
        padding: 1rem 0.75rem;
    }
    
    .video-drag-handle {
        width: 32px;
        height: 32px;
        margin-right: 0.75rem;
    }
    
    .move-up-btn,
    .move-down-btn {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .video-actions {
        gap: 0.5rem;
    }
}

/* 移动端汉堡菜单样式 */
.mobile-menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1050;
    background: var(--bs-white);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    width: 48px;
    height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--bs-light);
    transform: scale(1.05);
}

.mobile-menu-toggle.active {
    background: var(--bs-primary);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--bs-dark);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line {
    background: var(--bs-white);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端遮罩层 */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 移动端侧边栏样式 */
@media (max-width: 767.98px) {
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1045;
        background: var(--bs-white);
        border-right: 1px solid var(--bs-border-color);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .mobile-sidebar.show {
        left: 0;
    }
    
    .mobile-sidebar .position-sticky {
        position: static;
        padding-top: 5rem;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 5rem;
    }
}

/* 深色模式支持 */
[data-theme="dark"] .mobile-menu-toggle {
    background: var(--bs-dark);
    border-color: var(--bs-secondary);
}

[data-theme="dark"] .mobile-menu-toggle:hover {
    background: var(--bs-secondary);
}

[data-theme="dark"] .hamburger-line {
    background: var(--bs-light);
}

[data-theme="dark"] .mobile-menu-toggle.active {
    background: var(--bs-primary);
}

[data-theme="dark"] .mobile-menu-toggle.active .hamburger-line {
    background: var(--bs-white);
}

[data-theme="dark"] .mobile-sidebar {
    background: var(--bs-dark);
    border-color: var(--bs-secondary);
}

[data-theme="dark"] .mobile-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.table>:not(caption)>*>* {

     background-color: transparent;

}