﻿#main_bg {
    background-image: url(../assets/images/background/pbr_bg.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    position: fixed;
    min-height: 100vh;
    width: 100%;
    background-attachment: fixed;
    z-index: -1;
}

#panel {
    font-family: "Yu Gothic UI", sans-serif;
    padding: 14px !important;
    display: flex;
    gap: 16px;
    height: calc(100vh - 8vh - 20px);
    overflow: hidden;
}

.queue-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.queue-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(55, 177, 140, 0.9), rgba(35, 137, 107, 0.95));
    border-radius: 10px;
    border: 1px solid rgba(55, 177, 140, 0.3);
    box-shadow: 0 2px 8px rgba(55, 177, 140, 0.2);
    text-align: center;
}

.file-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
    border: 1px solid rgba(55, 177, 140, 0.15);
}

.file-list:empty::before {
    content: "暂无视频";
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.file-item {
    background: #ffffff;
    border: 1px solid rgba(55, 177, 140, 0.2);
    border-radius: 10px;
    padding: 9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.file-item.active {
    border-color: rgba(84, 126, 199, 0.55);
    box-shadow: 0 0 0 2px rgba(84, 126, 199, 0.16);
}

.file-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.file-name {
    font-size: 12px;
    color: #1f2937;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 10px;
    color: #6b7280;
    white-space: nowrap;
}

.file-meta {
    font-size: 10px;
    color: #64748b;
}

.file-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 10px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}

.status-badge.pending {
    background: rgba(100, 116, 139, 0.15);
    color: #475569;
}

.status-badge.processing {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.status-badge.completed {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.file-actions {
    display: flex;
    gap: 6px;
}

.file-actions button {
    flex: 1;
    border: none;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.file-actions .btn-preview {
    background: rgba(84, 126, 199, 0.75);
    color: #fff;
}

.file-actions .btn-download {
    background: rgba(55, 177, 140, 0.8);
    color: #fff;
}

.file-actions .btn-remove {
    background: rgba(185, 28, 28, 0.76);
    color: #fff;
}

.file-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.main-content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.main-content h1 {
    font-size: 17px;
    margin: 0;
    color: #111827;
}

.subtitle {
    margin: 4px 0 10px;
    font-size: 12px;
    color: #475569;
}

.upload-section {
    margin-bottom: 10px;
}

.upload-area {
    border: 2px dashed rgba(55, 177, 140, 0.4);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 250, 248, 0.9));
    cursor: pointer;
    transition: all 0.25s ease;
}

.upload-area:hover {
    border-color: rgba(55, 177, 140, 0.7);
    box-shadow: 0 4px 14px rgba(55, 177, 140, 0.16);
}

.upload-area.drag-over {
    background: rgba(55, 177, 140, 0.14);
    border-color: rgba(55, 177, 140, 0.86);
}

.upload-content svg {
    width: 32px;
    height: 32px;
    color: rgba(55, 177, 140, 0.9);
    margin-bottom: 6px;
}

.upload-content p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.upload-content .sub-text {
    margin-top: 3px;
    font-size: 11px;
    color: #64748b;
}

.settings-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid rgba(55, 177, 140, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 251, 0.96));
}

.setting-group {
    padding: 9px;
    border-radius: 8px;
    border: 1px solid rgba(55, 177, 140, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

.setting-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    color: rgba(55, 177, 140, 0.95);
}

.setting-group select,
.setting-group input[type="number"] {
    width: 100%;
    border: 1.5px solid rgba(55, 177, 140, 0.3);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    background: #fff;
}

.setting-group input[type="range"] {
    width: 100%;
    accent-color: rgb(55, 177, 140);
}

.hint {
    margin-top: 4px;
    font-size: 10px;
    color: #64748b;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid rgba(55, 177, 140, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
}

.btn-primary,
.btn-secondary {
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 13px;
    font-family: "Yu Gothic UI", sans-serif;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background: rgba(55, 177, 140, 0.86);
}

.btn-primary:disabled {
    background: rgba(148, 163, 184, 0.8);
    cursor: not-allowed;
}

.btn-secondary {
    color: #fff;
    background: rgba(100, 116, 139, 0.75);
}

.progress-container {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(55, 177, 140, 0.18);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 18px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(226, 232, 240, 0.9);
}

.progress-fill {
    width: 0;
    height: 100%;
    transition: width 0.2s ease;
    background: linear-gradient(90deg, rgba(55, 177, 140, 0.85), rgba(56, 189, 248, 0.88));
}

.progress-text {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    color: #334155;
}

.preview-panel {
    border: 1px solid rgba(55, 177, 140, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
    gap: 10px;
}

.preview-header h2 {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
}

.preview-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#previewMetrics {
    font-size: 11px;
    color: #64748b;
}

#previewFileName {
    font-size: 11px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55%;
}

.video-compare {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 16 / 9;
}

.video-compare video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

#previewAfter {
    clip-path: inset(0 0 0 50%);
}

.compare-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

#compareSlider {
    width: 100%;
    margin-top: 8px;
    accent-color: rgb(55, 177, 140);
}

@media (max-width: 1250px) {
    #panel {
        flex-direction: column;
        height: auto;
    }

    .queue-sidebar {
        width: 100%;
        max-height: 300px;
    }

    .settings-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .settings-panel {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .action-buttons button {
        flex: 1;
        min-width: 120px;
    }
}
