/* ---------------------------------------------------
   FUENTES Y AJUSTES GENERALES
-----------------------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&family=Roboto+Mono:wght@300;400&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto Mono", monospace;
  background: #000;
  color: #e1e1e1;
  overflow-x: hidden;
}


/* ----------------------------------------------
   PANTALLAS
-----------------------------------------------*/
.screen {
  display: none;
  padding: 40px;
  text-align: center;
  min-height: 100vh;
}

.screen.active {
  display: block;
}

/* ----------------------------------------------
   TÍTULO PRINCIPAL CON EFECTO GLITCH
-----------------------------------------------*/
.main-title {
  font-family: 'UnifrakturCook', serif;
  font-size: 3.2rem;
  color: #fff;
  margin-top: 80px;
  text-shadow: 0 0 10px red;
  position: relative;
  animation: glitch 1.3s infinite;
}

@keyframes glitch {
  0% { text-shadow: 2px 2px red, -2px -2px #00f; }
  20% { text-shadow: -2px -2px red, 2px 2px #0f0; }
  40% { text-shadow: 2px -2px #0f0, -2px 2px red; }
  60% { text-shadow: -2px 2px #0ff, 2px -2px red; }
  80% { text-shadow: 3px 3px red, -3px -3px #0f0; }
  100% { text-shadow: 0 0 6px red; }
}

/* ----------------------------------------------
   MENÚ PRINCIPAL
-----------------------------------------------*/
.menu-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.menu-button {
  padding: 18px;
  background: #111;
  border: 2px solid red;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.3s;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.menu-button:hover {
  background: red;
  box-shadow: 0 0 15px red;
}

/* ----------------------------------------------
   EFECTO DE GOTAS DE SANGRE
-----------------------------------------------*/
.blood-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: url('img/blood.png') repeat-x;
  background-size: contain;
  animation: drip 4s linear infinite;
  pointer-events: none;
}

@keyframes drip {
  0% { transform: translateY(-10px); }
  50% { transform: translateY(0px); }
  100% { transform: translateY(-10px); }
}

/* ----------------------------------------------
   TÍTULOS SECUNDARIOS
-----------------------------------------------*/
.content-title {
  font-size: 2.5rem;
  margin-bottom: 30px;
}

.silver-text {
  color: #ccc;
}

.dark-text {
  color: red;
  text-shadow: 0 0 5px red;
}

/* ----------------------------------------------
   BOTÓN DE VOLVER
-----------------------------------------------*/
.back-button {
  background: transparent;
  border: 2px solid #555;
  color: #ddd;
  padding: 10px 20px;
  cursor: pointer;
  margin-bottom: 30px;
  transition: 0.3s;
}

.back-button:hover {
  border-color: red;
  color: red;
  text-shadow: 0 0 5px red;
}

/* ----------------------------------------------
   CUADROS DE PERSONAJES
-----------------------------------------------*/
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  max-width: 900px;
  margin: auto;
}

.char-box {
  display: block;
  padding: 20px;
  background: #111;
  border: 2px solid rgba(255, 0, 0, 0.5);
  color: white;
  text-decoration: none;
  transition: 0.4s;
  letter-spacing: 1px;
}

.char-box:hover {
  background: red;
  color: #000;
  box-shadow: 0 0 15px red;
}

/* ----------------------------------------------
   DATOS EXTRA
-----------------------------------------------*/
.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: auto;
}

.data-box {
  background: #111;
  border: 2px solid #444;
  padding: 20px;
  text-align: left;
  transition: 0.3s;
}

.data-box:hover {
  border-color: red;
  box-shadow: 0 0 10px red;
}

.info-button {
  margin-top: 10px;
  padding: 10px 20px;
  background: #222;
  border: 1px solid red;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
}

.info-button:hover {
  background: red;
  color: black;
}

/* ----------------------------------------------
   SCROLLBAR CREEPY
-----------------------------------------------*/
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: red;
  border-radius: 5px;
}

::-webkit-scrollbar-track {
  background: #111;
}

/* ------------------------------
   JUMPSCARE
-------------------------------*/
.jumpscare-img {
  position: fixed;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  z-index: 99999;
  opacity: 1;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease-out;
}


/* ---------------------------------
   GLITCH DE PANTALLA BEN DROWNED
-----------------------------------*/
.glitch-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99998;

  /* Rayas glitch */
  background: repeating-linear-gradient(
      to bottom,
      rgba(255, 0, 0, 0.3),
      rgba(255, 0, 0, 0.3) 2px,
      rgba(0, 255, 255, 0.15) 4px,
      rgba(0, 0, 0, 0.1) 6px
  );

  mix-blend-mode: difference;
  opacity: 1;
  filter: hue-rotate(90deg) saturate(3) contrast(2);
  animation: glitchFlash 0.2s steps(2);
}

@keyframes glitchFlash {
  0% { opacity: 1; filter: hue-rotate(0deg) saturate(5); }
  50% { opacity: 0.6; filter: hue-rotate(120deg) invert(1); }
  100% { opacity: 1; filter: hue-rotate(0deg) saturate(6); }
}

.fade-out-glitch {
  opacity: 0 !important;
  transition: opacity 0.3s ease-out;
}

/* ---------------------------------
   MANCHAS DE SANGRE
-----------------------------------*/
.blood-stain {
  position: fixed;
  background: rgba(139, 0, 0, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99997;
  opacity: 1;
  filter: blur(4px);
  transition: opacity 4s ease-out, transform 4s ease-out;
  transform: rotate(0deg) scale(1);
}

/* ---------------------------------
   ANIMACIONES DE BOTONES
-----------------------------------*/

/* Animación de brillo pulsante */
@keyframes glowPulse {
  0% { box-shadow: 0 0 5px red, 0 0 10px red inset; }
  50% { box-shadow: 0 0 15px red, 0 0 25px red inset; }
  100% { box-shadow: 0 0 5px red, 0 0 10px red inset; }
}

/* Animación de movimiento leve */
@keyframes pulseMove {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* Animación de cambio de color */
@keyframes colorShift {
  0% { background: #111; color: #fff; border-color: #ff0000; }
  50% { background: #330000; color: #ff4d4d; border-color: #ff4d4d; }
  100% { background: #111; color: #fff; border-color: #ff0000; }
}

/* Aplicar animación a los botones principales */
.menu-button,
.back-button,
.info-button {
  animation: glowPulse 2s infinite, pulseMove 1.5s infinite, colorShift 4s infinite;
}

/* ---------------------------------
   EFECTO DE SANGRE EN BOTONES
-----------------------------------*/

/* Contenedor relativo para pseudo-elementos */
.menu-button,
.back-button,
.info-button {
  position: relative;
  overflow: hidden;
}

/* Gotas de sangre animadas */
.menu-button::after,
.back-button::after,
.info-button::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: red;
  border-radius: 50%;
  top: -10px; /* Empieza arriba del botón */
  left: 20%;
  opacity: 0;
  pointer-events: none;
  animation: drip 1s infinite;
}

/* Varias gotas en distintos lugares */
.menu-button::before,
.back-button::before,
.info-button::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: red;
  border-radius: 50%;
  top: -12px;
  left: 60%;
  opacity: 0;
  pointer-events: none;
  animation: drip 1.2s infinite 0.5s;
}

/* Animación de caída */
@keyframes drip {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(25px) scale(0.8);
    opacity: 0;
  }
}

/* Hover principal: gotas más intensas y botón “ensangrentado” */
.menu-button:hover,
.back-button:hover,
.info-button:hover {
  background: #330000;
  color: #ff4d4d;
  box-shadow: 0 0 20px red, inset 0 0 10px red;
}

/* Hover: intensificar animación de gotas */
.menu-button:hover::after,
.back-button:hover::after,
.info-button:hover::after,
.menu-button:hover::before,
.back-button:hover::before,
.info-button:hover::before {
  animation-play-state: running;
}
