* { box-sizing: border-box; }

html, body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#stage {
  position: fixed;
  inset: 0;
  height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #111;
  overflow: hidden;
  touch-action: manipulation;
}

#progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 4px;
  padding: env(safe-area-inset-top, 10px) 8px 0;
  z-index: 30;
}

.segment {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  overflow: hidden;
}

.segment .fill {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 80ms linear;
}

#player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px;
  gap: 10px;
  color: #fff;
  font-family: -apple-system, system-ui, sans-serif;
  background: #1c1c24;
}

#card .num {
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.75;
  margin-bottom: 10px;
}

#card .title {
  font-size: 26px;
  font-weight: 700;
}

#card.is-intro {
  background: none;
  overflow: hidden;
}

#card.is-intro::before {
  content: '';
  position: absolute;
  inset: -6%;
  z-index: 0;
  background: url('../Image/Generado/pantalla0-fondo.jpg') center/cover no-repeat;
  animation: intro-breathe 20s ease-in-out infinite alternate;
}

@keyframes intro-breathe {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  #card.is-intro::before { animation: none; }
}

#player.is-blurred, #card.is-blurred {
  filter: blur(14px);
}

#end-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-family: -apple-system, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

#tap-left, #tap-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 20;
}

#tap-left { left: 0; }
#tap-right { right: 0; width: 60%; }

[hidden] { display: none !important; }
