/* =========================================
   GIAO DIỆN SOFT NEO-BRUTALISM (PASTEL)
========================================= */
:root {
    --border-soft: 2px solid #2d3142;
    --shadow-soft: 4px 4px 0px rgba(45, 49, 66, 0.8);
    --shadow-soft-hover: 2px 2px 0px rgba(45, 49, 66, 0.8);
    
    --clr-bg: #faf9f6;        
    --clr-surface: #ffffff;   
    --clr-primary: #8fb8ed;   /* Xanh dương nhạt */
    --clr-secondary: #f2cc8f; /* Vàng nhạt */
    --clr-success: #81b29a;   /* Xanh lá nhạt */
    --clr-text: #2d3142;      
}

.conv-soft-wrapper {
    max-width: 850px; margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--clr-text); background: var(--clr-bg);
    padding: 25px; border: var(--border-soft); border-radius: 16px;
    box-shadow: var(--shadow-soft);
}
.conv-soft-wrapper * { box-sizing: border-box; }

/* Header */
.conv-soft-header {
    background: var(--clr-surface); padding: 20px;
    border: var(--border-soft); border-radius: 12px;
    text-align: center; margin-bottom: 25px; box-shadow: var(--shadow-soft);
}
.conv-soft-header h2 { margin: 0 0 8px 0; font-size: 1.8rem; font-weight: 800; }
.conv-soft-header p { margin: 0; font-weight: 500; font-size: 1rem; color: #555;}

/* Setup Section */
.conv-setup-section { display: flex; flex-direction: column; gap: 20px; margin-bottom: 25px; }

/* Format Selector */
.format-selector { background: var(--clr-surface); padding: 15px 20px; border: var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-soft); }
.format-selector label { display: block; font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.format-options { display: flex; gap: 10px; flex-wrap: wrap;}
.format-radio { flex: 1; cursor: pointer; }
.format-radio input { display: none; }
.radio-btn { display: block; text-align: center; padding: 12px; font-weight: 700; border: var(--border-soft); border-radius: 8px; background: var(--clr-bg); transition: all 0.2s;}
.format-radio input:checked + .radio-btn { background: var(--clr-text); color: #fff; box-shadow: 2px 2px 0px rgba(45, 49, 66, 0.5); transform: translate(-2px, -2px);}

/* Dropzone (Khu vực kéo thả) */
.dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--clr-primary); padding: 40px 20px;
    border: 2px dashed var(--clr-text); border-radius: 12px; cursor: pointer; transition: all 0.2s ease;
}
.dropzone:hover, .dropzone.dragover { background: #7aa5d6; transform: translateY(-2px); box-shadow: var(--shadow-soft); border-style: solid; }
.upload-icon { font-size: 3.5rem; }
.upload-text { font-size: 1.2rem; font-weight: 800; color: #fff; text-shadow: 1px 1px 0px rgba(0,0,0,0.2); margin-top: 10px;}
.upload-subtext { font-size: 0.95rem; font-weight: 600; color: rgba(255,255,255,0.9); margin-top: 5px;}

/* Preview Section */
.conv-preview-section { background: var(--clr-surface); padding: 20px; border: var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-soft); }
.preview-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px dashed #eee; padding-bottom: 10px; margin-bottom: 15px;}
.preview-header h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.action-btn-small { padding: 6px 12px; font-weight: 700; background: var(--clr-bg); border: var(--border-soft); border-radius: 8px; cursor: pointer; box-shadow: 2px 2px 0px rgba(0,0,0,0.2); transition: all 0.1s;}
.action-btn-small:active { transform: translate(2px,2px); box-shadow: 0px 0px 0px;}

/* Lưới hiển thị Thumbnail */
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; max-height: 250px; overflow-y: auto; padding-right: 5px;}
.thumb-item { position: relative; border: var(--border-soft); border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; background: #eee;}
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.btn-remove-thumb { position: absolute; top: 4px; right: 4px; background: #fff; border: 2px solid #111; color: #111; border-radius: 50%; width: 22px; height: 22px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.8rem;}

/* Trạng thái đang xử lý */
.process-status { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 20px 0; background: var(--clr-secondary); padding: 15px; border-radius: 8px; border: var(--border-soft); font-weight: 700;}
.spinner { width: 24px; height: 24px; border: 4px solid rgba(0,0,0,0.1); border-top: 4px solid var(--clr-text); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Nút Submit */
.btn-primary-soft { width: 100%; padding: 16px; margin-top: 15px; font-size: 1.1rem; font-weight: 800; background: var(--clr-success); color: var(--clr-text); border: var(--border-soft); border-radius: 12px; box-shadow: var(--shadow-soft); cursor: pointer; text-transform: uppercase; transition: all 0.15s ease; }
.btn-primary-soft:active { transform: translate(2px, 2px); box-shadow: var(--shadow-soft-hover); }
.btn-primary-soft:disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none;}

@media (max-width: 600px) {
    .format-options { flex-direction: column; }
}