.physics-ball,
.physics-ball * {
  box-sizing: border-box;
}

.physics-ball {
  --ball-size: 64px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 35;
  width: var(--ball-size);
  height: var(--ball-size);
  padding: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: transparent;
  border: 0;
  border-radius: 50%;
  transform: translate3d(var(--ball-x, 0px), var(--ball-y, 0px), 0);
  will-change: transform;
}

.physics-ball:active,
.physics-ball.is-dragging {
  cursor: grabbing;
}

.physics-ball__surface {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1d1d1d;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  box-shadow: inset -0.32rem -0.5rem 0.65rem rgba(0, 0, 0, 0.45), inset 0.25rem 0.2rem 0.35rem rgba(255, 255, 255, 0.2);
  transform: rotate(var(--ball-spin, 0deg));
  will-change: transform;
}

.physics-ball__skin {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.physics-ball-shadow {
  position: fixed;
  z-index: 34;
  width: 3.25rem;
  height: 0.5rem;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 50%;
  filter: blur(0.22rem);
  transform: translate3d(var(--shadow-x, 0px), var(--shadow-y, 0px), 0) scale(var(--shadow-scale, 1));
  transform-origin: center;
  will-change: transform, opacity;
}

body[data-uiverse-route]:not([data-uiverse-route="home"]) .physics-ball,
body[data-uiverse-route]:not([data-uiverse-route="home"]) .physics-ball-shadow {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 520px) {
  .physics-ball {
    --ball-size: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .physics-ball,
  .physics-ball__surface,
  .physics-ball-shadow {
    will-change: auto;
  }
}
