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

:root {
  --pink:   #ff6eb4;
  --purple: #b06aff;
  --blue:   #6ab3ff;
  --gold:   #ffd766;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #000008;
  font-family: Georgia, serif;
  color: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Canvas ocupa toda a tela — é o "céu" de espaço profundo */
#c {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Container dos overlays — mesma posição que o canvas */
#cards {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

/* ── Cards HTML ──────────────────────────────────────────────── */
/* Posição e opacidade controladas por JS (projeção esférica)    */
.card {
  position: absolute;
  /* JS faz: transform: translate(-50%,-50%) translate(sx,sy) scale(s) */
  will-change: transform, opacity;
  text-align: center;
  pointer-events: none;
  transition: none;
  opacity: 0;           /* invisível até o JS posicionar no 1º frame */
}

/* ── Título ──────────────────────────────────────────────────── */
#card-title {
  width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
#card-title h1 {
  font-size: 1.65rem;
  line-height: 1.3;
  text-shadow:
    0 0 30px rgba(255,110,180,1),
    0 0 70px rgba(176,106,255,0.6);
}
.grad {
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sparkle {
  font-size: 1.3rem;
  color: var(--gold);
  text-shadow: 0 0 16px var(--gold);
  animation: spinS 5s linear infinite;
  display: inline-block;
}
.sparkle:last-of-type { animation-direction: reverse; }
@keyframes spinS {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.sub-date {
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.38);
  margin-top: 4px;
}

/* ── Foto ────────────────────────────────────────────────────── */
.photo-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  width: 290px;
}
.photo-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.ring {
  width: 118px;
  height: 118px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2.5px solid transparent;
  background:
    linear-gradient(#000012, #000012) padding-box,
    linear-gradient(135deg, var(--pink), var(--purple), var(--blue)) border-box;
  box-shadow:
    0 0 28px rgba(255,110,180,0.75),
    0 0 60px rgba(176,106,255,0.3);
  animation: ringFloat 4s ease-in-out infinite alternate;
}
@keyframes ringFloat {
  from { box-shadow: 0 0 28px rgba(255,110,180,.75), 0 0 60px rgba(176,106,255,.3); }
  to   { box-shadow: 0 0 50px rgba(255,110,180,1),   0 0 90px rgba(176,106,255,.5); }
}
.ring img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ring img:not([style*="none"]) + .no-img { display: none; }
.no-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  background: radial-gradient(circle, #1a0035, #000012);
}
.caption {
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  text-shadow: 0 0 14px rgba(255,110,180,0.6);
}

/* ── Quote ───────────────────────────────────────────────────── */
.quote-card {
  width: 210px;
  padding: 20px 18px 16px;
  background: rgba(4, 0, 18, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 18px;
  border: 1px solid rgba(255,110,180,0.22);
  box-shadow:
    0 0 40px rgba(176,106,255,0.18),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.quote-scroll {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: none;                /* Firefox */
  -ms-overflow-style: none;             /* IE/Edge */
  -webkit-overflow-scrolling: touch;    /* iOS momentum scroll */
  touch-action: pan-y;                  /* permite rolar sem girar a cena */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 2px;
}
.quote-scroll::-webkit-scrollbar { display: none; }  /* Chrome/Safari */

.qm {
  font-size: 2.2rem;
  line-height: 0.6;
  color: var(--pink);
  opacity: 0.55;
  display: block;
  margin-bottom: 5px;
}
.qm.end { margin-top: 5px; margin-bottom: 0; }
.quote-card p {
  font-style: italic;
  line-height: 1.7;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}
.qsign {
  margin-top: 10px;
  font-style: normal !important;
  font-size: 0.74rem !important;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}
.hearts {
  margin-top: 10px;
  font-size: 1rem;
  color: var(--pink);
  letter-spacing: 4px;
  animation: hpulse 1.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes hpulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

/* ── Acima ───────────────────────────────────────────────────── */
.above-card {
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.above-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  text-shadow: 0 0 25px rgba(106,179,255,0.9), 0 0 50px rgba(106,179,255,0.4);
}
.big-star {
  font-size: 2rem;
  animation: starP 2.5s ease-in-out infinite alternate;
  display: inline-block;
}
@keyframes starP {
  from { transform: scale(1)   rotate(-5deg); filter: brightness(1); }
  to   { transform: scale(1.4) rotate(5deg);  filter: brightness(1.8); }
}

/* ── Hint ────────────────────────────────────────────────────── */
.hint {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  animation: hintFade 5.5s ease-out 0.5s both;
}
@keyframes hintFade {
  0%, 15% { opacity: 0; }
  30%, 78% { opacity: 0.8; }
  100%     { opacity: 0; }
}
.hint-icon {
  font-size: 2rem;
  animation: hwobble 1.8s ease-in-out infinite;
}
@keyframes hwobble {
  0%, 100% { transform: rotate(-22deg); }
  50%       { transform: rotate(22deg); }
}
.hint span {
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.hint.gone { display: none; }

/* ── Tela inicial ────────────────────────────────────────────── */
.start {
  position: fixed;
  inset: 0;
  background: rgba(0,0,8,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.7s, visibility 0.7s;
}
.start.gone { opacity: 0; visibility: hidden; pointer-events: none; }

.start-box {
  text-align: center;
  padding: 48px 28px;
  border-radius: 26px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,110,180,0.16);
  max-width: 290px;
  width: 90%;
}
.rocket {
  font-size: 3.8rem;
  display: inline-block;
  margin-bottom: 18px;
  animation: rbob 2.2s ease-in-out infinite alternate;
}
@keyframes rbob {
  from { transform: translateY(0)    rotate(-8deg); }
  to   { transform: translateY(-12px) rotate(8deg); }
}
.start-box h2 {
  font-size: 1.55rem;
  line-height: 1.3;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.start-box p {
  color: rgba(255,255,255,0.48);
  line-height: 1.65;
  margin-bottom: 26px;
  font-size: 0.86rem;
}
#startBtn {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border: none;
  color: #fff;
  font-size: 0.98rem;
  font-weight: bold;
  padding: 14px 36px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 26px rgba(255,110,180,0.45);
  transition: transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
#startBtn:active { transform: scale(0.95); }
