/* =========================================================
   DEEBO IMAGE STUDIO — LIGHT THEME (Matches Home Page)
   ========================================================= */

:root {
  --studio-bg: #F4F6F9;
  --studio-surface: #FFFFFF;
  --studio-panel: #F8FAFC;
  --studio-border: #E5E9F0;
  --studio-navy: #0B1A35;
  --studio-text: #2D3748;
  --studio-muted: #64748B;
  --studio-accent: #FF6600;
  --studio-accent-hover: #E85B00;
  --studio-peach: #FFF3E8;
  --studio-line: #F1E7DF;
}

body.layout-landing {
  margin: 0;
  padding: 0;
  background-color: var(--studio-bg);
  color: var(--studio-text);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.editor-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--studio-bg);
}

/* ---------- Top Navbar (Light) ---------- */
.editor-navbar {
  height: 58px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(11, 26, 53, 0.04);
}

.editor-nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.editor-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--studio-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  transition: all 0.2s;
}

.editor-back-btn:hover {
  color: var(--studio-navy);
  border-color: var(--studio-navy);
  background: #F8FAFC;
}

.editor-divider {
  width: 1px;
  height: 22px;
  background: var(--studio-border);
}

.editor-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.editor-app-tag {
  background: var(--studio-peach);
  color: #B84700;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(240, 122, 26, 0.2);
}

.editor-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 7px 16px;
}

.editor-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 8px 20px;
  background: linear-gradient(180deg, #F7892B 0%, #E8600A 100%);
  border: none;
  color: #FFF;
  box-shadow: 0 4px 14px rgba(232, 96, 10, 0.4);
  transition: transform 0.18s, box-shadow 0.18s;
}

.editor-export-btn:hover {
  color: #FFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 96, 10, 0.5);
}

.editor-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Workspace Layout ---------- */
.editor-workspace {
  display: flex;
  flex: 1;
  height: calc(100vh - 58px);
  overflow: hidden;
  position: relative;
}

/* ---------- Center Stage (Light Studio) ---------- */
.editor-stage {
  flex: 1;
  background:
    radial-gradient(circle at 50% 50%, #FFFFFF 0%, #F1F4F8 100%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.015) 0, rgba(0, 0, 0, 0.015) 1px, transparent 0, transparent 50%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dropzone (Empty State) */
.editor-dropzone {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dropzone-card {
  max-width: 520px;
  width: 100%;
  background: #FFFFFF;
  border: 2px dashed #CBD5E1;
  border-radius: 24px;
  padding: 44px 36px;
  text-align: center;
  box-shadow: 0 16px 40px -10px rgba(11, 26, 53, 0.08), 0 2px 6px rgba(11, 26, 53, 0.03);
  transition: border-color 0.2s, background 0.2s;
}

.dropzone-card.drag-over {
  border-color: var(--studio-accent);
  background: var(--studio-peach);
}

.dropzone-icon-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--studio-peach);
  color: var(--studio-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.dropzone-icon {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.dropzone-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--studio-navy);
  margin-bottom: 6px;
}

.dropzone-subtitle {
  font-size: 14px;
  color: var(--studio-muted);
  margin-bottom: 22px;
}

.dropzone-browse-btn {
  background: linear-gradient(180deg, #F7892B 0%, #E8600A 100%);
  color: #FFF;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(232, 96, 10, 0.45);
}

.dropzone-browse-btn:hover {
  color: #FFF;
}

.dropzone-privacy-note {
  margin-top: 18px;
  font-size: 12px;
  color: #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
}

/* Sample Images */
.dropzone-samples {
  border-top: 1px solid #EEF2F6;
  padding-top: 18px;
}

.samples-label {
  font-size: 12px;
  color: var(--studio-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}

.samples-grid {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.sample-btn {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: var(--studio-navy);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.sample-btn:hover {
  background: var(--studio-peach);
  border-color: rgba(240, 122, 26, 0.4);
  color: #B84700;
  transform: translateY(-1px);
}

/* Viewport & Canvas */
.editor-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  user-select: none;
}

.canvas-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 16px 40px -10px rgba(11, 26, 53, 0.16), 0 4px 12px rgba(11, 26, 53, 0.06);
  border-radius: 8px;
  overflow: visible;
  line-height: 0;
  background: #FFFFFF;
}

#displayCanvas {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

/* Compare Badge */
.compare-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(11, 26, 53, 0.85);
  backdrop-filter: blur(8px);
  color: #FFB703;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 183, 3, 0.4);
  pointer-events: none;
  z-index: 50;
}

/* Interactive Crop Overlay */
.crop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 26, 53, 0.55);
  cursor: crosshair;
  z-index: 20;
}

.crop-box {
  position: absolute;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 9999px rgba(11, 26, 53, 0.55);
  cursor: move;
}

.crop-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
  background-size: 33.333% 33.333%;
}

.crop-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #FFFFFF;
  border: 2px solid var(--studio-navy);
  border-radius: 2px;
}

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

/* Canvas Zoom Floating Bar (Light) */
.canvas-zoom-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  box-shadow: 0 8px 24px rgba(11, 26, 53, 0.08);
  z-index: 30;
}

.zoom-btn {
  background: none;
  border: none;
  color: var(--studio-navy);
  font-size: 14px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.zoom-btn:hover {
  background: #F1F5F9;
}

.zoom-level {
  font-size: 12px;
  font-weight: 700;
  color: var(--studio-muted);
  min-width: 44px;
  text-align: center;
}

.zoom-fit-btn {
  width: auto;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #F1F5F9;
}

.zoom-replace-btn {
  cursor: pointer;
  color: var(--studio-accent);
}

/* ---------- Right Control Sidebar (Light) ---------- */
.editor-sidebar {
  width: 360px;
  background: #FFFFFF;
  border-left: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: -2px 0 10px rgba(11, 26, 53, 0.02);
}

.sidebar-tabs-nav {
  display: flex;
  background: #F8FAFC;
  border-bottom: 1px solid var(--studio-border);
  padding: 8px 10px;
  gap: 6px;
}

.sidebar-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-tab svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.sidebar-tab:hover {
  color: var(--studio-navy);
  background: #EDF2F7;
}

.sidebar-tab.active {
  color: #B84700;
  background: var(--studio-peach);
  border-bottom: 2px solid var(--studio-accent);
}

.sidebar-tab.active svg {
  stroke: var(--studio-accent);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.pane-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--studio-navy);
  margin: 0;
}

.pane-reset-link {
  background: none;
  border: none;
  color: var(--studio-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.pane-reset-link:hover {
  text-decoration: underline;
}

/* Control Sections & Sliders (Light) */
.control-section {
  background: #F8FAFC;
  border: 1px solid #EEF2F6;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.control-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--studio-muted);
  margin-bottom: 14px;
}

.slider-control {
  margin-bottom: 14px;
}

.slider-control:last-child {
  margin-bottom: 0;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.slider-header label {
  font-size: 13px;
  font-weight: 600;
  color: var(--studio-navy);
  margin: 0;
}

.slider-val {
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  color: var(--studio-navy);
  background: #E2E8F0;
  padding: 2px 7px;
  border-radius: 4px;
}

.form-range {
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--studio-accent);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(232, 96, 10, 0.4);
  border: 2px solid #FFF;
}

/* Cinematic Action Card (Light) */
.cinematic-action-card {
  background: linear-gradient(135deg, #FFF9F3 0%, #FFF3E8 100%);
  border: 1.5px solid rgba(240, 122, 26, 0.25);
  border-radius: 16px;
  padding: 18px;
}

.action-card-badge {
  background: #FF6600;
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.action-card-speed {
  font-size: 11px;
  color: #10B981;
  font-weight: 700;
}

.action-card-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--studio-navy);
  margin: 8px 0 4px;
}

.action-card-desc {
  font-size: 12px;
  color: var(--studio-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

/* Cinematic Mood Presets Grid (Light) */
.mood-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mood-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.mood-card:hover {
  border-color: rgba(240, 122, 26, 0.4);
  transform: translateY(-2px);
}

.mood-card.active {
  border-color: var(--studio-accent);
  background: var(--studio-peach);
}

.mood-color-bar {
  height: 8px;
  border-radius: 4px;
  width: 100%;
}

.mood-none { background: linear-gradient(90deg, #94A3B8, #CBD5E1); }
.mood-teal-orange { background: linear-gradient(90deg, #0284C7, #F97316); }
.mood-noir { background: linear-gradient(90deg, #18181B, #A1A1AA); }
.mood-sunset { background: linear-gradient(90deg, #EA580C, #FBBF24); }
.mood-bleach { background: linear-gradient(90deg, #64748B, #E2E8F0); }
.mood-vintage { background: linear-gradient(90deg, #92400E, #FDE68A); }
.mood-cyberpunk { background: linear-gradient(90deg, #06B6D4, #D946EF); }
.mood-bistro { background: linear-gradient(90deg, #B45309, #F59E0B); }

.mood-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--studio-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tone Curves Tab (Light) */
.curve-channels {
  display: flex;
  gap: 4px;
  background: #EDF2F7;
  border-radius: 8px;
  padding: 4px;
}

.curve-ch-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.curve-ch-btn.active {
  background: #FFFFFF;
  color: var(--studio-navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.curve-ch-btn.ch-red.active { color: #DC2626; }
.curve-ch-btn.ch-green.active { color: #059669; }
.curve-ch-btn.ch-blue.active { color: #2563EB; }

.curve-canvas-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 6px rgba(11, 26, 53, 0.03);
}

#curveCanvas {
  display: block;
  cursor: crosshair;
  border-radius: 8px;
  background: #FAFAFA;
}

.curve-hint {
  font-size: 10px;
  color: var(--studio-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.4;
  font-weight: 500;
}

.curve-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.curve-preset-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--studio-navy);
  border-color: #E2E8F0;
  background: #FFFFFF;
  padding: 7px 8px;
  border-radius: 8px;
}

.curve-preset-btn:hover {
  background: var(--studio-peach);
  border-color: rgba(240, 122, 26, 0.4);
  color: #B84700;
}

/* Crop & Aspect Ratios (Light) */
.crop-ratio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.crop-ratio-btn {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: var(--studio-navy);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.crop-ratio-btn:hover {
  border-color: rgba(240, 122, 26, 0.4);
}

.crop-ratio-btn.active {
  border-color: var(--studio-accent);
  background: var(--studio-peach);
  color: #B84700;
}

.transform-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.transform-actions-grid .btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  border-color: #E2E8F0;
  background: #FFFFFF;
  color: var(--studio-navy);
  border-radius: 8px;
}

.transform-actions-grid .btn:hover {
  background: var(--studio-peach);
  border-color: rgba(240, 122, 26, 0.4);
  color: #B84700;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .editor-workspace {
    flex-direction: column;
  }
  .editor-sidebar {
    width: 100%;
    height: 340px;
    border-left: none;
    border-top: 1px solid var(--studio-border);
  }
  #displayCanvas {
    max-height: calc(100vh - 460px);
  }
}
