@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
  --bg-color: #0b0d11;
  --accent-color: #22d3ee;
  --accent-rgb: 34, 211, 238;

  --text-color: #e2e8f0;
  --panel-bg: rgba(15, 23, 42, 0.45);
  --border-light: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  width: 100vw; height: 100vh;
  overflow: hidden; display: flex; flex-direction: column;
  transition: background-color 0.4s ease;
}
#canvas-container {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
  cursor: grab; touch-action: none;
}
#canvas-container:active { cursor: grabbing; }
#canvas-container.drop-hot { outline: 2px dashed var(--accent-color); outline-offset: -10px; }
canvas { display: block; }
/* A radial gradient rather than the collection's usual `inset box-shadow`
   vignette: this piece draws thin bright lines on black in the middle of the
   frame, and a 140px inset shadow reaches far enough in to erase them. */
.overlay-vignette {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0.7) 100%);
}

/* Opening hint — says the one thing that is not discoverable by looking. */
.hud-hint {
  /* Absolute against the viewport, so it has to clear the 50px shared header. */
  position: absolute; top: 74px; left: 50%; transform: translateX(-50%);
  z-index: 8; pointer-events: none;
  font-size: 0.82rem; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.55);
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--border-light);
  padding: 7px 16px; border-radius: 999px; backdrop-filter: blur(8px);
  transition: opacity 0.8s ease;
}
.hud-hint.gone { opacity: 0; }
body.art-fullscreen .hud-hint, body.art-embedded .hud-hint { top: 24px; }
body.art-no-chrome .hud-hint { display: none; }

.control-dock {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-bg); border: 1px solid var(--border-light); border-radius: 20px;
  backdrop-filter: blur(25px) saturate(180%); -webkit-backdrop-filter: blur(25px) saturate(180%);
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.6); padding: 16px 24px; z-index: 10;
  display: flex; gap: 20px; align-items: center; max-width: 95vw; flex-wrap: wrap;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.control-dock.collapsed { transform: translate(-50%, calc(100% + 40px)); opacity: 0; pointer-events: none; }
.control-item { display: flex; flex-direction: column; gap: 6px; }
.control-header { display: flex; justify-content: space-between; align-items: center; min-width: 130px; }
.control-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); letter-spacing: 1px; }
.control-value-display { font-size: 0.75rem; font-weight: 500; color: var(--accent-color); font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; width: 100%; height: 4px; background: rgba(255, 255, 255, 0.1); border-radius: 2px; outline: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text-color); cursor: pointer; transition: all 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { background: var(--accent-color); transform: scale(1.2); box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5); }
select {
  padding: 8px 14px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-light); border-radius: 8px;
  color: var(--text-color); font-family: inherit; font-size: 0.85rem; outline: none; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23e2e8f0' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; min-width: 140px;
}
select:hover { background-color: rgba(255, 255, 255, 0.08); border-color: var(--accent-color); }

.control-item--checks { gap: 8px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: rgba(255,255,255,0.72); cursor: pointer; }
.check-row input { accent-color: var(--accent-color); width: 14px; height: 14px; cursor: pointer; }
.mini-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-light); border-radius: 8px;
  color: var(--text-color); font-family: inherit; font-size: 0.78rem; padding: 6px 10px; cursor: pointer;
  transition: all 0.2s ease;
}
.mini-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }

.control-item--help { max-width: 260px; border-left: 1px solid rgba(255,255,255,0.08); padding-left: 18px; }
.help-text { font-size: 0.76rem; line-height: 1.6; color: rgba(255, 255, 255, 0.55); }
.help-text strong { color: rgba(255, 255, 255, 0.85); font-weight: 600; }

.dock-toggle-btn {
  position: absolute; bottom: 24px; right: 24px; width: 44px; height: 44px;
  background: var(--panel-bg); border: 1px solid var(--border-light); border-radius: 12px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-color); z-index: 9;
  transition: all 0.3s ease;
}
.dock-toggle-btn:hover { border-color: var(--accent-color); color: var(--accent-color); transform: translateY(-2px); }
.dock-toggle-btn.hidden { opacity: 0; pointer-events: none; transform: translateY(20px) scale(0.8); }
.close-dock-btn {
  background: none; border: none; color: rgba(255,255,255,0.4); cursor: pointer;
  display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  transition: all 0.2s ease; margin-left: 10px;
}
.close-dock-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* Camera state badge — the piece must never be live without saying so. */
.cam-badge {
  position: absolute; top: 74px; right: 24px; z-index: 8; pointer-events: none;
  display: flex; align-items: center; gap: 9px;
  background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 999px; padding: 7px 15px; backdrop-filter: blur(10px);
  font-size: 0.76rem; color: rgba(255, 255, 255, 0.75);
}
.cam-badge.hidden { display: none; }
.cam-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ef4444;
  box-shadow: 0 0 8px #ef4444; animation: cam-pulse 1.6s ease-in-out infinite;
}
@keyframes cam-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
body.art-fullscreen .cam-badge, body.art-embedded .cam-badge { top: 24px; }
body.art-no-chrome .cam-badge { display: none; }

.control-item--stack { min-width: 150px; gap: 4px; }
.btn-row { display: flex; gap: 6px; }
.btn-row .mini-btn { flex: 1; }
.mini-btn:disabled { opacity: 0.4; cursor: default; border-color: var(--border-light); color: rgba(255,255,255,0.4); }
.mini-btn.is-live { border-color: #ef4444; color: #fca5a5; }

@media (max-width: 980px) {
  .control-item--help { display: none; }
}
