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

body {
  background: #000;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
  user-select: none;
}

#stage {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* ── Panel ─────────────────────────────────────────── */
.panel {
  position: fixed;
  top: 20px;
  right: 0;
  width: 260px;
  background: rgba(8, 3, 0, 0.93);
  border: 1px solid #7a3300;
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: #ffaa44;
  z-index: 100;
  transition: transform 0.3s ease;
  backdrop-filter: blur(12px);
  box-shadow: -4px 0 20px rgba(255, 100, 0, 0.15);
}

.panel.collapsed {
  transform: translateX(228px);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #3a1500;
}

.panel-title {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #ff8833;
}

#panel-toggle {
  background: none;
  border: 1px solid #7a3300;
  color: #ff6600;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  transition: background 0.2s;
}

#panel-toggle:hover { background: #2a0d00; }

.panel-body {
  padding: 12px 14px;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #441100 transparent;
}

.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: #441100; border-radius: 4px; }

section {
  margin-bottom: 11px;
}

.section-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #885522;
  margin-bottom: 5px;
  text-transform: uppercase;
}

select {
  width: 100%;
  background: #150700;
  border: 1px solid #3a1500;
  color: #ffaa44;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

select:focus { border-color: #ff6600; }

input[type="range"] {
  width: 100%;
  height: 4px;
  appearance: none;
  background: #2a0d00;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff6600;
  box-shadow: 0 0 6px rgba(255,100,0,0.6);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff6600;
  border: none;
  cursor: pointer;
}

/* Colors */
.colors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.color-btn {
  width: 26px;
  height: 26px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
}

.color-btn:hover {
  transform: scale(1.15);
}

.color-btn.active {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 150, 50, 0.8);
}

.rainbow-btn {
  background: linear-gradient(135deg, #ff0000, #ff8800, #ffff00, #00cc44, #0066ff, #9933ff);
}

/* Grid row for cols/rows */
.grid-row {
  display: flex;
  gap: 10px;
}

/* Actions */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.actions button {
  flex: 1;
  background: #150700;
  border: 1px solid #7a3300;
  color: #ffaa44;
  padding: 7px 4px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: background 0.2s, border-color 0.2s;
}

.actions button:hover {
  background: #2a0d00;
  border-color: #ff6600;
}

.logo-toggle {
  width: 100%;
  background: #0d0500;
  border: 1px solid #3a1500;
  color: #886622;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.logo-toggle.active {
  background: #1a0800;
  border-color: #cc6600;
  color: #ffcc66;
  box-shadow: 0 0 8px rgba(255, 140, 0, 0.25);
}

.logo-toggle.active:hover {
  border-color: #ff8800;
}

.logo-row {
  margin-bottom: 8px;
}

/* Presets */
.presets {
  display: flex;
  gap: 5px;
}

.preset-btn {
  flex: 1;
  background: #0d0500;
  border: 1px solid #3a1500;
  color: #bb6611;
  padding: 5px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 9px;
  font-family: inherit;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.preset-btn:hover {
  background: #1a0800;
  border-color: #ff6600;
  color: #ffaa44;
}

/* Text input */
input[type="text"] {
  width: 100%;
  background: #150700;
  border: 1px solid #3a1500;
  color: #ffaa44;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

input[type="text"]:focus { border-color: #ff6600; }
input[type="text"]::placeholder { color: #3a1800; }

/* Tap button accent */
#btn-tap {
  background: #120800;
  border-color: #994400;
  color: #ff8833;
  font-size: 12px;
  letter-spacing: 1px;
}

#btn-tap:hover {
  background: #1e0d00;
  border-color: #ff6600;
}
