*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    
:root {
  --primary-cyan: #06b6d4;
  --primary-teal: #14b8a6;
  --primary-sky: #0ea5e9;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  
  --bg-dark: #0a1519;
  --bg-secondary: #0c191e;
  --bg-tertiary: #0f2027;
  --bg-card: rgba(12, 25, 30, 0.9);
  
  --surface: rgba(6, 182, 212, 0.08);
  --surface-hover: rgba(6, 182, 212, 0.12);
  --surface-active: rgba(6, 182, 212, 0.18);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  
  --border-subtle: rgba(6, 182, 212, 0.15);
  --border-light: rgba(6, 182, 212, 0.3);
  
  --gradient-primary: linear-gradient(135deg, var(--primary-cyan), var(--primary-teal));
  
  --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.3);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.5);
  
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* HEADER PLACEHOLDER */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 21, 25, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.site-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.site-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* HERO SECTION */
.hsl-hero {
  position: relative;
  padding: 4rem 2rem 2rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg-effects { position: absolute; inset: 0; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: floatOrb 25s ease-in-out infinite;
}

.orb-1 { width: 500px; height: 500px; background: var(--primary-cyan); top: -150px; left: 5%; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-purple); bottom: -100px; right: 10%; animation-delay: -10s; }

.gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, var(--bg-dark) 70%);
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -40px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.9); }
}

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 1rem; }
.gradient-text { background: linear-gradient(135deg, var(--primary-cyan), var(--primary-teal), var(--accent-purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; line-height: 1.6; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: var(--bg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* MAIN CONTAINER */
.editor-container { display: flex; flex-direction: column; }

/* ZOOM CONTROLS */
.zoom-controls-floating {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: none;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.4rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

.zoom-controls-floating.active { display: flex; }

.zoom-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.zoom-btn:hover { background: var(--surface-hover); color: var(--primary-cyan); }
.zoom-value { font-size: 0.85rem; color: var(--primary-cyan); min-width: 55px; text-align: center; font-family: 'JetBrains Mono', monospace; font-weight: 500; }

/* UPLOAD SECTION */
.upload-section { display: flex; align-items: center; justify-content: center; flex: 1; padding: 2rem; position: relative; overflow: hidden; }

.upload-area {
  position: relative;
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-xl);
  padding: 4rem 5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  max-width: 500px;
}

.upload-area:hover, .upload-area.dragover { border-color: var(--primary-cyan); background: rgba(6, 182, 212, 0.05); transform: scale(1.02); box-shadow: var(--shadow-glow); }
.upload-icon { margin-bottom: 1.5rem; color: var(--primary-cyan); }
.upload-icon svg { width: 64px; height: 64px; stroke: currentColor; stroke-width: 1.5; }
.upload-title { font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem; }
.upload-subtitle { color: var(--text-secondary); margin-bottom: 1.5rem; }

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: var(--bg-dark);
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
}

.upload-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5); }
.upload-formats { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); }
#fileInput { display: none; }

/* EDITOR SECTION */
.editor-section { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.editor-section.active { display: flex; }

.tools-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.tools-group { display: flex; align-items: center; gap: 0.5rem; }
.tools-group-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.tools-toggle { display: flex; background: var(--surface); border-radius: var(--radius-md); padding: 0.2rem; border: 1px solid var(--border-subtle); }

.tool-btn, .mode-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tool-btn:hover, .mode-btn:hover { color: var(--text-primary); background: var(--surface-hover); }
.tool-btn.active, .mode-btn.active { background: var(--gradient-primary); color: var(--bg-dark); }
.tool-btn.brush-active { background: linear-gradient(135deg, var(--warning), var(--danger)); color: white; }
.mode-btn.inverse { background: linear-gradient(135deg, var(--accent-purple), #ec4899); color: white; }
.tools-separator { width: 1px; height: 28px; background: var(--border-subtle); }

.editor-main { display: flex; flex: 1; overflow: hidden; }

/* SIDEBAR LEFT */
.sidebar-left { width: 280px; background: var(--bg-secondary); border-right: 1px solid var(--border-subtle); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-header { padding: 1rem; border-bottom: 1px solid var(--border-subtle); }
.sidebar-title { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.components-list { flex: 1; overflow-y: auto; padding: 0.5rem; }

.component-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.component-item:hover { background: var(--surface-hover); }
.component-item.selected { border-color: var(--primary-cyan); background: rgba(6, 182, 212, 0.15); }
.component-item.whole-image { background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1)); }

.component-checkbox { width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--border-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition-fast); }
.component-item.selected .component-checkbox { background: var(--primary-cyan); border-color: var(--primary-cyan); }
.component-checkbox svg { width: 12px; height: 12px; stroke: var(--bg-dark); opacity: 0; transition: opacity var(--transition-fast); }
.component-item.selected .component-checkbox svg { opacity: 1; }
.component-color { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.component-info { flex: 1; min-width: 0; }
.component-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.component-meta { font-size: 0.7rem; color: var(--text-muted); }

.component-delete { background: transparent; border: none; color: var(--text-muted); width: 28px; height: 28px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: all var(--transition-fast); }
.component-item:hover .component-delete { opacity: 1; }
.component-delete:hover { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.sidebar-footer { padding: 1rem; border-top: 1px solid var(--border-subtle); }

.new-component-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.new-component-btn:hover { border-color: var(--primary-cyan); color: var(--primary-cyan); background: rgba(6, 182, 212, 0.05); }
.new-component-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.selection-hint { margin-top: 0.75rem; font-size: 0.7rem; color: var(--text-muted); text-align: center; }

/* CANVAS SECTION */
.canvas-section { flex: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; background: var(--bg-dark); }

.drawing-toolbar, .brush-toolbar {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
}

.drawing-toolbar.active, .brush-toolbar.active { display: flex; }
.drawing-mode-label, .brush-toolbar-title { font-size: 0.75rem; color: var(--text-secondary); }
.brush-toolbar-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 500; color: var(--text-primary); }
.drawing-mode-btns { display: flex; background: var(--bg-tertiary); border-radius: var(--radius-sm); padding: 0.15rem; }

.drawing-mode-btn { display: flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.6rem; border: none; background: transparent; color: var(--text-secondary); border-radius: 4px; cursor: pointer; font-size: 0.75rem; transition: all var(--transition-fast); }
.drawing-mode-btn.active { background: var(--primary-cyan); color: var(--bg-dark); }

.brush-control { display: flex; align-items: center; gap: 0.5rem; }
.brush-control-label { font-size: 0.7rem; color: var(--text-muted); min-width: 45px; }
.brush-color-picker { width: 28px; height: 28px; border: none; border-radius: var(--radius-sm); cursor: pointer; background: transparent; }
.brush-slider { width: 80px; height: 4px; -webkit-appearance: none; background: var(--bg-tertiary); border-radius: 2px; }
.brush-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary-cyan); cursor: pointer; }
.brush-value { font-size: 0.7rem; color: var(--text-secondary); min-width: 35px; font-family: 'JetBrains Mono', monospace; }
.brush-preview { width: 36px; height: 36px; background: var(--bg-tertiary); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.brush-preview-circle { border-radius: 50%; }

.canvas-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 2rem; }
.canvas-container { position: relative; box-shadow: 0 10px 50px rgba(0,0,0,0.5); border-radius: var(--radius-md); overflow: hidden; transform-origin: center; transition: transform 0.1s; }
.canvas-container canvas { display: block; }
.canvas-container > canvas:first-of-type { position: relative; }
#overlayCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; cursor: default; }
#overlayCanvas.drawing-mode { cursor: crosshair; }
#overlayCanvas.brush-mode { cursor: none; }
#brushCanvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; display: none; }

.drawing-hint { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 0.5rem; background: var(--bg-card); padding: 0.6rem 1rem; border-radius: var(--radius-lg); font-size: 0.8rem; color: var(--text-secondary); border: 1px solid var(--border-subtle); z-index: 20; backdrop-filter: blur(10px); }
.drawing-hint.active { display: flex; }
.drawing-hint.brush-hint { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.2)); border-color: rgba(245, 158, 11, 0.3); }

.canvas-actions { position: absolute; bottom: 4rem; left: 50%; transform: translateX(-50%); display: none; gap: 0.5rem; z-index: 20; }
.canvas-actions.active { display: flex; }

.canvas-action-btn { display: flex; align-items: center; gap: 0.4rem; padding: 0.6rem 1rem; border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 500; cursor: pointer; border: none; transition: all var(--transition-fast); }
.canvas-action-btn.cancel { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.canvas-action-btn.cancel:hover { background: var(--surface-hover); }
.canvas-action-btn.finish { background: var(--success); color: white; }
.canvas-action-btn.finish:hover { filter: brightness(1.1); }

.brush-cursor { position: fixed; pointer-events: none; border: 2px solid white; border-radius: 50%; transform: translate(-50%, -50%); z-index: 9999; display: none; mix-blend-mode: difference; }
.brush-cursor.active { display: block; }

/* SIDEBAR RIGHT */
.sidebar-right { width: 300px; background: var(--bg-secondary); border-left: 1px solid var(--border-subtle); display: flex; flex-direction: column; flex-shrink: 0; }
.controls-panel { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.controls-panel.disabled { opacity: 0.5; pointer-events: none; }

.selected-info { background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1)); border: 1px solid rgba(6, 182, 212, 0.2); border-radius: var(--radius-md); padding: 1rem; text-align: center; }
.selected-info.inverse-mode { background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(236, 72, 153, 0.15)); border-color: rgba(139, 92, 246, 0.3); }
.selected-info.brush-mode { background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.15)); border-color: rgba(245, 158, 11, 0.3); }
.selected-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.selected-meta { font-size: 0.8rem; color: var(--text-secondary); }
.hero{
    display : none !important;
}

.slider-section { display: flex; flex-direction: column; gap: 1rem; }
.slider-group { background: var(--surface); border-radius: var(--radius-md); padding: 1rem; border: 1px solid var(--border-subtle); }
.slider-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.slider-label { font-size: 0.85rem; font-weight: 500; }
.slider-value { font-size: 0.8rem; color: var(--primary-cyan); font-family: 'JetBrains Mono', monospace; background: rgba(6, 182, 212, 0.1); padding: 0.2rem 0.5rem; border-radius: 4px; }

.slider { width: 100%; height: 6px; -webkit-appearance: none; background: var(--bg-tertiary); border-radius: 3px; outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gradient-primary); cursor: pointer; box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4); transition: transform var(--transition-fast); }
.slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.action-buttons { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.action-buttons .action-btn { flex: 1; justify-content: center; }

.action-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border-radius: var(--radius-md); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition-fast); border: none; }
.action-btn.primary { background: var(--gradient-primary); color: var(--bg-dark); }
.action-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4); }
.action-btn.secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-subtle); }
.action-btn.secondary:hover { background: var(--surface-hover); border-color: var(--border-light); }

.info-box { background: var(--surface); border-radius: var(--radius-md); padding: 0.75rem; font-size: 0.75rem; color: var(--text-secondary); line-height: 1.5; border: 1px solid var(--border-subtle); }
.info-box strong { color: var(--primary-cyan); display: block; margin-bottom: 0.25rem; }

.new-image-btn {
  position: fixed;
  top: 80px;
  right: 1rem;
  z-index: 100;
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(20px);
}

.new-image-btn.active { display: flex; }
.new-image-btn:hover { border-color: var(--primary-cyan); background: var(--surface-hover); }

@media (max-width: 1200px) { .sidebar-left { width: 240px; } .sidebar-right { width: 260px; } }
@media (max-width: 992px) { .editor-main { flex-direction: column; } .sidebar-left, .sidebar-right { width: 100%; max-height: 200px; } .sidebar-left { border-right: none; border-bottom: 1px solid var(--border-subtle); } .sidebar-right { border-left: none; border-top: 1px solid var(--border-subtle); } }
@media (max-width: 768px) { .hsl-hero { padding: 3rem 1rem 1.5rem; } .upload-area { padding: 3rem 2rem; } .tools-bar { flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 1rem; } .tools-group-label { display: none; } }
