* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  max-width: 100vw;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow-x: hidden !important;
  overflow-y: hidden;
  background: black;
  font-family: 'Montserrat', sans-serif;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Contenedor Principal de Video ── */
.video-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: black;
}

/* Formato responsive idéntico a convoz y FERNANDAKPOP */
video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  max-height: 100vh;
  max-height: 100dvh;
  object-fit: contain;
}

#video1 {
  z-index: 2;
  display: block;
}

#video2 {
  z-index: 1;
  display: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* ── Pantalla de Navegadores No Soportados ── */
#unsupported-browser {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: black;
  z-index: 99999;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  font-size: 18px;
  line-height: 1.6;
  color: white;
}

/* ── Pantalla de Carga Secuencial ── */
#start-fallback {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: radial-gradient(circle at center, #181119 0%, #080508 60%, #000000 100%);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 25px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 340px;
  width: 100%;
}

.loader-logo {
  width: 200px;
  max-width: 75vw;
  height: auto;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 15px rgba(139, 19, 131, 0.3));
}

#loader-title {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 15px;
  margin-bottom: 6px;
  color: #c87dc3;
  text-shadow: 0 0 12px rgba(200, 125, 195, 0.4);
}

#loader-subtitle {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 1.5px;
  color: #b5b5b5;
  margin-bottom: 22px;
  line-height: 1.5;
}

.wifi-tip {
  font-size: 10px;
  opacity: 0.8;
  margin-top: 8px;
  display: inline-block;
  letter-spacing: 0.5px;
  color: #e0d0df;
}

#loader-progress-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

#loader-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #8b1383, #e28fe0);
  transition: width 0.25s ease;
  box-shadow: 0 0 10px #c87dc3;
}

#loader-percentage {
  font-size: 14px;
  font-weight: 400;
  color: #c87dc3;
  letter-spacing: 1px;
}

/* ── Botón Comenzar Pulsante Elegante ── */
#start-button {
  background: rgba(139, 19, 131, 0.25);
  border: 1.5px solid #c87dc3;
  color: #ffffff;
  padding: 13px 38px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  outline: none;
  animation: pulse-button 1.6s infinite ease-in-out;
  margin-top: 15px;
  box-shadow: 0 0 20px rgba(200, 125, 195, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.play-icon {
  font-size: 12px;
  color: #e28fe0;
}

#start-button:hover, #start-button:active {
  background: #8b1383;
  border-color: #ffffff;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(226, 143, 224, 0.7);
}

@keyframes pulse-button {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 18px rgba(200, 125, 195, 0.35);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(226, 143, 224, 0.75);
  }
}

/* ── Botones de Acción (Ubicación, Asistencia, Repetir) ── */
.buttons-container {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s ease, visibility 1s ease;
  z-index: 15;
  padding: 0 15px;
  max-width: 100%;
}

.buttons-container.enabled {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.button-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
}

.button-img {
  width: 68px;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

.button-img:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 14px rgba(200, 125, 195, 0.5));
}

.button-img:active {
  transform: scale(0.96);
}

.inactive-link {
  pointer-events: none;
}

@media (max-width: 480px) {
  .button-img { width: 66px; }
  .buttons-container {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .button-img { width: 80px; }
  .buttons-container {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 24px;
  }
}

@media (min-width: 769px) {
  .button-img { width: 92px; }
  .buttons-container {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    gap: 28px;
  }
}

/* ── Footer ── */
#main-footer {
  width: 100%;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  font-size: 9px;
  letter-spacing: 0.5px;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 16;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

#main-footer.enabled {
  opacity: 1;
  pointer-events: auto;
}

#main-footer a {
  color: #c87dc3;
  text-decoration: none;
  transition: color 0.2s ease;
}

#main-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

#main-footer a.inactive-link {
  pointer-events: none;
}
