/* ── Viewport ── */
#viewport {
  position: fixed;
  top: 38px;
  left: 0;
  right: 0;
  bottom: 28px;
}

#viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── HUD Info ── */
.hud {
  position: fixed;
  top: 50px;
  right: 14px;
  z-index: 50;
  pointer-events: none;
}

.hud-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.7;
  text-align: right;
}

.hud-label { color: var(--text-secondary); }
.hud-val { color: var(--text-dim); }

/* ── Animation Buttons (bottom-center, unique to character viewer) ── */
#anim-bar {
  position: fixed;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 90vw;
}

#anim-bar button {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.15s ease;
  position: relative;
}
#anim-bar button:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--accent);
}
#anim-bar button.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

/* Delete badge on anim buttons */
#anim-bar button .delete-badge {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,60,60,0.85);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  border: none;
  padding: 0;
  font-family: inherit;
}
body.delete-mode #anim-bar button .delete-badge {
  display: block;
}
body.delete-mode #anim-bar button .delete-badge:hover {
  background: rgba(255,30,30,1);
  transform: scale(1.15);
}

/* Cycle / Shuffle mode buttons */
#anim-bar .anim-mode-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ── Fullscreen mode — hide all UI chrome ── */
body.fullscreen-mode .topbar,
body.fullscreen-mode .bottombar,
body.fullscreen-mode .toolstrip,
body.fullscreen-mode .hud,
body.fullscreen-mode #anim-bar,
body.fullscreen-mode .camera-panel,
body.fullscreen-mode .lighting-panel,
body.fullscreen-mode .render-panel,
body.fullscreen-mode .presets-panel {
  display: none !important;
}

body.fullscreen-mode #viewport {
  top: 0;
  bottom: 0;
}

body.fullscreen-mode {
  cursor: none;
}
