:root {
  --background-color: rgb(10, 10, 10);  
  --hulu-color: #f03;
  
  --gradient-green-rgb: 32, 147, 127;
  --gradient-blue-rgb: 127, 117, 237;
  --gradient-violet-rgb: 171, 111, 218;
  
  --highlight-blue-rgb: 45, 37, 143;

  /* Marco del logo (usa unidades no porcentuales para evitar descuadres en TVs) */
  --frame-thickness: 0.25em;
  --frame-gap-x: clamp(1rem, 4vw, 2rem);
  --frame-gap-y: clamp(0.75rem, 2.5vw, 1.5rem);
}

body{
  align-items: center;
  background-color: var(--background-color);
  /* Fallback flexbox para TVs antiguas */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  height: 100vh;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  margin: 0px;
  overflow: hidden;
  padding: 0px;
  width: 100vw;
}

html, body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@supports (height: 100svh) {
  body {
    height: 100svh;
  }
}

.absolute-centered {
  left: 50%;
  position: absolute;
  top: 50%;
  -webkit-transform: translate3d(-50%, -50%, 0);
  -ms-transform: translate(-50%, -50%);
  transform: translate3d(-50%, -50%, 0);
  -webkit-transform-origin: 50% 50%;
  -ms-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
}

.jakarta-sans-font {
  font-family: "Plus Jakarta Sans", sans-serif;
}

.zen-dots-font {
  font-family: "Zen Dots", cursive;
}

#restart-button {
  backdrop-filter: blur(3px);
  background-color: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 6px;
  bottom: 2vh;
  color: white;
  cursor: pointer;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  left: 50%;
  outline: none;
  padding: clamp(0.5rem, 1.5vh, 0.8rem) clamp(1rem, 2.5vw, 1.5rem);
  position: absolute;
  transform: translateX(-50%);
  z-index: 100;
  
}

#restart-button:hover,
#restart-button:focus {
  background-color: rgba(255, 255, 255, 0.1);
}

#green-filter {
  background: radial-gradient(rgba(var(--gradient-green-rgb), 0.05), rgba(var(--gradient-green-rgb), 0.4) 80%);
  height: 100%;
  left: 0px;
  position: absolute;
  top: 0px;
  width: 100%;
  z-index: 1;
}

.gradient {
  filter: blur(3em);
  height: clamp(6vh, 8vw, 12vh);
  left: -5%;
  position: absolute;
  width: 110%;
}

#top-gradient {
  background: linear-gradient(
    to right, 
    rgba(var(--gradient-blue-rgb), 0.75) 0% 10%,  
    transparent 10% 20%,
    rgba(var(--gradient-violet-rgb), 0.5) 20% 50%, 
    rgba(var(--gradient-blue-rgb), 0.5) 50% 70%, 
    rgba(var(--gradient-green-rgb), 0.75) 70%
  );
  top: calc(-1 * clamp(3vh, 6vw, 8vh));
}

#bottom-gradient {
  background: linear-gradient(
    to right, 
    rgba(var(--gradient-blue-rgb), 0.75) 0% 10%,  
    transparent 10% 30%,
    rgba(var(--gradient-blue-rgb), 0.5) 30% 50%, 
    transparent 50% 70%,
    rgba(var(--gradient-violet-rgb), 0.5) 70% 80%, 
    transparent 80%
  );
  bottom: calc(-1 * clamp(3vh, 6vw, 8vh));
}

#logo-wrapper {
  align-items: center;
  /* Fallback flexbox para TVs antiguas */
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  height: auto;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
}

@supports (height: 100svh) {
  #logo-wrapper {
    height: 100svh;
  }
}

#logo {
  opacity: 0;
  position: fixed;
  z-index: 2;
  display: inline-block;
  left: 50%;
  top: 50%;
  -webkit-transform: translate3d(-50%, -50%, 0);
  -ms-transform: translate(-50%, -50%);
  transform: translate3d(-50%, -50%, 0);
  -webkit-transform-origin: 50% 50%;
  -ms-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
}

#logo-content {
  position: relative;
}

#logo-border {
  background-color: var(--hulu-color);
  border-radius: 0;
  z-index: 1;
  position: absolute;
  transform: none;
  width: auto;
  height: auto;
  /* Expandir alrededor del contenido del logo */
  top: calc(var(--frame-gap-y, 24px) * -1);
  bottom: calc(var(--frame-gap-y, 24px) * -1);
  left: calc(var(--frame-gap-x, 32px) * -1);
  right: calc(var(--frame-gap-x, 32px) * -1);
}
/* Overlays para revelar las líneas L→R */
#logo-border::before,
#logo-border::after {
  content: "";
  position: absolute;
  left: 0px;
  width: 100%;
  height: var(--frame-thickness, 4px); /* igual al grosor de línea */
  background-color: var(--background-color);
  transform: translateX(100%);
  animation: reveal-lr 0.6s ease-out forwards;
  animation-play-state: paused;
}

#logo-border::before { top: 0; }
#logo-border::after { bottom: 0; }

/* Activador para reproducir la animación */
#logo-border.reveal-lines::before,
#logo-border.reveal-lines::after {
  animation-play-state: running;
}
  
#logo-border-inner {
  background-color: var(--background-color);
  border-radius: 0;
  z-index: 2;
  position: absolute;
  transform: none;
  width: auto;
  height: auto;
  /* Mismo tamaño que el borde pero restando el grosor para crear el hueco */
  top: calc((var(--frame-gap-y, 24px) - var(--frame-thickness, 4px)) * -1);
  bottom: calc((var(--frame-gap-y, 24px) - var(--frame-thickness, 4px)) * -1);
  left: calc((var(--frame-gap-x, 32px) - var(--frame-thickness, 4px)) * -1);
  right: calc((var(--frame-gap-x, 32px) - var(--frame-thickness, 4px)) * -1);
}

#logo-text {
  position: relative;
  z-index: 3;
  text-align: center;
}

#hulu-text {
  color: var(--hulu-color);
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: 1.1;
  white-space: nowrap;
}

#originals-text {
  color: white;
  font-size: clamp(1rem, 3.5vw, 3rem);
  letter-spacing: clamp(0.08em, 0.5vw, 0.25em);
}
    
@keyframes reveal-lr {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

@keyframes bounce {
  from, 3.33%, 8.83%, 16.66% {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0);
  }

  6.66%, 7.16% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -15px, 0) scaleY(1.1);
  }

  11.66% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -7px, 0) scaleY(1.05);
  }

  13.33% {
    transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0) scaleY(0.95);
  }

  15% {
    transform: translate3d(0, -2px, 0) scaleY(1.02);
  }
}

/* Escalado ya manejado con clamp() en tipografías; no se requiere scale(). */

@media(max-width: 600px) {  
  #restart-button {
    left: auto;
    right: 10px;
    transform: none;
  }
}