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

:root {
  --rosa-1: #ffd9e6;
  --rosa-2: #ffc2d6;
  --rosa-3: #ff8fb1;
  --rosa-4: #ff5c8a;
  --vino: #7a294a;
  --texto: #3d2a33;
  --blanco: rgba(255, 255, 255, 0.92);
  --sombra: 0 15px 40px rgba(122, 41, 74, 0.18);
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #fff0f5, #ffe3ec, #f7d7ff, #e9dcff, #ffd7e8);
  background-size: 320% 320%;
  animation: fondoRespira 22s ease-in-out infinite;
  color: var(--texto);
  min-height: 100vh;
}
@keyframes fondoRespira {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 100%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 0%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* UTILIDADES */
.oculto {
  display: none !important;
}

/* LOGIN */
.pantalla-acceso {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
  background: radial-gradient(circle at top, #fff4f8 0%, #ffe2ed 45%, #ffd0e1 100%);
}

.fondo-corazones::before,
.fondo-corazones::after {
  content: "💗 💖 💕 💘 💓 💞";
  position: absolute;
  font-size: 2rem;
  opacity: 0.18;
  width: 100%;
  text-align: center;
  letter-spacing: 18px;
  animation: flotar 10s linear infinite;
}

.fondo-corazones::before {
  top: 18%;
}

.fondo-corazones::after {
  top: 65%;
  animation-duration: 14s;
}

@keyframes flotar {
  0% {
    transform: translateY(20px);
    opacity: 0.08;
  }
  50% {
    transform: translateY(-10px);
    opacity: 0.2;
  }
  100% {
    transform: translateY(20px);
    opacity: 0.08;
  }
}

.login-box {
  width: 100%;
  max-width: 460px;
  background: var(--blanco);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  padding: 38px 28px;
  box-shadow: var(--sombra);
  text-align: center;
  position: relative;
  z-index: 2;
}

.login-corazon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.login-box h1 {
  font-family: "Marck Script", cursive;
  font-size: 3rem;
  color: var(--vino);
  margin-bottom: 10px;
}

.login-box p {
  font-size: 1rem;
  color: #6a4a58;
  margin-bottom: 18px;
  line-height: 1.6;
}

#password-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border-radius: 16px;
  border: 2px solid #ffc4d7;
  outline: none;
  margin-bottom: 14px;
  text-align: center;
  transition: 0.25s ease;
  background: #fffafd;
}

#password-input:focus {
  border-color: var(--rosa-4);
  box-shadow: 0 0 0 5px rgba(255, 92, 138, 0.12);
}

#btn-entrar {
  width: 100%;
  border: none;
  padding: 14px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: white;
  background: linear-gradient(135deg, var(--rosa-4), #ff7aa2);
  box-shadow: 0 10px 24px rgba(255, 92, 138, 0.28);
  transition: 0.25s ease;
}

#btn-entrar:hover {
  transform: translateY(-2px);
}

.mensaje-error {
  min-height: 22px;
  margin-top: 12px;
  color: #c62855;
  font-size: 0.92rem;
  font-weight: 500;
}

/* CONTENIDO */
.contenido-principal {
  min-height: 100vh;
  padding: 50px 20px 70px;
}

.hero {
  max-width: 900px;
  margin: 0 auto 36px;
  text-align: center;
}

.titulo {
  font-family: "Marck Script", cursive;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  color: var(--vino);
  margin-bottom: 8px;
}

.subtitulo {
  color: #6f5460;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

.galeria-cartas {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.carta-card {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--sombra);
  cursor: pointer;
  transition: 0.28s ease;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.carta-card:hover {
  transform: translateY(-6px) scale(1.015);
}

.carta-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.carta-card-contenido {
  padding: 18px 18px 20px;
  text-align: left;
}

.carta-card-fecha {
  display: inline-block;
  font-size: 0.82rem;
  color: #9a6577;
  margin-bottom: 8px;
}

.carta-card h3 {
  color: var(--vino);
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.carta-card p {
  color: #6d5660;
  font-size: 0.94rem;
  line-height: 1.6;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(74, 27, 45, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 20;
}

.modal.activo {
  display: flex;
}

.modal-contenido {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fffafc;
  border-radius: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: aparecer 0.25s ease;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cerrar {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.7rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--vino);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.modal-foto {
  width: 100%;
  max-height: 500px;
  height: auto;
  object-fit: contain;
  display: block;
  background: #fdf4f8;
  padding: 10px;
}

.modal-info {
  padding: 26px 24px 30px;
}

.modal-fecha {
  display: inline-block;
  margin-bottom: 8px;
  color: #9a6577;
  font-size: 0.92rem;
}

.modal-info h2 {
  font-family: "Marck Script", cursive;
  font-size: 2.2rem;
  color: var(--vino);
  margin-bottom: 14px;
}

.modal-info p {
  white-space: pre-line;
  line-height: 1.9;
  font-size: 1rem;
  color: #4f3942;
}

@media (max-width: 640px) {
  .login-box h1 {
    font-size: 2.4rem;
  }

  .modal-foto {
    height: 240px;
  }

  .modal-info h2 {
    font-size: 1.8rem;
  }
}

/* MÚSICA */
.music-player {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
}

.music-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 250, 252, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: 0 16px 35px rgba(122, 41, 74, 0.18);
  backdrop-filter: blur(10px);
}
.song-name{
  margin-top: 10px;
  text-align: center;
  font-size: 0.88rem;
  color: #7a4b5f;
  font-weight: 500;
  max-width: 220px;
  line-height: 1.4;
}
.player-btn{
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6fa1, #ff4f87);
  box-shadow: 0 6px 14px rgba(255, 79, 135, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.player-btn:hover{
  transform: scale(1.06);
  background: #e63b73;
}

.player-btn:active{
  transform: scale(0.98);
}

.player-btn.play{
  width: 52px;
  height: 52px;
}

.icon{
  width: 20px;
  height: 20px;
  fill: white;
}

.player-btn.play .icon{
  width: 22px;
  height: 22px;
}

#volumeControl {
  appearance: none;
  -webkit-appearance: none;

  width: 110px;
  height: 6px;

  border-radius: 10px;

  background: linear-gradient(90deg, #ff6fa1, #ffd1de); /* rosado suave */
  outline: none;
}

/* bolita que se mueve */
#volumeControl::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;

  width: 16px;
  height: 16px;

  border-radius: 50%;

  background: #ff4f87; /* rosa fuerte */
  cursor: pointer;

  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* para Firefox */
#volumeControl::-moz-range-thumb {
  width: 16px;
  height: 16px;

  border-radius: 50%;

  background: #ff4f87;
  border: none;
  cursor: pointer;
}

@media (max-width: 640px) {
  .music-player {
    right: 14px;
    bottom: 14px;
  }

  .music-panel {
    gap: 10px;
    padding: 10px 12px;
  }

.player-btn {
  width: 40px;
  height: 40px;
}

.player-btn.play {
  width: 46px;
  height: 46px;
}

.icon{
  width: 18px;
  height: 18px;
}

.player-btn.play .icon{
  width: 20px;
  height: 20px;
}

  #volumeControl {
    width: 84px;
  }
}
.pantalla-bienvenida {
  position: fixed;
  inset: 0;
  background: rgba(255, 240, 245, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.pantalla-bienvenida.oculto {
  display: none !important;
}

.pantalla-bienvenida.desvanecer {
  opacity: 0;
}

.bienvenida-contenido {
  text-align: center;
  padding: 30px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 30px rgba(255, 111, 161, 0.18);
  animation: aparecerSuave 0.8s ease;
}

.bienvenida-contenido h2 {
  font-family: "Marck Script", cursive;
  font-size: 3rem;
  color: #c63d72;
  margin-bottom: 10px;
}

.bienvenida-contenido p {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  color: #7a4b5f;
}

@keyframes aparecerSuave {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.carta-galeria {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 24px 0;
}

.galeria-mini {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 6px 14px rgba(122, 41, 74, 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.92;
}

.galeria-mini:hover {
  transform: scale(1.06);
  opacity: 1;
}

.galeria-mini.activa {
  border-color: #ff5c8a;
  opacity: 1;
}

@media (max-width: 640px) {
  .carta-galeria {
    padding: 14px 18px 0;
    gap: 8px;
  }

  .galeria-mini {
    width: 64px;
    height: 64px;
    border-radius: 12px;
  }
}
/* VISOR DE IMÁGENES */
.visor-imagen{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.85);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:200;
  padding:30px;
}

.visor-imagen img{
  max-width:95%;
  max-height:95%;
  object-fit:contain;
  border-radius:12px;
}

.visor-imagen.activo{
  display:flex;
}

.cerrar-visor{
  position:absolute;
  top:20px;
  right:25px;
  font-size:2.5rem;
  color:white;
  cursor:pointer;
}
/* BOTÓN MENSAJITO */
.mensaje-btn{
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  transition: transform 0.25s ease;
}

.mensaje-btn:hover{
  transform: scale(1.06);
}

/* SOBRE ANIMADO */
.sobre-icono{
  position: relative;
  width: 58px;
  height: 42px;
  animation: flotarSobre 2.8s ease-in-out infinite;
}

/* cuerpo del sobre */
.sobre-cuerpo{
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #c8b6ff, #b497ff);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(122, 41, 74, 0.18);
  overflow: hidden;
}

/* líneas internas del sobre */
.sobre-cuerpo::before,
.sobre-cuerpo::after{
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.22);
  transform: rotate(45deg);
  top: 20px;
}

.sobre-cuerpo::before{
  left: -12px;
}

.sobre-cuerpo::after{
  right: -12px;
}

/* tapa */
.sobre-tapa{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(135deg, #d8c8ff, #bea5ff);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  z-index: 3;
  transition: transform 0.35s ease;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.2);
}

/* cartita de adentro */
.sobre-carta{
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  width: 38px;
  height: 26px;
  background: linear-gradient(180deg, #ffffff, #f7f1ff);
  border-radius: 6px;
  z-index: 2;
  transition: transform 0.35s ease, opacity 0.35s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.sobre-carta::before{
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 24px;
  height: 2px;
  background: #d7c8ff;
  border-radius: 999px;
  box-shadow: 0 6px 0 #e7dcff;
}

/* al pasar el mouse */
.mensaje-btn:hover .sobre-tapa{
  transform: rotateX(180deg);
}

.mensaje-btn:hover .sobre-carta{
  transform: translateX(-50%) translateY(-10px);
}

/* cuando se hace click */
.mensaje-btn.abierto .sobre-tapa{
  transform: rotateX(180deg);
}

.mensaje-btn.abierto .sobre-carta{
  transform: translateX(-50%) translateY(-10px);
}

/* popup */
.mensaje-popup{
  position: fixed;
  left: 24px;
  bottom: 108px;
  max-width: 280px;
  background: rgba(255,255,255,0.96);
  color: #5c4452;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(122, 41, 74, 0.18);
  border: 1px solid rgba(255,255,255,0.85);
  z-index: 79;
  animation: aparecerMensaje 0.25s ease;
}

.mensaje-popup p{
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* piquito del mensaje */
.mensaje-popup::after{
  content: "";
  position: absolute;
  left: 22px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  background: rgba(255,255,255,0.96);
  transform: rotate(45deg);
  border-right: 1px solid rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.85);
}

@keyframes aparecerMensaje{
  from{
    opacity: 0;
    transform: translateY(8px);
  }
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flotarCandado {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

@media (max-width: 640px){
  .mensaje-btn{
    left: 14px;
    bottom: 14px;
    width: 68px;
    height: 68px;
  }

  .mensaje-popup{
    left: 14px;
    bottom: 96px;
    max-width: 240px;
  }
}
.song-name{
  margin-top: 10px;
  text-align: center;
  font-size: 0.88rem;
  color: #7a4b5f;
  font-weight: 500;
  max-width: 220px;
  line-height: 1.4;

  opacity: 1;
  transition: opacity 0.45s ease;
}

.song-name.fade{
  opacity: 0;
}
.carta-bloqueada {
  opacity: 0.72;
  cursor: not-allowed;
  position: relative;
}

.carta-bloqueada {
  opacity: 0.72;
  cursor: not-allowed;
  position: relative;
}

.carta-bloqueada:hover {
  transform: none;
}

.candado-badge{
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  z-index: 3;
  animation: flotarCandado 2.4s ease-in-out infinite;
}

.candado-circulo{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,239,255,0.96));
  box-shadow: 0 10px 22px rgba(122, 41, 74, 0.18);
  backdrop-filter: blur(8px);
}

.candado-cuerpo{
  position: absolute;
  top: 14px;
  left: 12px;
  width: 18px;
  height: 14px;
  border-radius: 5px;
  background: linear-gradient(180deg, #cdb7ff, #b392ff);
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.25);
  z-index: 2;
}

.candado-arco{
  position: absolute;
  top: 6px;
  left: 15px;
  width: 12px;
  height: 12px;
  border: 3px solid #b392ff;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  z-index: 2;
}

.candado-punto{
  position: absolute;
  top: 19px;
  left: 19px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  z-index: 3;
}

.carta-bloqueada:hover {
  transform: none;
}
.popup-bloqueada{
  position: fixed;
  inset: 0;
  background: rgba(74, 27, 45, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}

.popup-bloqueada-box{
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 250, 252, 0.98);
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 24px;
  padding: 30px 24px 24px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(122, 41, 74, 0.2);
  animation: popupSuave 0.25s ease;
}

.popup-icono{
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.popup-bloqueada-box h3{
  color: var(--vino);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.popup-bloqueada-box p{
  color: #6a4a58;
  line-height: 1.7;
  font-size: 0.98rem;
}

.popup-cerrar{
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  background: rgba(255,255,255,0.95);
  color: var(--vino);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

@keyframes popupSuave{
  from{
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to{
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}