/* Optional webcam hand control for the full-page particle field. */
.gesture-control-button {
  border-color: rgba(184, 61, 255, .48);
  background: linear-gradient(135deg, rgba(45, 33, 82, .96), rgba(18, 29, 50, .96));
  color: #f3eaff;
}

.gesture-control-button:hover,
.gesture-control-button.is-active {
  border-color: rgba(255, 213, 42, .66);
  background: linear-gradient(135deg, rgba(76, 48, 112, .98), rgba(31, 43, 73, .98));
  color: #fff7d1;
  box-shadow: 0 0 20px rgba(184, 61, 255, .2), inset 0 0 18px rgba(255, 213, 42, .08);
}

.gesture-control-button.is-loading {
  cursor: wait;
  opacity: .76;
}

.gesture-control-button.is-error {
  border-color: rgba(255, 63, 86, .7);
  color: #ffd9de;
}

.gesture-control-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.gesture-camera-panel {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  width: 176px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(184, 61, 255, .58);
  border-radius: 14px;
  background: #05070d;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42), 0 0 28px rgba(184, 61, 255, .16);
}

.gesture-camera-panel[hidden] {
  display: none;
}

/* Keep the camera preview hidden while leaving gesture and iris control running. */
#gestureCameraPanel {
  display: none !important;
}

.gesture-camera-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: .84;
}

.gesture-camera-status {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 6px 8px;
  background: linear-gradient(180deg, transparent, rgba(3, 5, 10, .88));
  color: #eef3ff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
}

.gesture-status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffd52a;
  box-shadow: 0 0 9px rgba(255, 213, 42, .72);
}

.gesture-camera-panel.is-tracking {
  border-color: rgba(85, 230, 255, .74);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .42), 0 0 30px rgba(62, 123, 255, .24);
}

.gesture-camera-panel.is-tracking .gesture-status-dot {
  background: #55e6ff;
  box-shadow: 0 0 9px rgba(85, 230, 255, .8);
}

.gesture-camera-panel.is-error {
  border-color: rgba(255, 63, 86, .78);
}

.gesture-camera-panel.is-error .gesture-status-dot {
  background: #ff3f56;
  box-shadow: 0 0 9px rgba(255, 63, 86, .76);
}

@media (max-width: 600px) {
  .gesture-camera-panel {
    left: 12px;
    bottom: 12px;
    width: 142px;
  }

  .gesture-control-button {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gesture-control-button {
    transition: none;
  }
}
