* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #111;
  color: #eee;
  padding: 12px;
}

#downloadPng{
  width: 100%;
  background: transparent;
  border: 1px solid lightgray;
  margin-top: 1rem;
}

.container {
  display: flex;
  gap: 20px;
  width: 100%;
  margin: 0 auto;
  align-items: flex-start;
  background: #000;
}

/* Controls panel */
.controls {
  width: 340px;
  background: #1b1b1b;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
}

.svg-container {
  flex: 1;
  background: #1b1b1b;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  overflow: auto;
}

h1 {
  margin: 8px 0 14px 0;
  font-size: 18px;
  color: #fff;
}

.routeLink {
  display: inline-block;
  margin-bottom: 8px;
  color: #9bbcff;
  text-decoration: none;
}

.routeLink:hover {
  text-decoration: underline;
}

/* Panel rows */
.panel {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.panel .row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 10px;
}

.row label {
  min-width: 72px;
  opacity: 0.85;
}

.row input[type="color"] {
  width: 38px;
  height: 30px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.row select {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #111;
  color: #eee;
}

.row select:disabled {
  background: #0b0b0b;
  color: #666;
  border-color: #232323;
  opacity: 1;
}

.sloganRow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.sloganRow .sloganControl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.sloganRow .sloganLabel {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 2px;
}

.sloganUniquesWrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding: 8px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}

.sloganUniqueChip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 999px;
  font-size: 12px;
  color: #eee;
}

.sloganUniqueChip .chipRemove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #333;
  color: #aaa;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.sloganUniqueChip .chipRemove:hover {
  background: #444;
  color: #fff;
}

.resetFiltersBtn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid #555;
  color: #bbb;
  font-size: 12px;
}

.resetFiltersBtn:hover {
  background: #252525;
  color: #eee;
  border-color: #666;
}

.tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  pointer-events: none;
  max-width: 280px;
  background: #000;
  color: #fff;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hint {
  opacity: 0.7;
  font-size: 12px;
}

button {
  background: #4caf50;
  color: white;
  border: none;
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
}

button:hover {
  background: #45a049;
}

.actions {
  margin-top: 14px;
}

#download {
  width: 100%;
}

/* Color panel */
.colorsPanel {
  margin-top: 14px;
  padding: 12px;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
}

.colorsHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.colorsTitle {
  font-weight: 600;
}

.colorsMeta {
  opacity: 0.8;
  font-size: 12px;
}

#colorList {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Color box */
.colorItem {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  position: relative;
  border: 1px solid #333;
}

.colorItem button {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #000;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

/* SVG preview layout */
#preview {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

/* SVG sizing */
#preview svg {
  width: 100%;
  max-width: 22rem;
  height: auto;
  display: block;
}

@media (max-width: 1000px) {
  .container {
    flex-direction: column;
  }

  .controls {
    width: 100%;
  }
}

