/* ANTIMATTER — minimal + salmon */

:root {
    --void: #0a0a0a;
    --surface: #111111;
    --border: #1a1a1a;
    --muted: #666666;
    --ghost: #888;
    --accent: #e5e5e5;
    --salmon: #FF6A00;
}

/* Tema claro */
body.theme-light {
    --void: #f5f5f5;
    --surface: #ffffff;
    --border: #e0e0e0;
    --muted: #757575;
    --ghost: #616161;
    --accent: #212121;
    --salmon: #e65100;
}

body.theme-light .am-dropzone .dz-preview .dz-remove {
    background: rgba(255, 255, 255, 0.95);
}

body.theme-light .am-dropzone .dz-preview .dz-remove:hover {
    background: #c62828;
    color: #fff;
}

/* Dropzone — compacto, horizontal, responsive */
.am-dropzone {
    min-height: 100px;
    border: 1px dashed var(--border);
    background: transparent;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
}

@media (max-width: 640px) {
    .am-dropzone {
        min-height: 110px;
        padding: 16px;
    }
    .am-dropzone .dz-message .text-xs {
        font-size: 11px;
    }
}

.am-dropzone:hover,
.am-dropzone.dz-drag-hover {
    border-color: var(--salmon);
}

.am-dropzone .dz-message {
    margin: 0;
    flex: 0 0 100%;
}

.am-dropzone .dz-preview {
    flex: 0 0 auto;
}

.am-dropzone .dz-preview {
    margin: 0;
    position: relative;
    width: 56px;
    height: 56px;
    min-width: 56px;
}

.am-dropzone .dz-preview .dz-image {
    width: 56px !important;
    height: 56px !important;
    border-radius: 2px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.am-dropzone .dz-preview .dz-image img {
    width: 56px !important;
    height: 56px !important;
    object-fit: cover;
}

.am-dropzone .dz-preview .dz-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    color: var(--muted);
    background: rgba(10, 10, 10, 0.9);
    border: none;
    text-decoration: none;
    cursor: pointer;
    z-index: 2;
}

.am-dropzone .dz-preview .dz-remove:hover {
    color: #fff;
    background: #c00;
}

.am-dropzone .dz-preview .dz-success-mark,
.am-dropzone .dz-preview .dz-error-mark {
    margin-top: -18px;
    margin-left: -18px;
    width: 36px;
    height: 36px;
}

.am-dropzone .dz-preview .dz-success-mark svg,
.am-dropzone .dz-preview .dz-error-mark svg {
    fill: var(--salmon);
}

/* Slider — deslizable, salmon */
.am-range {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
}

.am-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--salmon);
    cursor: grab;
    border: none;
    border-radius: 50%;
    transition: transform 0.15s, background 0.15s;
}

.am-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.am-range::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.am-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--salmon);
    cursor: grab;
    border: none;
    border-radius: 50%;
    transition: transform 0.15s, background 0.15s;
}

.am-range::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.am-range::-moz-range-thumb:active {
    cursor: grabbing;
}

/* Slider táctil en móviles — área de toque mayor */
@media (pointer: coarse) {
    .am-range::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
        margin-top: -2px;
    }
    .am-range::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
}

/* Botones — outlines sutiles */
.am-btn {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--accent);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

#status-line {
    transition: color 0.2s;
}

.am-btn:hover:not(:disabled) {
    border-color: var(--salmon);
    background: rgba(255, 106, 0, 0.12);
}

.am-btn-primary {
    background: var(--accent);
    color: var(--void);
    border-color: var(--accent);
}

.am-btn-primary:hover:not(:disabled) {
    background: var(--salmon);
    border-color: var(--salmon);
}

.am-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.am-btn-secondary {
    border-color: var(--border);
}

.am-btn-secondary:not(.pointer-events-none):not(.opacity-40):hover {
    border-color: var(--salmon);
    color: var(--salmon);
}

/* Barra de progreso */
#progress-bar {
    min-width: 0;
}

/* Micro-animación al completar (#5) */
#progress-bar.am-progress-complete {
    animation: am-progress-pulse 0.6s ease-out;
}

@keyframes am-progress-pulse {
    0% { opacity: 1; transform: scaleX(1); }
    50% { opacity: 0.7; }
    100% { opacity: 1; transform: scaleX(1); }
}

/* Modal vista previa */
#preview-modal {
    backdrop-filter: blur(4px);
}
#preview-modal img {
    max-height: 85vh;
    object-fit: contain;
}

/* Responsive — botones apilados en móvil */
@media (max-width: 640px) {
    .am-btn {
        min-height: 48px;
    }
    #convert-btn {
        order: 2;
    }
    #download-btn {
        order: 1;
    }
}
