﻿:root {
  --bg-0: #0b0c15;
  --bg-1: #14172a;
  --ink: #f4f6ff;
  --ink-soft: #b9bfd8;
  --pink: #ff6fb3;
  --pink-2: #ff97c8;
  --purple: #7f5dff;
  --glass: rgba(8, 10, 20, 0.72);
  --glass-line: rgba(255, 255, 255, 0.16);
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
  --wallpaper-dark-top: rgba(6, 8, 18, 0.64);
  --wallpaper-dark-bottom: rgba(6, 8, 18, 0.76);
  --wallpaper-pink-tint: rgba(255, 111, 179, 0.16);
  --wallpaper-purple-tint: rgba(127, 93, 255, 0.22);
  --wallpaper-sat: 0.9;
  --wallpaper-brightness: 0.82;
  --wallpaper-contrast: 1.04;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "VT323", monospace;
  color: var(--ink);
  overflow: hidden;
  background: radial-gradient(circle at 0% 0%, #273156 0%, var(--bg-1) 40%, var(--bg-0) 100%);
}

.backdrop,
.backdrop-filter,
.backdrop-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.04);
  filter:
    blur(2.5px)
    saturate(var(--wallpaper-sat))
    brightness(var(--wallpaper-brightness))
    contrast(var(--wallpaper-contrast));
  opacity: 0;
  transition: opacity 720ms ease;
}

.backdrop.active {
  opacity: 1;
}

.backdrop-filter {
  background:
    linear-gradient(var(--wallpaper-dark-top), var(--wallpaper-dark-bottom)),
    radial-gradient(circle at 50% 10%, var(--wallpaper-pink-tint), transparent 42%),
    radial-gradient(circle at 50% 120%, var(--wallpaper-purple-tint), transparent 62%);
}

.backdrop-glow {
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 111, 179, 0.2), transparent 48%),
    radial-gradient(circle at 40% 100%, rgba(127, 93, 255, 0.25), transparent 58%);
}

.app {
  position: relative;
  z-index: 1;
  width: min(680px, 92vw);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: calc(12px + env(safe-area-inset-top)) 0 calc(12px + env(safe-area-inset-bottom));
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.topbar {
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.9), 0 0 16px rgba(127, 93, 255, 0.55);
}

.progress {
  display: flex;
  gap: 7px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  transition: transform 220ms ease, background 220ms ease;
}

.dot.active {
  transform: scale(1.35);
  background: linear-gradient(125deg, var(--purple), var(--pink));
  box-shadow: 0 0 10px rgba(255, 111, 179, 0.88);
}

.stage-stack {
  position: relative;
  min-height: min(78dvh, 680px);
}

.stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px) scale(0.986);
  pointer-events: none;
  transition: opacity 420ms ease, transform 420ms cubic-bezier(0.22, 0.8, 0.2, 1);
}

.stage.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.stage.exit-left {
  opacity: 0;
  transform: translateX(-24px) scale(0.986);
}

.stage.exit-right {
  opacity: 0;
  transform: translateX(24px) scale(0.986);
}

.cover-photo {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background:
    linear-gradient(rgba(8, 12, 26, 0.5), rgba(8, 12, 26, 0.7)),
    url("assets/fotos/Foto 1.jpeg") center / cover no-repeat;
}

.cover-overlay {
  position: relative;
  z-index: 1;
  min-height: min(78dvh, 680px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(9, 11, 20, 0.25), rgba(9, 11, 20, 0.75));
}

.signature {
  margin: 0;
  font-family: "Parisienne", cursive;
  font-size: clamp(2.7rem, 11vw, 4.1rem);
  color: var(--pink-2);
  line-height: 1;
  text-shadow: 0 0 22px rgba(255, 111, 179, 0.55);
}

.signature.large {
  font-size: clamp(2.4rem, 10vw, 3.8rem);
}

.subtitle {
  margin: 0;
  font-size: clamp(1.35rem, 5.8vw, 1.9rem);
  color: #fff;
  font-style: italic;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 14px rgba(255, 111, 179, 0.55);
}

.meta {
  margin: 0;
  display: block;
  color: #fff;
  font-size: clamp(1rem, 4vw, 1.2rem);
  line-height: 1.25;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.8), 0 0 14px rgba(127, 93, 255, 0.5);
}

.meta-date {
  white-space: nowrap;
}

.meta-note {
  max-width: 24ch;
}

.heart-row {
  color: var(--pink-2);
  letter-spacing: 0.45em;
  font-size: clamp(1.1rem, 4.2vw, 1.35rem);
  text-shadow: 0 0 12px rgba(255, 111, 179, 0.7);
}

.panel {
  border-radius: 28px;
  padding: 18px;
  min-height: min(78dvh, 680px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stage > .panel {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(140deg, rgba(127, 93, 255, 0.45), rgba(255, 111, 179, 0.45));
  border: 1px solid rgba(255, 255, 255, 0.22);
}

h2 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.85rem, 3.4vw, 1.1rem);
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.88), 0 0 15px rgba(127, 93, 255, 0.6);
}

.chip {
  margin-left: auto;
  font-family: "Press Start 2P", monospace;
  font-size: 0.5rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 4px 10px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.75), 0 0 12px rgba(255, 111, 179, 0.45);
}

.panel-content p,
.panel > p {
  margin: 0;
  font-size: clamp(1.12rem, 4.4vw, 1.35rem);
  color: #fff;
  line-height: 1.65;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.75), 0 0 12px rgba(127, 93, 255, 0.45);
}

.poem-text {
  white-space: pre-line;
}

.two-col {
  display: grid;
  gap: 12px;
}

.side-photo {
  width: 100%;
  height: min(42dvh, 360px);
  max-height: 360px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  border: 0;
  background: rgba(8, 10, 20, 0.72);
}

.framed-spotlight {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(8, 10, 20, 0.72);
  box-shadow: none;
}

.spotlight-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  object-position: center;
  filter: none;
  background: rgba(8, 10, 20, 0.72);
  z-index: 1;
}

.spotlight-note {
  margin: 2px 2px 0;
  min-height: 68px;
  color: #fff;
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.75), 0 0 12px rgba(127, 93, 255, 0.45);
  white-space: pre-line;
}

.final-message {
  white-space: pre-line;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.polaroid {
  margin: 0;
  background: transparent;
  border-radius: 12px;
  padding: 0;
  box-shadow: none;
  overflow: hidden;
}

.polaroid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(8, 10, 20, 0.72);
}

.polaroid figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.84rem;
  color: #2f3554;
}

.tilt-left {
  transform: none;
}

.tilt-right {
  transform: none;
}

.moment-video-wrap {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(8, 10, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.moment-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05070f;
}

.moment-video::-webkit-media-controls {
  display: none !important;
}

.moment-video::-webkit-media-controls-enclosure {
  display: none !important;
}

.moment-description {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.72), 0 0 12px rgba(127, 93, 255, 0.42);
  white-space: pre-line;
}

.moment-description.love-note {
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.memories {
  position: relative;
  min-height: 210px;
}

.memory-card {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  opacity: 0;
  transform: translateX(18px) scale(0.985);
  transition: opacity 320ms ease, transform 320ms ease;
}

.memory-card.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.memory-date {
  margin: 0;
  color: var(--pink-2);
  font-family: "Press Start 2P", monospace;
  font-size: 0.48rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.75), 0 0 14px rgba(255, 111, 179, 0.55);
}

.memory-card h3 {
  margin: 8px 0 8px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.85), 0 0 14px rgba(127, 93, 255, 0.52);
}

.memory-card p {
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.55;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.72), 0 0 12px rgba(127, 93, 255, 0.42);
}

.memory-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.memory-dots {
  display: flex;
  gap: 6px;
}

.memory-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
}

.memory-dot.active {
  background: var(--pink);
  box-shadow: 0 0 10px rgba(255, 111, 179, 0.75);
}

.spotify-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spotify-config label {
  font-family: "Press Start 2P", monospace;
  color: #fff;
  font-size: 0.5rem;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.72), 0 0 12px rgba(255, 111, 179, 0.42);
}

.spotify-row {
  display: flex;
  gap: 8px;
}

.spotify-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 11px 12px;
  font-size: 0.95rem;
  outline: none;
}

.spotify-row input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
}

.spotify-player-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.actions.center {
  justify-content: center;
}

.stage > .actions {
  margin-top: 10px;
  padding: 0 18px;
}

.stage > .actions .btn {
  min-width: 124px;
  padding: 13px 20px;
  font-size: 0.58rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  min-width: 110px;
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: 0.52rem;
  background: linear-gradient(130deg, var(--purple), var(--pink));
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(127, 93, 255, 0.32);
  transition: transform 180ms ease, filter 180ms ease;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.86), 0 0 14px rgba(255, 111, 179, 0.52);
}

.cover-overlay .btn {
  flex: 0 0 auto;
  min-width: 160px;
  padding: 14px 24px;
  font-size: 0.62rem;
}

.btn:hover {
  transform: translateY(-2px);
  filter: saturate(1.06);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.btn.tiny {
  min-width: 90px;
  padding: 9px 12px;
  font-size: 0.46rem;
}

.footer-tip {
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

[data-typewriter].typing::after {
  content: "|";
  margin-left: 2px;
  opacity: 0.95;
  color: #fff;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.88), 0 0 14px rgba(255, 111, 179, 0.56);
  animation: caret-blink 700ms steps(1, end) infinite;
}

@keyframes caret-blink {
  0%,
  49% {
    opacity: 0.9;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 430px) {
  .app {
    min-height: 100svh;
    min-height: 100dvh;
    justify-content: flex-start;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 0 calc(10px + env(safe-area-inset-bottom));
  }

  .topbar {
    padding: 10px 12px;
  }

  .brand {
    font-size: 0.8rem;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .actions .btn {
    min-width: 112px;
    flex: 1;
  }

  .cover-overlay {
    height: 100%;
    min-height: 0;
    padding: 16px;
  }

  .cover-overlay .btn {
    min-width: 150px;
    flex: 0 0 auto;
  }

  .stage-stack {
    flex: 0 0 auto;
    height: min(81dvh, 700px);
    min-height: min(81dvh, 700px);
  }

  .panel {
    min-height: 0;
    padding: 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .stage > .actions {
    margin-top: 8px;
    padding: 0 14px;
  }

  .stage[data-step="4"] .framed-spotlight {
    aspect-ratio: 1 / 1;
  }

  .footer-tip {
    font-size: 0.78rem;
  }
}

@media (min-width: 840px) {
  .app {
    width: min(940px, 92vw);
  }

  .panel {
    padding: 24px;
  }

  .two-col {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }

  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .framed-spotlight {
    aspect-ratio: 9 / 16;
    max-height: 520px;
  }
}

