/* style.css for Video Editor */

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
    gap: 1.5rem;
}

/* Toolbar */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 16px;
    flex-shrink: 0;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.toolbar-right {
    justify-content: flex-end;
}

.toolbar-center {
    flex: 1;
    text-align: center;
}

.upload-btn {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-btn:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.file-name {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.export-btn {
    background: var(--accent-secondary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover:not(:disabled) {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
}

.export-btn:disabled {
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
    cursor: not-allowed;
}

.loading-status {
    color: var(--accent-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Main Workspace */
.editor-workspace {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-height: 0; /* Important for flex child scrolling */
}

/* Left Panel: Preview & Timeline */
.preview-area {
    flex: 3;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 1.5rem;
    gap: 1.5rem;
}

.video-wrapper {
    flex: 1;
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

video {
    width: 100%;
    height: 100%;
    max-height: 50vh;
    outline: none;
    display: none; /* hidden until loaded */
}

.video-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.video-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Custom Dual Range Slider (Timeline) */
.timeline-container {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.range-slider {
    position: relative;
    width: 100%;
    height: 30px;
}

.slider-track {
    width: 100%;
    height: 8px;
    background: var(--glass-highlight);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 4px;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 30px;
    top: 0;
    margin: 0;
    appearance: none;
    background: none;
    pointer-events: none;
}

/* Range slider thumbs */
.range-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 24px;
    background: var(--accent-primary);
    border-radius: 4px;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 24px;
    background: var(--accent-primary);
    border-radius: 4px;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--accent-secondary);
}

/* Right Panel: Settings */
.inspector-panel {
    flex: 1;
    min-width: 300px;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.inspector-panel h3 {
    font-size: 1.2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.8rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.setting-group select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.setting-group select:focus {
    border-color: var(--accent-primary);
}

.setting-group select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.setting-group select option {
    background: var(--bg-gradient-end);
}

.info-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: #10b981;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-top: auto;
}

/* Progress UI */
.progress-container {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-secondary);
    transition: width 0.3s ease;
}

.progress-log {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 900px) {
    .editor-workspace {
        flex-direction: column;
    }
    
    .editor-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .toolbar-left, .toolbar-right {
        width: 100%;
        justify-content: center;
    }
}
