/* ─── CONTAINER UI STANDARD WIDTH ─── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 100px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 992px) {
  .tool-layout {
    grid-template-columns: 1fr 360px;
  }
}

/* ── DROPZONE ── */
.dropzone {
  background: var(--card-bg, rgba(20, 18, 30, 0.45));
  border: 2px dashed rgba(244, 18, 18, 0.25);
  border-radius: 20px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(circle at center, rgba(244, 18, 18, 0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropzone:hover, .dropzone.drag-over {
  border-color: #f41212;
  box-shadow: 0 0 25px rgba(244, 18, 18, 0.15);
}

.dropzone:hover::before, .dropzone.drag-over::before {
  opacity: 1;
}

.drop-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.drop-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-1, #ffffff);
  margin-bottom: 8px;
}

.drop-subtitle {
  font-size: 14px;
  color: var(--text-3, rgba(255, 255, 255, 0.6));
  margin-bottom: 20px;
}

.drop-btn {
  background: linear-gradient(135deg, #f41212 0%, #ff4d4d 100%);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.drop-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(244, 18, 18, 0.4);
}

/* ── LOADER VIEW ── */
.loading-view {
  background: var(--card-bg, rgba(20, 18, 30, 0.45));
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 24px;
}

.loader-bar {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0 10px;
}

.loader-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, #f41212, #ff4d4d);
  border-radius: 10px;
  transition: width 0.1s linear;
}

/* ── EDITOR LAYOUT ── */
.editor-main {
  display: flex;
  flex-direction: column;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.editor-title-wrap {
  display: flex;
  flex-direction: column;
}

.editor-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1, #ffffff);
}

.editor-count {
  font-size: 13px;
  color: var(--text-3, rgba(255, 255, 255, 0.6));
  margin-top: 2px;
}

.clear-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-2, #e2e8f0);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ── PREVIEW CARDS GRID ── */
.image-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.image-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all 0.3s ease;
}

@media (min-width: 576px) {
  .image-card {
    flex-direction: row;
    align-items: center;
  }
}

.image-card:hover {
  border-color: rgba(244, 18, 18, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.img-thumb-container {
  width: 100%;
  height: 180px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

@media (min-width: 576px) {
  .img-thumb-container {
    width: 160px;
    height: 160px;
  }
}

.img-thumb-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.img-info-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.img-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1, #ffffff);
  word-break: break-all;
  line-height: 1.4;
}

.img-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-badge {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2, #e2e8f0);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.meta-badge.dimensions {
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.08);
  border-color: rgba(255, 170, 0, 0.15);
}

/* Size Inputs inside card */
.card-sizing-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.card-size-input-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-size-input-box span {
  font-size: 10px;
  color: var(--text-3, rgba(255, 255, 255, 0.5));
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.card-size-input-box input {
  height: 38px;
  width: 100px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  padding: 0 12px;
  text-align: center;
  box-sizing: border-box;
  line-height: 36px;
}

.card-size-input-box input:focus {
  border-color: #f41212;
  outline: none;
}

/* Hide native number input spinner arrows */
.card-size-input-box input[type="number"]::-webkit-outer-spin-button,
.card-size-input-box input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.card-size-input-box input[type="number"] {
  -moz-appearance: textfield;
}

.aspect-lock-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-3, rgba(255, 255, 255, 0.6));
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  box-sizing: border-box;
}

.aspect-lock-btn.locked {
  background: rgba(249, 115, 22, 0.15) !important;
  border-color: rgba(249, 115, 22, 0.4) !important;
  color: #ffaa00 !important;
}

.aspect-lock-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Card Actions Container */
.card-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 576px) {
  .card-action-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 140px);
    gap: 8px;
    justify-content: flex-end;
    margin-left: auto;
  }

  .card-action-bar .action-icon-btn {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    padding: 8px 12px !important;
  }
}

.action-icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2, #e2e8f0);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.action-icon-btn.delete {
  color: #ef4444;
}

.action-icon-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

/* ── SIDEBAR CONVERT CONTROLS ── */
.control-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}


/* Format selectors Glider */
.mode-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 3px;
  position: relative;
  overflow: hidden;
}

.mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-2, #e2e8f0);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  z-index: 2;
  transition: color 0.3s ease;
  text-align: center;
}

.mode-btn.active {
  color: #ffffff;
}

.mode-glider {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: linear-gradient(135deg, #f41212 0%, #ff4d4d 100%);
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(244, 18, 18, 0.3);
}

/* Dropdown styling */
.sidebar-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
}

.sidebar-select:focus {
  border-color: #f41212;
}

/* Range input styling */
.sidebar-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  outline: none;
}

.sidebar-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f41212;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(244, 18, 18, 0.4);
  transition: transform 0.1s ease;
}

.sidebar-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Rename inputs */
.sidebar-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
}

.sidebar-input:focus {
  border-color: #f41212;
}

/* Toggle switches */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2, #e2e8f0);
}

.checkbox-label input[type="checkbox"] {
  accent-color: #f41212;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Bulk resize shortcuts */
.scale-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scale-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2, #e2e8f0);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scale-chip:hover, .scale-chip.active {
  background: rgba(244, 18, 18, 0.1);
  border-color: rgba(244, 18, 18, 0.3);
  color: #ffffff;
}

/* Main action button */
.convert-action-btn {
  width: 100%;
  background: linear-gradient(135deg, #f41212 0%, #ff4d4d 100%);
  color: #ffffff;
  border: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(244, 18, 18, 0.25);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.convert-action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(244, 18, 18, 0.4);
}

.convert-action-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-3, rgba(255, 255, 255, 0.4));
  box-shadow: none;
  cursor: not-allowed;
}

/* ── MODALS (CROP / COMPARE / WATERMARK) ── */
.tool-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none; /* Controlled by JS */
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #14121e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-3, rgba(255, 255, 255, 0.6));
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ── CROP INTERACTIVE CONTAINER ── */
.crop-workspace {
  width: 100%;
  height: 350px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crop-canvas-overlay {
  position: absolute;
  cursor: move;
  border: 2px dashed #ffaa00;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
}

/* Handles */
.crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffaa00;
  border: 1px solid #ffffff;
  border-radius: 50%;
}

.handle-tl { top: -6px; left: -6px; cursor: nwse-resize; }
.handle-tr { top: -6px; right: -6px; cursor: nesw-resize; }
.handle-bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.handle-br { bottom: -6px; right: -6px; cursor: nwse-resize; }

/* ── BEFORE / AFTER SPLIT COMPARISON ── */
.compare-workspace {
  position: relative;
  width: 100%;
  height: 380px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.compare-img-box {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-img-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.compare-after-box {
  z-index: 2;
  clip-path: inset(0 50% 0 0); /* Initial default clip to 50% */
}

/* Split slider bar */
.compare-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%; /* Adjusted by slider */
  width: 2px;
  background: #ffffff;
  cursor: ew-resize;
  z-index: 10;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.compare-handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.compare-slider-control {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 20;
}

.label-badge {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  z-index: 15;
}

.label-badge.before { right: 12px; }
.label-badge.after { left: 12px; }

/* ── SUCCESS PANEL ── */
.success-panel {
  background: var(--card-bg, rgba(20, 18, 30, 0.45));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px;
  text-align: center;
  backdrop-filter: blur(12px);
  margin-bottom: 24px;
  display: none; /* Controlled by JS */
}

.success-icon {
  font-size: 64px;
  margin-bottom: 20px;
  color: #10b981;
}

.success-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.success-subtitle {
  font-size: 14px;
  color: var(--text-3, rgba(255, 255, 255, 0.6));
  margin-bottom: 24px;
}

.success-stats-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-3, rgba(255, 255, 255, 0.5));
  margin-top: 4px;
  text-transform: uppercase;
}

/* Secondary Actions button group */
.success-action-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── LIGHT MODE OVERRIDES ── */
body.light .dropzone {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
}

body.light .drop-title {
  color: #0f172a;
}

body.light .drop-subtitle {
  color: #64748b;
}

body.light .dropzone:hover, body.light .dropzone.drag-over {
  border-color: #f41212;
  box-shadow: 0 4px 20px rgba(244, 18, 18, 0.08);
}


body.light .image-card {
  background: rgba(15, 23, 42, 0.01);
  border-color: rgba(15, 23, 42, 0.06);
}

body.light .image-card:hover {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(244, 18, 18, 0.25);
}

body.light .img-thumb-container {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.06);
}

body.light .card-size-input-box input, body.light .sidebar-select, body.light .sidebar-input {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

body.light .mode-selector {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body.light .mode-btn {
  color: #475569;
}

body.light .mode-btn.active {
  color: #ffffff;
}

body.light .action-icon-btn, body.light .scale-chip {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.08);
  color: #334155;
}

body.light .action-icon-btn:hover, body.light .scale-chip:hover {
  background: rgba(15, 23, 42, 0.05);
}

body.light .stat-pill {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.06);
}

body.light .stat-val {
  color: #0f172a;
}

body.light .modal-content {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}

body.light .modal-title {
  color: #0f172a;
}

/* ─── PRIVACY DISCLAIMER BANNER ─── */
.privacy-disclaimer-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--red-soft, rgba(249, 115, 22, 0.12));
  border: 1px solid var(--red-glow, rgba(249, 115, 22, 0.35));
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

body.light .privacy-disclaimer-banner {
  background: rgba(244, 18, 18, 0.06) !important;
  border-color: rgba(244, 18, 18, 0.2) !important;
}

.privacy-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.privacy-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

body.light .privacy-text {
  color: #0f172a;
}

/* ─── SWITCH TOGGLE ─── */
.switch, .fg label.switch {
  position: relative;
  display: inline-block !important;
  width: 44px !important;
  height: 24px !important;
  flex-shrink: 0 !important;
  margin-bottom: 0 !important;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.switch input:checked + .switch-slider {
  background-color: #f41212;
  border-color: rgba(244, 18, 18, 0.2);
}

.switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

body.light .switch-slider {
  background-color: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.08);
}

/* ─── EXTRA PREMIUM LIGHT MODE OVERRIDES ─── */
body.light .sidebar-range {
  background: rgba(15, 23, 42, 0.08);
}

body.light .scale-chip {
  background: rgba(15, 23, 42, 0.02);
  border-color: rgba(15, 23, 42, 0.08);
  color: #334155;
}

body.light .scale-chip:hover {
  background: rgba(244, 18, 18, 0.04);
  border-color: rgba(244, 18, 18, 0.2);
  color: #f41212;
}

body.light .scale-chip.active {
  background: rgba(244, 18, 18, 0.08) !important;
  border-color: #f41212 !important;
  color: #f41212 !important;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(244, 18, 18, 0.1);
}

body.light .card-size-input-box input:focus {
  border-color: #f41212;
  box-shadow: 0 0 0 3px rgba(244, 18, 18, 0.1);
}

/* ─── VERTICAL PANEL LINE & DIVIDER ALIGNMENTS ─── */
.panel-title {
  line-height: 1 !important;
}

.privacy-toggle-fg {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
}

body.light .privacy-toggle-fg {
  border-top-color: rgba(15, 23, 42, 0.08) !important;
}

/* ─── CARD LIGHT MODE CONTRAST & STYLES ─── */
body.light .image-card {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

body.light .image-card:hover {
  background: #ffffff !important;
  border-color: rgba(244, 18, 18, 0.25) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

body.light .img-name {
  color: #0f172a !important;
}

body.light .meta-badge {
  background: rgba(15, 23, 42, 0.04) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #475569 !important;
}

body.light .meta-badge.dimensions {
  color: #ea580c !important;
  background: rgba(249, 115, 22, 0.08) !important;
  border-color: rgba(249, 115, 22, 0.15) !important;
}

body.light .card-size-input-box span {
  color: #64748b !important;
  font-weight: 600;
  letter-spacing: 0.5px;
}

body.light .aspect-lock-btn {
  background: rgba(15, 23, 42, 0.03) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #64748b !important;
}

body.light .aspect-lock-btn:hover {
  background: rgba(15, 23, 42, 0.06) !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
}

body.light .aspect-lock-btn.locked {
  background: rgba(249, 115, 22, 0.08) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
  color: #ea580c !important;
}

body.light .action-icon-btn {
  background: rgba(15, 23, 42, 0.02) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #334155 !important;
}

body.light .action-icon-btn:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  color: #0f172a !important;
}

body.light .action-icon-btn.delete {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.15) !important;
  background: rgba(220, 38, 38, 0.02) !important;
}

body.light .action-icon-btn.delete:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  color: #b91c1c !important;
}

/* ─── MODAL LIGHT MODE ACTIONS ─── */
body.light .modal-close {
  color: #64748b !important;
}

body.light .modal-close:hover {
  color: #0f172a !important;
}

body.light .clear-btn {
  background: rgba(15, 23, 42, 0.05) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  color: #334155 !important;
}

body.light .clear-btn:hover {
  background: rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(15, 23, 42, 0.15) !important;
  color: #0f172a !important;
}

/* ─── RESET ACTION BUTTON STYLING ─── */
.action-icon-btn.btn-trigger-reset {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.15);
  background: rgba(239, 68, 68, 0.04);
}

.action-icon-btn.btn-trigger-reset:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

body.light .action-icon-btn.btn-trigger-reset {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.15) !important;
  background: rgba(220, 38, 38, 0.02) !important;
}

body.light .action-icon-btn.btn-trigger-reset:hover {
  background: rgba(220, 38, 38, 0.08) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  color: #b91c1c !important;
}

body.light #text-base64-string {
  background: rgba(15, 23, 42, 0.02) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #ea580c !important;
}

/* ─── CUSTOM COLOR PICKER SWATCH ─── */
.custom-color-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.custom-color-wrap:hover {
  transform: scale(1.1);
}

.custom-color-wrap input[type="color"] {
  opacity: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

body.light .custom-color-wrap {
  border-color: rgba(15, 23, 42, 0.15) !important;
}

/* ─── UNIFIED MODAL FOOTER BUTTON SHAPES ─── */
.modal-footer .clear-btn,
.modal-footer .drop-btn {
  border-radius: 100px !important;
  padding: 10px 24px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}

/* ─── COLOR PRESET BUTTONS ─── */
.color-preset-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  position: relative;
  flex-shrink: 0;
}

.color-preset-btn:hover {
  transform: scale(1.15);
}

.color-preset-btn.active {
  border: 2px solid #ffaa00 !important;
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

body.light .color-preset-btn {
  border-color: rgba(15, 23, 42, 0.15) !important;
}

body.light .color-preset-btn.active {
  border-color: #ea580c !important;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.5);
}

body.light .color-preset-divider {
  background: rgba(15, 23, 42, 0.15) !important;
}
