/* ===== Root variables & box sizing ===== */
:root {
  --about-font: 'Arial, sans-serif';
}

* {
  box-sizing: border-box;
}

/* ===== Fondo de la página ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
  background-image: url('assets/background-image.png');
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;

  cursor: none;
}

/* ===== Pantalla de presentación ===== */
#cover-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
}

/* Imagen de portada */
#cover-screen img {
  width: 80%;
  max-width: 300px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 20px;
}

/* Botón Play */
#cover-screen button {
  padding: 15px 30px;
  font-size: 24px;
  border-radius: 15px;
  border: none;
  background-color: #ffffffaa;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#cover-screen button:hover {
  background-color: red;
  color: #fff;
}

/* ===== Imagen de título encima del juego ===== */
#game-title {
  width: 260px;
  margin-top: 20px;
}

/* ===== Contenedor del juego ===== */
#game-container {
  position: relative;
  width: 95%;
  max-width: 800px;
  height: 400px;
  margin: 20px auto;
  border: 10px solid #6d6d6d;
  overflow: hidden;
  border-radius: 30px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  background-image: url('assets/ocean.png');
  background-repeat: repeat-x;
  background-position: 0 0;
  background-size: cover;
}

/* Ejemplo de párrafo dentro del contenedor del juego */
#game-container p {
  color: #1b034b;
  font-size: 30px;
}

/* ===== Animación del agua ===== */
@keyframes moveWater {
  from {
    background-position-x: 0;
  }

  to {
    background-position-x: 800px;
  }
}

/* ===== Tiburón ===== */
.shark {
  position: absolute;
  width: 160px;
  height: auto;
}

/* ===== Patitos flotando ===== */
.duck {
  position: absolute;
  width: 40px;
  height: 40px;
  transition: filter 0.2s, transform 0.2s, opacity 0.2s;
  animation: floatDuck 2s ease-in-out infinite alternate;
}

@keyframes floatDuck {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-10px);
  }
}

/* Patito comido */
.duck.eaten {
  filter: hue-rotate(0deg) saturate(10) brightness(1);
  transform: scale(0.5);
  opacity: 0.7;
}

/* Dot rojo al comer */
.red-dot {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: red;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* ===== Marcador ===== */
#puntos {
  font-size: 20px;
  text-align: center;
  margin: 10px 0;
}

/* ===== Controles móviles ===== */
#mobile-controls {
  display: none;
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  gap: 10px;
  z-index: 2100;
}

#mobile-controls button {
  width: 50px;
  height: 50px;
  font-size: 24px;
  border-radius: 10px;
  border: none;
  background-color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== Botones fijos arriba ===== */
#about-me-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  position: fixed;
  top: 15px;
  left: 60px;
  z-index: 2000;
}

#about-me-button img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid #5ca0d7;
  cursor: pointer;
}

#about-me-button p {
  margin-top: 5px;
  font-size: 20px;
  color: #1b034b;
}

/* ===== Music & Duck buttons ===== */
#music-button {
  width: 100px;
  height: 100px;
  cursor: pointer;
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 2000;
  transition: transform 0.2s ease;
}

#music-button:hover {
  transform: scale(1.1);
}

#duck-button {
  width: 80px;
  height: 80px;
  cursor: pointer;
  position: fixed;
  top: 25px;
  right: 120px;
  border-radius: 50%;
  z-index: 2000;
}

/* ==== Page about me ==== */
.about-card {
  width: 90%;
  max-width: 400px;
  margin: 10px auto;
  padding: 10px;
  border-radius: 15px;
  background-color: rgba(234, 200, 175, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  font-family: Arial, sans-serif;
}

.avatar {
  width: 150px;
  height: 220px;
  border-radius: 50%;
  margin-bottom: 3px;
  border: 2px solid #5ca0d7;
}

/* Párrafo del About Me: usa la variable --about-font para cambiar la fuente fácilmente */
.about-button p {
  margin: 10px 0;
  font-size: 16px;
  line-height: 1.5;
  font-family: var(--about-font);
}

.horizontal-list {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 10px 0;
  gap: 15px;
}

.horizontal-list li {
  margin: 0;
}

.about-card a {
  color: #0077cc;
  text-decoration: none;
}

.about-card a:hover {
  text-decoration: underline;
}

.disclaimer {
  font-size: 12px;
  color: #555;
  margin-top: 15px;
  padding: 10px 15px;
  border-left: 4px solid #f39c12;
  background-color: #fff3e0;
  border-radius: 5px;
  text-align: left;
}

.rights {
  text-align:center; 
  margin-top:1px; 
  color:red;
  font-size: 11px;
}


.back-btn {
  display: block;
  text-align: center;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #cc1717;
  color: white;
  border-radius: 10px;
  text-decoration: none;
}

.back-btn:hover {
  background-color: #005fa3;
}

/* === CURSOR === */
#emoji-cursor {
  position: fixed;
  font-size: 32px;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: scale(1) translate(-50%, -50%);
  }

  100% {
    opacity: 0;
    transform: scale(2.2) translate(-50%, -50%);
  }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  #game-container {
    height: 65vh;
    margin-top: 60px;
  }

  #game-title {
    width: 180px;
  }

  #puntos {
    font-size: 16px;
  }

  .shark {
    width: 120px;
  }

  .duck {
    width: 30px;
    height: 30px;
  }

  /* Controles móviles */
  #mobile-controls {
    display: flex;
  }

  #mobile-controls button {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 600px) {
  #emoji-cursor {
    display: none;
  }

  /* Contenedor del juego */
  #game-container {
    height: 65vh;
    /* tamaño base relativo a la pantalla */
    min-height: 250px;
    /* nunca más pequeño que esto */
    max-height: 1000px;
    /* nunca más grande que esto */
    width: 95%;
    /* ajusta al ancho de pantalla */
    margin: 0 auto;
    /* lo centra */
    margin-top: 30px;
  }

  /* Título */
  #game-title {
    width: 130px;
    margin-top: 30px;
  }

  /* Botón About Me */
  #about-me-button {
    top: 4px;
    left: 16px;
  }

  #about-me-button img {
    width: 73px;
    height: 73px;
  }

  /* Botón música */
  #music-button {
    top: 10px;
    right: 3px;
    width: 64px;
    height: 64px;
  }

  /* Botón pato */
  #duck-button {
    top: 10px;
    right: 63px;
    width: 47px;
    height: 47px;
  }

  /* Marcador */
  #puntos {
    font-size: 14px;
    color: red;
    font: bold;
  }

  /* Tiburón */
  .shark {
    width: 120px;
  }

  /* Patos */
  .duck {
    width: 25px;
    height: 25px;
  }

  /* Controles móviles */
  #mobile-controls {
    display: flex;
  }

  #mobile-controls button {
    width: 50px;
    height: 50px;
    font-size: 20px;
    background-color: #cc1717;
  }

  /* Portada */
  #cover-screen img {
    width: 90%;
    max-width: 300px;
  }

  #cover-screen button {
    font-size: 20px;
    padding: 12px 25px;
  }
}