/* ── Layout ──────────────────────────────────── */
.compress-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
  gap: 16px;
}

.compress-main .upload-area {
  width: 100%;
  max-width: 680px;
}

/* ── Main card ───────────────────────────────── */
.compress-card {
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

/* ── File info (reused from convert.css pattern) ── */
.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.file-icon { color: var(--accent); flex-shrink: 0; opacity: 0.9; }

.file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size { font-size: 11px; color: var(--text-muted); }

.change-file-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s;
  flex-shrink: 0;
}

.change-file-btn:hover { border-color: var(--border-hi); color: var(--text-2); background: var(--surface3); }

/* ── Section label ───────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: -8px;
}

/* ── Preset grid ─────────────────────────────── */
.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.preset-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.14s;
}

.preset-card:hover {
  border-color: var(--border-hi);
  background: var(--surface3);
}

.preset-card.active {
  border-color: rgba(99,102,241,.5);
  background: rgba(99,102,241,.1);
}

.preset-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  transition: color 0.14s;
}

.preset-card.active .preset-icon { color: var(--accent-h); }

.preset-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.preset-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.preset-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Custom options ──────────────────────────── */
.custom-options {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.custom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.custom-field { display: flex; flex-direction: column; gap: 10px; }

.field-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.crf-hint {
  font-size: 10px;
  color: var(--accent-h);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.crf-track {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crf-edge {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}

#crfSlider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface3);
  outline: none;
  cursor: pointer;
}

#crfSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(99,102,241,.4), 0 0 0 3px var(--surface2);
}

.res-select {
  width: 100%;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.14s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b8a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.res-select:focus { border-color: var(--accent); }

/* ── Result box ──────────────────────────────── */
.result-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(99,102,241,.07);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.size-comparison {
  display: flex;
  align-items: center;
  gap: 14px;
}

.size-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.size-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.size-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.size-value.accent {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.size-arrow { color: var(--text-muted); flex-shrink: 0; }

.size-badge {
  background: rgba(99,102,241,.18);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-h);
  white-space: nowrap;
  margin-left: auto;
}

.result-box .btn { flex: none; width: 100%; }

/* ── Compress button ─────────────────────────── */
.compress-btn {
  width: 100%;
  padding: 12px;
  font-size: 14px;
}
