/* Merge Page Specific Styles */

/* Navigation */
.nav-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-tertiary);
}

.nav-links a.active {
    color: var(--primary);
    background: var(--bg-secondary);
}

/* Videos Section */
.videos-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.videos-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-count {
    color: var(--text-muted);
    font-weight: normal;
}

/* Video List */
.video-list {
    min-height: 100px;
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Video Item */
.video-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all 0.2s;
}

.video-item:active {
    cursor: grabbing;
}

.video-item.dragging {
    opacity: 0.5;
    transform: scale(1.02);
}

.video-item.drag-over {
    border: 2px dashed var(--primary);
}

.video-item .drag-handle {
    color: var(--text-muted);
    cursor: grab;
}

.video-item .thumbnail {
    width: 80px;
    height: 45px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.video-item .thumbnail.image-thumb {
    border: 2px solid var(--primary);
}

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

.video-item .filename {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-item .duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.video-item .actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: var(--text);
    background: var(--bg-secondary);
}

.btn-icon.delete:hover {
    color: var(--error);
}

/* Add Video Area */
.add-video-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.add-video-area:hover {
    border-color: var(--primary);
    color: var(--text);
}

.add-video-area .upload-icon {
    margin-bottom: 0.5rem;
}

/* Settings Row */
.setting-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.setting-row .setting-group {
    flex: 1;
}

/* Audio Section */
.audio-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.audio-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.audio-upload-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.audio-upload-area:hover {
    border-color: var(--primary);
    color: var(--text);
}

.audio-preview {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 1rem;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.audio-info span {
    flex: 1;
}

.audio-settings {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.audio-settings input[type="range"] {
    width: 100%;
}

/* Audio Library */
.audio-library {
    margin-bottom: 1rem;
}

.audio-select-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.audio-select-row select {
    flex: 1;
}

.audio-select-row .btn-icon {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.audio-select-row .btn-icon:not(:disabled):hover {
    background: var(--primary);
    color: white;
}

.audio-select-row .btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.audio-preview-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.preview-progress {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.preview-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

.preview-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 35px;
}

.audio-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.audio-divider::before,
.audio-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.audio-divider span {
    padding: 0 1rem;
}

.audio-selected {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.audio-selected .audio-info {
    margin-bottom: 0;
}

/* Result Section */
.result-section video {
    width: 100%;
    max-height: 50vh;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #000;
}

/* Duration Mode Section */
.duration-mode-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.duration-mode-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

/* Radio Labels */
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-right: 1.5rem;
    font-size: 0.9rem;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Ken Burns Section */
.ken-burns-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.ken-burns-section h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.setting-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Voice-Over Section */
.voiceover-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.voiceover-section h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.voiceover-list {
    min-height: 50px;
    margin-bottom: 1rem;
}

.voiceover-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 0.4rem;
    cursor: grab;
    transition: all 0.2s;
    border-left: 3px solid #9b59b6;
}

.voiceover-item:active {
    cursor: grabbing;
}

.voiceover-item.dragging {
    opacity: 0.5;
    transform: scale(1.02);
}

.voiceover-item.drag-over {
    border: 2px dashed var(--primary);
}

.voiceover-item .drag-handle {
    color: var(--text-muted);
    cursor: grab;
    flex-shrink: 0;
}

.voiceover-item .vo-icon {
    color: #9b59b6;
    flex-shrink: 0;
}

.voiceover-item .vo-info {
    flex: 1;
    min-width: 0;
}

.voiceover-item .vo-filename {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.voiceover-item .vo-status {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.voiceover-item .vo-number {
    background: #9b59b6;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    flex-shrink: 0;
}

.voiceover-upload-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
}

.voiceover-upload-area:hover {
    border-color: #9b59b6;
    color: var(--text);
}

.voiceover-settings {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .setting-row {
        flex-direction: column;
    }

    .video-item .thumbnail {
        width: 60px;
        height: 34px;
    }
}
