/* css/logo-layer.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-app: #0f172a; 
  --bg-panel: #1e293b;
  --bg-canvas: #0f1219;
  --accent-primary: #6366f1;
  --accent-hover: #818cf8;
  --text-main: #cbd5e1;
  --text-muted: #64748b;
  --gradient-main: linear-gradient(to right, #a5b4fc, #e879f9);
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- MAIN FRAME --- */
.main-frame {
  background: rgba(15, 23, 42, 0.6); 
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  max-width: 1600px;
  margin: 0 auto;
  height: 85vh;
  display: flex;
  overflow: hidden;
}

/* --- LEFT PANEL: CONTROLS --- */
.left-panel {
  width: 340px;
  background: rgba(30, 41, 59, 0.7);
  border-right: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 1.5rem;
  gap: 2rem;
}

.control-group h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Custom File Upload Button */
.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent-hover);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent-primary);
}

/* REMOVE BUTTON */
#removeBtn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
#removeBtn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #fca5a5;
  color: #fff;
}

/* --- VISIBLE RANGE SLIDERS --- */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent; 
  margin: 10px 0;
}

/* The Track */
input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #475569;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.2);
}

/* The Thumb */
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-primary);
  cursor: grab;
  margin-top: -7px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.1s;
}

input[type=range]::-moz-range-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  background: #475569;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.2);
}

input[type=range]::-moz-range-thumb {
  height: 18px;
  width: 18px;
  border: 2px solid var(--accent-primary);
  border-radius: 50%;
  background: #ffffff;
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.1); }
input[type=range]::-moz-range-thumb:hover { transform: scale(1.1); }

/* Aspect Ratio Grid */
.aspect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.ratio-btn {
  background: #334155;
  border: none;
  color: #94a3b8;
  padding: 0.4rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.ratio-btn:hover { background: #475569; color: white; }
.ratio-btn.active { background: var(--accent-primary); color: white; }

/* Format Toggle */
.format-toggle {
  display: flex;
  background: #0f172a;
  padding: 4px;
  border-radius: 8px;
}
.fmt-btn {
  flex: 1;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  color: #64748b;
  transition: all 0.2s;
}
.fmt-btn.active {
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Download Button */
#downloadBtn {
  width: 100%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: filter 0.2s;
}
#downloadBtn:hover:not(:disabled) { filter: brightness(1.1); }
#downloadBtn:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(1); }

/* --- RIGHT PANEL: CANVAS WORKSPACE --- */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
  position: relative;
}

.editor-toolbar {
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
}

/* The Workspace */
.workspace-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  background-image: 
    linear-gradient(45deg, #13161c 25%, transparent 25%), 
    linear-gradient(-45deg, #13161c 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #13161c 75%), 
    linear-gradient(-45deg, transparent 75%, #13161c 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  transition: all 0.3s ease;
  border: 2px solid transparent; 
}

/* Drag Active State */
.workspace-area.drag-active {
  background-color: rgba(30, 41, 59, 0.4);
  border-image: var(--gradient-main) 1;
  box-shadow: inset 0 0 50px rgba(165, 180, 252, 0.1);
}

canvas {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid #334155;
}

/* Cropper Overrides */
.cropper-bg { background: transparent; }
.cropper-modal { opacity: 0.8; background-color: #000; }
.image-container img { max-width: 100%; display: block; }

/* FIX: Renamed generic .hidden to .tool-hidden to prevent header conflict */
.tool-hidden { display: none !important; }