/* Fondo estilo VisionOS */
body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at center, #1c1f26 0%, #090b0f 100%);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* UI superior */
.ui {
  position: absolute;
  top: 40px;
  width: 100%;
  text-align: center;
  color: white;
  user-select: none;
}

.title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1px;
}

.subtitle {
  margin-top: -5px;
  font-size: 16px;
  opacity: 0.65;
}

/* Cámara escondida */
#cam {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

/* --- OBJETO PRINCIPAL VISIONOS --- */
#object {
  position: absolute;
  width: 140px;
  height: 140px;

  border-radius: 28px;

  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);

  border: 1px solid rgba(255, 255, 255, 0.22);

  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.08),
    inset 0 0 35px rgba(255, 255, 255, 0.02),
    0 20px 50px rgba(0, 0, 0, 0.55);

  pointer-events: none;

  /* Para que la animación del brillo se deslice */
  overflow: hidden;

  transition:
    transform 0.18s cubic-bezier(.22, .61, .36, 1),
    background 0.25s ease,
    box-shadow 0.25s ease,
    border 0.25s ease;
}

/* ✨ Reflexión animada tipo VisionOS */
#object::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;

  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );

  opacity: 0.8;
  transform: translateY(-100%) rotate(10deg);
  animation: vision-reflection 3.8s ease-in-out infinite;
}

@keyframes vision-reflection {
  0% {
    transform: translateY(-160%) rotate(10deg);
    opacity: 0;
  }
  20% {
    opacity: 0.75;
  }
  50% {
    transform: translateY(60%) rotate(10deg);
    opacity: 0.4;
  }
  80% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(160%) rotate(10deg);
    opacity: 0;
  }
}

/* Estado GRAB */
#object.grab {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.32);

  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.12),
    inset 0 0 45px rgba(255, 255, 255, 0.04),
    0 25px 60px rgba(0, 0, 0, 0.65);

  transform: scale(0.94);
}
