/* =========================================================
   Auto-Mockupper v4 — Polished UI Theme
   Improved sidebar, depth, spacing, colors, transitions
========================================================= */

/* ---------- THEME COLORS ---------- */
:root {
  --bg-dark: #0d0d0d;
  --panel-dark: #1a1a1a;
  --panel2-dark:#141414;
  --text-dark: #e8e8e8;
  --border-dark: rgba(255,255,255,0.1);
  --accent-dark: #4c8dff;

  --bg-light: #f7f7f9;
  --panel-light: #ffffff;
  --panel2-light:#f0f0f3;
  --text-light: #222;
  --border-light: rgba(0,0,0,0.1);
  --accent-light: #0062ff;
}

/* DARK THEME VALUES */
[data-theme="dark"] {
  --bg: var(--bg-dark);
  --panel: var(--panel-dark);
  --panel2: var(--panel2-dark);
  --text: var(--text-dark);
  --border: var(--border-dark);
  --accent: var(--accent-dark);
}

/* LIGHT THEME VALUES */
[data-theme="light"] {
  --bg: var(--bg-light);
  --panel: var(--panel-light);
  --panel2: var(--panel2-light);
  --text: var(--text-light);
  --border: var(--border-light);
  --accent: var(--accent-light);
}

/* GLOBAL LAYOUT */
body {
  margin: 0;
  display: flex;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ---------- SIDEBAR ---------- */
#sidebar {
  width: 340px;
  background: var(--panel);
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  transition: background 0.3s ease, border 0.3s ease;
}

#sidebar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 15px;
}

/* SECTION HEADERS */
.section {
  margin-bottom: 25px;
}

.section h2 {
  font-size: 17px;
  margin: 0;
  padding: 8px 10px;
  background: var(--panel2);
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.3s ease;
}

.section h2:hover {
  background: var(--accent);
  color: #fff;
}

/* COLLAPSIBLE BODY */
.section-content {
  background: var(--panel2);
  margin-top: 8px;
  border-radius: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

/* FORMS */
input[type="number"],
input[type="text"],
input[type="color"],
select {
  width: 100%;
  padding: 8px;
  margin-top: 6px;
  background: var(--panel);
  color: var(--text);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: background 0.3s ease, color 0.3s ease;
}

input[type="range"] {
  width: 100%;
  margin-top: 6px;
}

/* BUTTONS */
.btn {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover {
  filter: brightness(1.1);
}

/* THUMBNAILS */
.mockup-choice, .scene-choice {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.mockup-thumb, .scene-thumb {
  width: 65px;
  height: 65px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease;
}

.mockup-thumb:hover, .scene-thumb:hover {
  transform: scale(1.05);
}

.mockup-thumb.active, .scene-thumb.active {
  border-color: var(--accent);
}

/* LAYER LISTS */
#imageLayers, #textLayers {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  padding: 10px;
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.layer-item {
  padding: 6px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  background: var(--panel2);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.15s ease;
}

.layer-item:hover {
  background: var(--accent);
  color: #fff;
}

.layer-item.active {
  background: var(--accent);
  color: #fff;
}

/* CANVAS AREA */
#canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

canvas {
  max-width: 92%;
  max-height: 92%;
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
}

/* THEME TOGGLE BUTTON */
#theme-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: all .25s ease;
}

#theme-toggle:hover {
  background: var(--accent);
  color: white;
}
