/* Fondo principal */
body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;

  /* Imagen de playa */
  background-image: url("images/fondo-playa.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
  font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
  color: rgb(241, 237, 237);
  display: flex;
  justify-content: center;
}

/* Título */
.title {
  font-size: 4.2rem;
  font-family: 'Georgia', serif;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #5e1616;
  text-shadow:
    0 3px 8px rgba(255,255,255,0.35),
    0 5px 18px rgba(0,0,0,0.35);

  text-align: center;
  margin: 10px 0 35px;
}

/* Contenedor de instrumentos */
.instrument-container {

  /* Efecto cristal */
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.16),
    rgba(255,255,255,0.08)
  );

  backdrop-filter: blur(3.5px) saturate(140%);
  -webkit-backdrop-filter: blur(3.5px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 28px;
  padding: 25px 20px 35px;
  margin: 25px auto;
  max-width: 940px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.22),
    inset 0 1px 1px rgba(255,255,255,0.28),
    inset 0 -8px 20px rgba(255,255,255,0.05);
}

/* Subtítulos */
.instrument-container h2 {
  color: #5e1616;
  font-size: 2.8rem;
  text-align: center;
  margin: 0 0 15px 0;
}

/* Imagen del instrumento */
.instrument-visual {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  margin-bottom: -25px;
  filter: drop-shadow(0 20px 25px rgba(0,0,0,0.6));
  z-index: 1;
  position: relative;
}

/* Ajuste de tamaño para la kalimba */
.kalimba .instrument-visual {
  max-height: 310px;
}

/* Contenedor de teclas */
.keys {
  display: flex !important;
  justify-content: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  z-index: 3;
  position: relative;
  margin-top: -40px;
  padding-bottom: 15px;
}

/* Diseño de teclas */
.key-container {
  width: 74px;
  height: 74px;
  background: linear-gradient(
    145deg,
    #f3e7d3,
    #dbc2a4,
    #c49a6c,
    #eedfcb
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: bold;
  color: #1f160f;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.55),
    inset 0 12px 16px rgba(255, 255, 255, 0.9),
    inset 0 -8px 12px rgba(0, 0, 0, 0.5);

  transition: all 0.1s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.45);
}

/* Letras */
.key-container p {
  margin: 0;
  z-index: 2;
  color: #4a2415;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.45);

  font-family: 'Trebuchet MS', sans-serif;
  font-weight: 900;
}

/* Brillo superior */
.key-container::before {
  content: '';

  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at 32% 22%,
    rgba(255,255,255,0.65) 18%,
    transparent 68%
  );

  opacity: 0.65;
}

/* Hover */
.key-container:hover {
  transform: translateY(-4px);
}

/* Efecto al pulsar */
.key-container.key-down {
  transform: translateY(6px) scale(0.85) !important;

  background: linear-gradient(
    145deg,
    #b8875c,
    #8b5a3c
  ) !important;

  box-shadow:
    0 4px 12px rgba(90,30,30,0.35) !important;
    inset 0 -8px 12px rgba(0,0,0,0.45) !important;
}

/* Gaviotas */
.gaviota {
  position: fixed;
  width: 18px;
  height: 6px;
  border-top: 2px solid rgba(88, 24, 24, 0.45);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  animation: volar 25s linear infinite;
  z-index: 9999;
  pointer-events: none;
}

.gaviota::after {
  content: '';
  position: absolute;
  right: -16px;
  width: 18px;
  height: 6px;
  border-top: 2px solid rgba(88, 24, 24, 0.45);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* Movimiento */
@keyframes volar {
  from {
    left: -60px;
  }

  to {
    left: 110vw;
  }
}

/* Responsive */
@media (max-width: 768px) {

  .title {
    font-size: 3.4rem;
  }

  .instrument-visual {
    max-height: 210px;
  }

  .kalimba .instrument-visual {
    max-height: 260px;
  }

  .key-container {
    width: 58px;
    height: 58px;
    font-size: 1.55rem;
  }
}