/* ==========================================================================
   Icon bar + popups for full-screen tools (aquarium, starfield, ...).
   Same look as the lava lamp bar: icon-only buttons; sliders and option lists pop up above their icon
   (on hover with a mouse, on tap with touch).
   ========================================================================== */
.controls { flex-wrap: nowrap; padding: 8px 10px; border-radius: 26px; gap: 0; align-items: center; }
.controls [hidden] { display: none !important; }
.bar { display: flex; align-items: center; justify-content: center; gap: 6px; }
.controls .btn-icon { width: 46px; height: 46px; min-height: 46px; }
.controls .btn-icon svg { width: 22px; height: 22px; }

.ctl { position: relative; }
.pop {
  position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(calc(-50% + var(--dx, 0px)));
  display: none; padding: 12px; z-index: 5;
  background: rgba(12, 12, 18, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.pop::before { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 16px; }   /* keeps hover alive across the gap */
.ctl.open .pop { display: block; }
@media (hover: hover) { .ctl:hover .pop { display: block; } }

.pop-slider { width: 54px; height: 168px; padding: 0; }
.pop-slider input[type=range] { position: absolute; left: 50%; top: 50%; width: 132px; margin: 0; transform: translate(-50%, -50%) rotate(-90deg); }
.pop-list { width: 224px; }
.pop-form { width: 236px; display: flex; flex-direction: column; gap: 10px; }
.pop-form label { font-size: 12px; color: var(--text-dim); display: flex; flex-direction: column; gap: 4px; }
.pop-form input[type=text] { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 12px; font: inherit; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opts.one { grid-template-columns: 1fr; }
.opt { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid transparent;
       background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.opt:hover { background: rgba(255, 255, 255, .13); }
.opt[aria-pressed="true"] { background: var(--accent); color: #1a0d05; }
.dot { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 1px solid rgba(255, 255, 255, .45); }
@media (max-width: 520px) {
  .controls { padding: 6px 6px; border-radius: 22px; }
  .bar { gap: 2px; }
  .controls .btn-icon { width: 40px; height: 40px; min-height: 40px; }
  .controls .btn-icon svg { width: 20px; height: 20px; }
  .hint { display: none; }
}
