.video-editor-container {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.upload-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f8fafc;
}

.upload-placeholder {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-placeholder:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.upload-placeholder .sub-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
}


.editor-workspace {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
}

.video-preview-box {
    width: 100%;
    background: #000;
    max-height: 500px;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

video {
    max-width: 100%;
    max-height: 500px;
}

.editor-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.control-group {
    flex: 1;
    min-width: 250px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.group-header {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-header {
    cursor: pointer;
    justify-content: space-between;
    transition: all 0.2s;
}

.toggle-header:hover {
    color: var(--primary-blue);
}

.toggle-header .arrow-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.toggle-header.active .arrow-icon {
    transform: rotate(180deg);
}

.trim-inputs {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s;
    max-height: 200px;
    opacity: 1;
}

.trim-inputs.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.trim-inputs label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-light);
}

.trim-inputs input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.small-btn {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.small-btn:hover {
    background: #f1f5f9;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.tools-grid-video {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-toggle input {
    display: none;
}

.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    font-size: 0.9rem;
    user-select: none;
}

.tool-toggle input:checked+.toggle-btn {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

.transform-buttons {
    display: flex;
    gap: 8px;
}

.icon-tool-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-tool-btn:hover {
    background: #eff6ff;
    color: var(--primary-blue);
    border-color: #bfdbfe;
}

.icon-tool-btn.active {
    background: var(--primary-blue);
    color: white;
}


.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}


.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.download-section {
    margin-top: 20px;
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    text-align: center;
}

.success-msg {
    color: #15803d;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.dl-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.full-width {
    width: 100%;
    flex-basis: 100%;
}

.timeline-container {
    padding: 10px 0;
    position: relative;
    user-select: none;
}

.timeline-visual {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    position: relative;
    margin-bottom: 5px;
}

.timeline-bar {
    width: 100%;
    height: 100%;
}

.timeline-range-highlight {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    width: 100%;
    pointer-events: none;
}

.timeline-progress {
    position: absolute;
    top: -2px;
    left: 0;
    bottom: -2px;
    width: 2px;
    background: #ef4444;
    z-index: 5;
    pointer-events: none;
}


.range-wrapper {
    position: relative;
    height: 20px;
    margin-top: -16px;
}

.timeline-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    background: none;
    z-index: 10;
}

.timeline-slider::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    cursor: ew-resize;
    margin-top: 0px;
}

.timeline-slider.end::-webkit-slider-thumb {
    background: #3b82f6;
}

.timeline-slider:focus {
    outline: none;
}

.time-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: monospace;
}