@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Roboto:wght@400;600;700;900&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: Roboto, system-ui, Segoe UI, Helvetica, Arial, sans-serif;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
}

.kiosk {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1400px;
}

.status {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.stage {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 3;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  transform: translate(-50%, -50%)
    translate(var(--wheel-translate-x, 0px), var(--wheel-translate-y, 0px))
    rotateZ(var(--wheel-rotate-z, 0deg)) rotateX(var(--wheel-tilt-x, 0deg))
    scale(var(--wheel-scale, 1));
}

#ring {
  display: block;
  position: relative;
  z-index: 1;
  image-rendering: pixelated;
}

.ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--ball-r, 18px) * 2);
  height: calc(var(--ball-r, 18px) * 2);
  margin: 0;
  transform: translate(-50%, -50%) translate(var(--ball-x, 0px), var(--ball-y, 0px)) translateZ(1px)
    rotateX(var(--ball-counter-x, 0deg));
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
  will-change: transform;
  background: #ef4444;
  filter: drop-shadow(2px 3px 5px rgba(0, 0, 0, 0.85));
}

.kiosk.fx .ball {
  filter: none;
  background:
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 18%),
    radial-gradient(
      circle at 35% 35%,
      rgba(255, 180, 180, 0.85) 0%,
      rgba(239, 68, 68, 0) 55%,
      rgba(120, 20, 20, 0.55) 100%
    ),
    #ef4444;
  box-shadow: 0 0 calc(var(--ball-r, 18px) * 0.6) rgba(239, 68, 68, 0.35);
}

.kiosk.fx .ball.hidden {
  display: none;
}

.lab-icons {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lab-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #333;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.lab-btn:hover {
  background: #222;
}

.lab-btn:active {
  transform: scale(0.92);
}

.lab-btn svg {
  width: 16px;
  height: 16px;
  stroke: #aaa;
  fill: none;
}

.lab-btn.active svg {
  stroke: #f472b6;
}

.lab-panel {
  position: fixed;
  top: 52px;
  right: 12px;
  z-index: 21;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 14px 16px 18px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: #141414;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

.lab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #f472b6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.lab-close {
  width: 28px;
  height: 28px;
  border: 0;
  background: none;
  color: #888;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lab-cam {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 4px 0 10px;
}

.lab-label,
.lab-row span:first-child {
  flex: 0 0 6.5rem;
  text-align: right;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888;
}

.lab-segment {
  display: flex;
  flex: 1;
  gap: 6px;
}

.lab-segment button {
  flex: 1;
  border: 1px solid #2e2f33;
  border-radius: 8px;
  padding: 7px 6px;
  background: #1c1c1e;
  color: #9aa0a6;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.lab-segment button.active {
  background: #2ec16e;
  border-color: transparent;
  color: #06210f;
}

.lab-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 4px 0;
}

.lab-row input[type="range"] {
  flex: 1;
  min-width: 0;
  appearance: none;
  height: 4px;
  background: #2a2a2a;
  border-radius: 2px;
  accent-color: #f472b6;
}

.lab-row input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f472b6;
  cursor: pointer;
}

.lab-row em {
  flex: 0 0 4.2rem;
  font-style: normal;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: #f472b6;
  text-align: right;
}
