:root {
  --bg: #101010;
  --panel: #181818;
  --line: #2a2a2a;
  --text: #f6f6f6;
  --muted: #b5b5b5;
  --accent: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Comfortaa", "Arial Rounded MT Bold", "Arial", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, #242424 0%, transparent 45%),
    radial-gradient(circle at 80% 90%, #1c1c1c 0%, transparent 40%),
    #0a0a0a;
  min-height: 100vh;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-areas:
    "controls preview"
    "sheet sheet";
}

.panel {
  background: linear-gradient(160deg, #191919, #131313);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.controls {
  grid-area: controls;
}

.preview-wrap {
  grid-area: preview;
}

.sheet-wrap {
  grid-area: sheet;
}

h1,
h2 {
  margin: 0 0 12px;
  letter-spacing: 0.04em;
}

.muted {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field span {
  font-size: 13px;
  color: #dddddd;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #373737;
  background: #0f0f0f;
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
}

textarea {
  resize: vertical;
}

.row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.row .field {
  margin-bottom: 0;
  flex: 1;
}

.btn {
  flex: 1;
  min-width: 0;
  border: 1px solid #4f4f4f;
  background: #ffffff;
  color: #111111;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: #ededed;
}

.action-row {
  flex-wrap: wrap;
}

.action-row .btn {
  flex: 1 1 calc(33.333% - 8px);
  min-width: 130px;
}

.preview-stage {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f0f0f, #1b1b1b);
  border: 1px dashed #333;
}

#stickerPreview {
  width: min(100%, 700px);
  height: auto;
  display: block;
}

.sheet-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.sheet-item {
  border: 1px solid #313131;
  border-radius: 8px;
  padding: 6px;
  background: #111;
}

.sheet-item svg {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "controls"
      "preview"
      "sheet";
  }
}
