:root {
  --main-blue: #0073cf;
  --accent-gray: #2b2b2b;
  --text-light: #f0f0f0;
  --text-dark: #111;
  --text-dim: #aaa;
  --border: #3a3a3a;
  --bg-dark: #111;
  --bg-card: #1a1a1a;
  --bg-light: #f5f5f5;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  min-height: 100vh;
  background: var(--bg-dark);
  color: var(--text-light);
}

/* Light mode (optional toggle-ready) */
body.light {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ===== Sidebar ===== */
#sidebar {
  width: 320px;
  min-width: 320px;
  padding: 16px;
  border-right: 1px solid var(--border);
  background: var(--accent-gray);
  overflow-y: auto;
}

body.light #sidebar {
  background: #eaeaea;
  border-color: #cfcfcf;
}

#sidebar h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.filters h4 {
  margin: 12px 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--main-blue);
}

.filters .group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

/* ==== Radio buttons turned into toggle buttons ==== */
.filters input[type="radio"] {
  display: none;
}

.filters label {
  background: #444;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.filters label:hover {
  background: #555;
  border-color: var(--main-blue);
}

.filters input[type="radio"]:checked + label {
  background: var(--main-blue);
  border-color: var(--main-blue);
  color: #fff;
}

/* ===== Clear Button ===== */
#clear {
  margin: 0px;
  background: #666;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
    position: absolute; top:12px; left: 235px;
}
#clear:hover { background: #3b3b3b; }


/* ===== Colors Button ===== */
#colors {
  margin: 0px;
  background: #666;
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
    position: absolute; top:12px; left: 135px;
}
#clear:hover { background: #3b3b3b; }



/* BG controls (if present) */
#bgWhite, #bgBlack {
  background: var(--main-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}
#bgCustom { width: 36px; height: 28px; border: 1px solid var(--border); background: transparent; }

/* ===== Content ===== */
#contentArea {
  flex: 1 1 auto;
  padding: 16px;
  overflow: auto;
}

#contentArea h1 { margin: 8px 0 16px; font-size: 20px; }

/* Asset grid wraps properly instead of one long row */
#assetDisplay {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}

/* Asset card */
.asset {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

body.light .asset {
  background: #fff;
  border-color: #ddd;
}

.asset .thumb,
.asset img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  border-radius: 8px;
  display: block;
}

.asset-label {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.3;
  min-height: 28px;
}

.download-options {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.download-options .download-btn {
  background: var(--main-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 900px) {
  #sidebar { width: 280px; min-width: 280px; }
  #assetDisplay { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 700px) {
  body { flex-direction: column; }
  #sidebar { width: 100%; min-width: auto; border-right: none; border-bottom: 1px solid var(--border); }
}
