/* Jazz Ambient Engine v1 — layout & control panel */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #060505;
  color: #f0e6d6;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

#stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: radial-gradient(ellipse at center, #0d0a08 0%, #050404 70%);
}

#film {
  max-width: 100%;
  max-height: 100%;
  background: #000;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

#gear {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(212, 162, 78, 0.4);
  background: rgba(20, 12, 10, 0.75);
  color: #f0e6d6;
  font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

#gear:hover { background: rgba(60, 35, 25, 0.85); }

#recBadge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 30;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(120, 10, 15, 0.85);
  border: 1px solid #ff5a5a;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- control panel ---------- */

#panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  width: 302px;
  height: 100%;
  overflow-y: auto;
  padding: 14px 14px 30px;
  background: rgba(14, 9, 8, 0.88);
  border-left: 1px solid rgba(212, 162, 78, 0.25);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease;
}

#panel.hidden { transform: translateX(105%); }

.p-head {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #d4a24e;
  margin-bottom: 6px;
}

#panel section { margin-top: 14px; }

#panel h3 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #b99a68;
  border-bottom: 1px solid rgba(212, 162, 78, 0.2);
  padding-bottom: 5px;
}

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btnrow.col { flex-direction: column; }

.btnrow button {
  flex: 1 1 auto;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f0e6d6;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.btnrow button:hover { background: rgba(255, 255, 255, 0.12); }

.btnrow button.on {
  border-color: #d4a24e;
  background: rgba(212, 162, 78, 0.18);
  color: #ffd98a;
  font-weight: 600;
}

.btnrow button.sw::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c);
  margin-right: 7px;
  vertical-align: baseline;
}

.lbl {
  font-size: 12px;
  color: #a89273;
  margin: 8px 0 5px;
}

.hint {
  font-size: 11px;
  color: #7d6f5c;
  font-weight: 400;
}

.btnrow button.danger {
  border-color: rgba(255, 90, 90, 0.5);
  background: rgba(120, 20, 25, 0.35);
  color: #ffb0a8;
}

.slider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 7px 0;
}

.slider input[type="range"] { flex: 1; accent-color: #d4a24e; }

.slider span {
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #ffd98a;
  font-size: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 7px 0;
  cursor: pointer;
}

.check input { accent-color: #d4a24e; width: 15px; height: 15px; }

#inTitle {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #f5ead6;
  font-size: 14px;
  font-family: Georgia, "Times New Roman", serif;
}

.status {
  margin-top: 8px;
  font-size: 12px;
  color: #9db89a;
  min-height: 18px;
}

/* ---------- seed & variation tracker ---------- */

.seedrow { display: flex; gap: 6px; }

.seedrow input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #f5ead6;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.seedrow button {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f0e6d6;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.seedrow button:hover { background: rgba(255, 255, 255, 0.12); }

.warn {
  margin: 8px 0;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 170, 60, 0.55);
  background: rgba(120, 70, 10, 0.3);
  color: #ffd98a;
  font-size: 12px;
  line-height: 1.45;
}

.hist {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
}

.hist-row {
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.hist-row .hist-t { color: #ffd98a; font-variant-numeric: tabular-nums; }

.hist-row .hist-d { display: block; color: #b8a88e; margin-top: 2px; }

.hist-empty { font-size: 12px; color: #7d6f5c; padding: 6px 2px; }

/* ---------- transport controls ---------- */

#controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: #0b0807;
  border-top: 1px solid rgba(212, 162, 78, 0.18);
}

#toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(212, 162, 78, 0.5);
  background: rgba(212, 162, 78, 0.12);
  color: #ffd98a;
  font-size: 15px;
  cursor: pointer;
}

#bar {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

#fill {
  height: 100%;
  width: 0%;
  border-radius: 5px;
  background: linear-gradient(90deg, #8e2f3c, #d4a24e);
}

#clock {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #cbb591;
  min-width: 92px;
  text-align: right;
}
