/* ========================================================
   PRESENTE DE ANIVERSÁRIO — TATAH 💛
   Tema: Amarelo e Branco | Mobile First | Sem Emojis
   ======================================================== */

:root {
  --yellow-main: #FFCC00;
  --yellow-deep: #F59E0B;
  --yellow-dark: #D97706;
  --yellow-soft: #FFFDF0;
  --yellow-pastel: #FEF3C7;
  --yellow-card: #FFFBE6;
  --white: #FFFFFF;
  --text-main: #1C1917;
  --text-muted: #78716C;
  --border-light: #FDE68A;
  --shadow-soft: 0 10px 30px rgba(245, 158, 11, 0.16);
  --shadow-card: 0 12px 35px rgba(0, 0, 0, 0.08);
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background-color: var(--yellow-soft);
  color: var(--text-main);
}

/* ----------------------------------------------------
   Corações Flutuantes em SVG
   ---------------------------------------------------- */
.hearts-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.hearts-background.paused {
  opacity: 0;
}

.svg-floating-heart {
  position: absolute;
  bottom: -40px;
  animation: floatHeart linear forwards;
  opacity: 0.7;
}

@keyframes floatHeart {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-115vh) scale(1.1);
    opacity: 0;
  }
}

/* ----------------------------------------------------
   Player de Áudio Topo (Aparece só após abrir a carta)
   ---------------------------------------------------- */
.audio-widget {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 100;
  padding: 0 16px;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-widget.hidden {
  opacity: 0;
  transform: translateY(-30px);
  pointer-events: none;
}

.audio-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 2px solid var(--yellow-main);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.audio-btn:active {
  transform: scale(0.96);
}

.audio-icon {
  fill: var(--yellow-deep);
  flex-shrink: 0;
}

.audio-icon.spinning {
  animation: pulseBeat 1.2s ease-in-out infinite alternate;
}

@keyframes pulseBeat {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(1.25); opacity: 1; }
}

/* ----------------------------------------------------
   Mobile Viewport (100dvh e 1 tela por vez)
   ---------------------------------------------------- */
.mobile-viewport {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100dvh;
  margin: 0 auto;
  z-index: 10;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 65px 22px 26px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
  pointer-events: none;
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.screen-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Botões Padronizados */
.btn-primary {
  width: 100%;
  background: var(--yellow-main);
  color: var(--text-main);
  border: none;
  border-radius: 18px;
  padding: 16px 20px;
  font-family: var(--font-main);
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
  transition: transform 0.18s ease, background 0.18s ease;
  margin-top: 18px;
  flex-shrink: 0;
}

.btn-primary:active {
  transform: scale(0.97);
  background: var(--yellow-deep);
}

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

/* ----------------------------------------------------
   TELA 1: ENVELOPE (SÓ TATAH, CLIQUE NO ENVELOPE)
   ---------------------------------------------------- */
.envelope-header-wrap {
  margin-bottom: 24px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.to-label {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--yellow-deep);
}

.recipient-name {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--text-main);
  margin-top: 2px;
}

.envelope-stage {
  width: 260px;
  height: 175px;
  perspective: 900px;
  margin: 6px 0 18px;
}

.envelope-box {
  position: relative;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  border: 3px solid var(--border-light);
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.6s ease;
  user-select: none;
}

.envelope-box:hover {
  transform: translateY(-3px) scale(1.02);
}

.envelope-pocket {
  position: absolute;
  inset: 0;
  background: #FFFDF7;
  border-radius: 11px;
  clip-path: polygon(0% 0%, 50% 55%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 5;
  border: 1px solid #FEF08A;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: #FFF8D6;
  border: 2px solid var(--yellow-main);
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.wax-seal {
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  background: var(--yellow-deep);
  border: 3px solid #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
  z-index: 15;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.seal-heart {
  width: 24px;
  height: 24px;
  fill: #FFFFFF;
}

.letter-emerging {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  height: 130px;
  background: #FFFFFF;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 3;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.peek-line {
  height: 6px;
  background: #FEF3C7;
  border-radius: 4px;
  width: 100%;
}

.peek-line.short {
  width: 60%;
}

.envelope-instruction {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--yellow-dark);
  margin-top: 4px;
  transition: opacity 0.5s ease;
}

/* Transição de abertura: envelope abre e carta sobe */
.envelope-box.opening .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-box.opening .wax-seal {
  opacity: 0;
  transform: translateX(-50%) scale(0.5);
}

.envelope-box.opening .letter-emerging {
  transform: translateY(-90px);
}

/* Desaparecimento suave do resto das coisas */
.envelope-screen-fadeout .envelope-header-wrap,
.envelope-screen-fadeout .envelope-instruction {
  opacity: 0;
  transform: translateY(-20px);
}

.envelope-screen-fadeout .envelope-box {
  opacity: 0;
  transform: translateY(30px) scale(0.92);
}

/* ----------------------------------------------------
   TELA 2: CARTA COMPLETA ABERTA (SEM CORAÇÕES DISTRAINDO)
   ---------------------------------------------------- */
.letter-layout {
  height: 100%;
  justify-content: space-between;
}

.letter-sheet {
  width: 100%;
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 24px 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 175px);
  overflow-y: auto;
  position: relative;
}

.letter-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--yellow-main), var(--yellow-deep));
  border-radius: 22px 22px 0 0;
}

.letter-header {
  border-bottom: 2px dashed var(--yellow-pastel);
  padding-bottom: 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.letter-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
}

.letter-sender {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.letter-body {
  font-size: 0.96rem;
  line-height: 1.65;
  color: #3F3929;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.letter-body p {
  word-break: break-word;
}

/* ----------------------------------------------------
   TELA 3: AVISO SIMPLES (SEM CLÁUSULA)
   ---------------------------------------------------- */
.warning-card {
  width: 100%;
  background: #FFFFFF;
  border: 3px solid var(--yellow-main);
  border-radius: 24px;
  padding: 30px 22px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.warning-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--yellow-dark);
  margin-bottom: 16px;
}

.warning-body {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #3F3929;
}

.warning-body strong {
  color: #9A3412;
}

/* ----------------------------------------------------
   TELA 4: QUAL IRMÃO É MELHOR?
   ---------------------------------------------------- */
.section-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin-bottom: 4px;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.brothers-zone {
  position: relative;
  width: 100%;
  min-height: 250px;
  background: #FFFFFF;
  border: 2px dashed var(--border-light);
  border-radius: 24px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  overflow: hidden;
}

.btn-brother {
  width: 85%;
  max-width: 250px;
  padding: 15px 20px;
  border-radius: 16px;
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  user-select: none;
  touch-action: manipulation;
  transition: transform 0.16s ease-out;
}

.btn-flee {
  background: #FFFFFF;
  color: var(--text-muted);
  border: 2px solid #E7E5E4;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  position: relative;
  z-index: 10;
}

.btn-arthur {
  background: var(--yellow-main);
  color: var(--text-main);
  border: 2px solid var(--yellow-deep);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  position: relative;
  z-index: 20;
}

.btn-arthur:active {
  transform: scale(0.96);
}

/* ----------------------------------------------------
   TELA 5: RESULTADO DO ARTHUR (DIRETO E OBJETIVO)
   ---------------------------------------------------- */
.winner-trophy-wrap {
  width: 76px;
  height: 76px;
  background: var(--yellow-main);
  border: 4px solid var(--yellow-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

.winner-trophy-svg {
  width: 42px;
  height: 42px;
  fill: #FFFFFF;
}

.winner-heading {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 26px;
  line-height: 1.2;
}

.btn-photos {
  font-size: 1.1rem;
}

/* ----------------------------------------------------
   TELA 6: ABA FOTOS (ÁLBUM AO SOM DE FORFUN)
   ---------------------------------------------------- */
.photos-layout {
  height: 100%;
  justify-content: space-between;
}

.photos-top {
  margin-bottom: 10px;
}

.photos-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--yellow-deep);
}

.photos-title {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-main);
  margin-top: 2px;
}

.photos-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.album-carousel {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.carousel-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--yellow-main);
  background: var(--white);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.16s ease;
}

.carousel-arrow:active {
  transform: scale(0.92);
}

.polaroid-card {
  width: 260px;
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 16px;
  padding: 12px 12px 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}

.photo-viewport {
  width: 100%;
  height: 250px;
  background: #FFFDF0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  gap: 10px;
  height: 100%;
  background: #FFFBE6;
}

.photo-placeholder.active {
  display: flex;
}

.placeholder-caption {
  font-size: 0.82rem;
  color: #78350F;
  line-height: 1.4;
}

.polaroid-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.polaroid-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.polaroid-counter {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--yellow-deep);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 14px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: var(--yellow-main);
  transform: scale(1.3);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-main);
  border: 2px solid var(--yellow-main);
  border-radius: 16px;
  padding: 12px 24px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease;
}

.btn-secondary:active {
  transform: scale(0.96);
}

/* ----------------------------------------------------
   TELA 7: PERGUNTA SE CHOROU
   ---------------------------------------------------- */
.crying-choice-zone {
  display: flex;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin: 24px 0 20px;
}

.btn-crying-choice {
  flex: 1;
  max-width: 130px;
  padding: 16px 20px;
  background: #FFFFFF;
  border: 2px solid var(--yellow-main);
  border-radius: 18px;
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn-crying-choice:active,
.btn-crying-choice.active {
  background: var(--yellow-main);
  border-color: var(--yellow-deep);
  transform: scale(0.97);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

.crying-response-box {
  display: none;
  width: 100%;
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.crying-response-box.active {
  display: block;
}

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

.crying-response-text {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.55;
  color: #78350F;
}

