* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0a0a0a;
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-family: "Courier New", monospace;
  color: #dcdcdc;
}

#canvasWrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle at 15% 15%, #1a1a1a 0%, #0a0a0a 55%, #050505 100%);
}

canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  border: 1px solid #202020;
}

#controls {
  width: 290px;
  min-width: 290px;
  background: #111;
  border-left: 1px solid #222;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#controls h1 {
  font-size: 12px;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: #666;
  padding-bottom: 10px;
  border-bottom: 1px solid #222;
}

#ui {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #4a4a4a;
  margin-top: 2px;
}

.ctrl {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ctrl label {
  font-size: 10px;
  color: #707070;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.val {
  font-size: 10px;
  color: #535353;
  min-width: 38px;
  text-align: right;
}

.ctrl input[type="text"],
.ctrl textarea,
.ctrl input[type="number"] {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #ddd;
  padding: 7px 8px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  outline: none;
}

.ctrl textarea {
  resize: vertical;
  min-height: 74px;
  line-height: 1.35;
}

.ctrl input[type="text"]:focus,
.ctrl textarea:focus {
  border-color: #555;
}

.ctrl input[type="range"] {
  width: 100%;
  accent-color: #e0e0e0;
  height: 2px;
  background: #222;
  border: none;
  outline: none;
  cursor: pointer;
}

.ctrl input[type="color"] {
  width: 34px;
  height: 26px;
  border: 1px solid #2a2a2a;
  background: none;
  cursor: pointer;
  padding: 2px;
}

.divider {
  border: 0;
  border-top: 1px solid #1e1e1e;
}

.hint {
  margin-top: 2px;
  font-size: 10px;
  color: #4a4a4a;
  letter-spacing: 0.08em;
}

.save-btn {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #ddd;
  padding: 8px 12px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.save-btn:hover {
  background: #242424;
  border-color: #3a3a3a;
}

.save-btn:active {
  background: #1a1a1a;
  border-color: #555;
}

@media (max-width: 980px) {
  body {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  #controls {
    width: 100%;
    min-width: 0;
    border-left: 0;
    border-top: 1px solid #222;
    max-height: 45vh;
  }

  #canvasWrap {
    min-height: 55vh;
  }
}
