/* GIF Editor Styles */

.editor-container {
    max-width: 1400px;
}

.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Layout */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1000px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
}

/* Preview Panel */
.preview-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.editor-dropzone:hover,
.editor-dropzone.dragover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.editor-preview {
    width: 100%;
    text-align: center;
}

.editor-preview img,
.editor-preview video {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.preview-info {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Controls Panel */
.controls-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.control-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.control-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.control-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-group {
    margin-bottom: 0.75rem;
}

.control-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

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

/* Button Groups */
.button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ctrl-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.ctrl-btn:hover {
    border-color: var(--accent);
}

.ctrl-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Preset Grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.preset-btn-editor {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.preset-btn-editor:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* Dual Slider */
.dual-slider {
    position: relative;
    height: 30px;
}

.dual-slider input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    background: transparent;
}

.dual-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
}

/* Color Tint */
.color-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-row input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.color-row input[type="range"] {
    flex: 1;
}

/* Crop Inputs */
.crop-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.crop-inputs input {
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
}

/* Editor Actions */
.editor-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-reset {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
}

.btn-reset:hover {
    border-color: var(--error);
    color: var(--error);
}

.btn-process {
    flex: 2;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent) 0%, #a855f7 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-process:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-process:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Result */
.editor-result {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.result-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 700px) {
    .result-compare {
        grid-template-columns: 1fr;
    }
}

.compare-item {
    text-align: center;
}

.compare-item h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.compare-item img,
.compare-item video {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

#editorResultInfo {
    text-align: center;
    margin-top: 1rem;
}

/* Scrollbar for controls */
.controls-panel::-webkit-scrollbar {
    width: 6px;
}

.controls-panel::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
