/* ===== BASE ===== */
body {
  margin: 0;
  font-family: "Elsie", serif;
  background: radial-gradient(circle at top, #1a0000, #000);
  color: white;
  animation: fundoRespirando 8s ease-in-out infinite;
}

@keyframes fundoRespirando {
  0%,100% {
    background: radial-gradient(circle at top, #1a0000, #000);
  }
  50% {
    background: radial-gradient(circle at top, #2a0000, #000);
  }
}

body.inicio .card {
  opacity: 0 !important;
  transform: translateY(20px) !important;
}

/* ===== TOPO (estilo Pinterest) ===== */
.topo {
  text-align: center;
  padding: 10px 10px;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  z-index: 1000;
  overflow: hidden;
  margin-top: 5px;
}

/* container dos corações */
.luz-nome {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* corações */
.coracao {
  position: absolute;
  font-size: 12px;
  color: rgba(253, 49, 49, 0.6);
  opacity: 0;

  text-shadow:
    0 0 3px rgba(255, 80, 80, 0.5),
    0 0 6px rgba(255, 0, 0, 0.4);

  animation: levarNome linear forwards;
}

@keyframes levarNome {
  0% {
    transform: translateX(-60px);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  50% {
    transform: translateX(50vw) scale(1.3);
  }

  100% {
    transform: translateX(110vw);
    opacity: 0;
  }
}

/* letras começam invisíveis */
.letra {
  opacity: 0;
}

/* letras aparecem sendo “trazidas” */
.letra.ativa {
  opacity: 1;
  transition: 0.3s;
}

/* brilho final suave */
.nome.final .letra {
  animation: brilhoFinal 2.5s ease-in-out infinite;
}

@keyframes brilhoFinal {
  0%, 100% {
    text-shadow:
      0 0 5px rgba(255,0,0,0.4),
      0 0 10px rgba(255,0,0,0.3);
  }
  50% {
    text-shadow:
      0 0 10px rgba(255,0,0,0.8),
      0 0 20px rgba(255,0,0,0.6);
  }
}

.grid {
  margin-top: 10px;
}

.nome {
  font-family: "Sacramento", cursive;
  font-size: 2.1rem;
  color: #fff;
  text-align: center;
  margin-bottom: 0;
  display: inline-block;
  position: relative;
  transform: none !important;

  /* brilho base */
  text-shadow:
    0 0 5px rgba(255, 0, 0, 0.6),
    0 0 10px rgba(255, 0, 0, 0.6),
    0 0 20px rgba(255, 0, 0, 0.5);

}

/* animação de pulsar brilho */
@keyframes brilhoNeon {
  0%, 100% {
    text-shadow:
      0 0 8px rgba(255, 0, 0, 0.9),
      0 0 16px rgba(255, 0, 0, 0.8),
      0 0 28px rgba(255, 0, 0, 0.7),
      0 0 40px rgba(255, 0, 0, 0.6);
  }
  50% {
    text-shadow:
      0 0 14px rgba(255, 0, 0, 1),
      0 0 28px rgba(255, 0, 0, 1),
      0 0 45px rgba(255, 0, 0, 0.9),
      0 0 65px rgba(255, 0, 0, 0.8);
  }
}

/* letras */
.letra {
  opacity: 0;
  display: inline-block;
  animation: brilhoNeon 2.5s ease-in-out infinite;
}

/* entrada suave */
@keyframes aparecer {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* flutuação */
.flutuar {
  animation: flutuar 3s ease-in-out infinite;
}

@keyframes flutuar {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== SUBTEXTO ===== */
.frase {
  font-size: 11px;
  font-family: 'Poiret One', sans-serif;
  font-weight: 600;
  opacity: 0;
  color: #d8d8d8e0;
  margin-top: 10px;
  margin-bottom: 5px;
  text-align: center;
  transform: translateY(10px);
  animation: subirSub 1s ease forwards;
  animation-delay: 0.5s;
  border-radius: 10px;
}

@keyframes subirSub {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== GRID ===== */
.grid {
  column-count: 2;
  column-gap: 8px;
  padding: 8px;
  opacity: 0;
}

/* quando liberar */
.frase.show {
  animation: subirSub 1s ease forwards;
}

.grid.show {
  opacity: 1;
  transition: 0.6s ease;
}

/* ===== CARDS ===== */
.card {
  break-inside: avoid;
  margin-bottom: 8px;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.5s;
  z-index: 2;
}


.card:hover {
  transform: scale(1.03) rotate(-0.5deg);
}

.card:active {
  transform: scale(0.96);
  transition: 0.1s;
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== IMAGENS ===== */
.card img {
  width: 100%;
  display: block;
  transition: 0.4s;
}

.card:hover img {
  transform: scale(1.04);
}

/* ===== TEXTO ===== */
.card.texto {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;

  background: rgba(255, 0, 0, 0.08);

  font-family: "Elsie", serif;
  font-size: 22px;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .card.texto {
    min-height: unset; /* remove aquele tamanho fixo */
    max-height: 250px; /* limita altura */
    font-size: 18px; /* diminui um pouco o texto */
    padding: 16px;
    line-height: 1.3;

    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===== CORAÇÃO OVERLAY (detalhe Pinterest) ===== */
.heart {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== ANIMAÇÃO ===== */
@keyframes subir {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== LIGHTBOX ===== */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#lightbox img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 15px;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

.topo,
.grid,
.frase {
  position: relative;
  z-index: 2;
}