:root {
  --bg: #09030a;
  --bg-2: #140818;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #d8bfdc;
  --pink: #ff4f9a;
  --pink-2: #ff2f6d;
  --red: #ff174f;
  --gold: #ffd166;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 30px 80px rgba(255, 47, 109, 0.22);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 79, 154, 0.22), transparent 35%),
    radial-gradient(circle at bottom right, rgba(255, 23, 79, 0.18), transparent 35%),
    linear-gradient(135deg, var(--bg), var(--bg-2));
}

button,
input,
textarea {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

/* LOADING */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--bg);
}

.loader-heart {
  font-size: 64px;
  animation: pulse 1s infinite;
}

.loading-screen p {
  margin-top: -180px;
  color: var(--muted);
}

/* INTRO */

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 79, 154, 0.24), transparent 34%),
    linear-gradient(135deg, #080208, #170517 70%, #080208);
}

.floating-bg::before,
.floating-bg::after {
  content: "❤ ❤ ❤ ❤ ❤ ❤ ❤ ❤";
  position: absolute;
  left: -10%;
  width: 120%;
  color: rgba(255, 255, 255, 0.08);
  font-size: 42px;
  letter-spacing: 28px;
  animation: floatHearts 12s linear infinite;
}

.floating-bg::before {
  top: 20%;
}

.floating-bg::after {
  bottom: 15%;
  animation-duration: 16s;
  animation-direction: reverse;
}

.intro-content {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  text-align: center;
}

.opening-text {
  margin: 0 0 28px;
  font-size: clamp(24px, 5vw, 42px);
  font-weight: 900;
  line-height: 1.1;
}

.heart-game {
  width: 100%;
  display: grid;
  place-items: center;
}

.heart-instruction {
  width: min(420px, 100%);
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.heart-puzzle {
  position: relative;
  width: min(440px, 92vw);
  height: 280px;
  margin: 0 auto;
  touch-action: none;
  user-select: none;
}

.heart-target-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250px;
  height: 250px;
  border-radius: 999px;
  background: rgba(255, 79, 154, 0.18);
  filter: blur(34px);
  transform: translate(-50%, -50%);
  animation: softGlow 2.2s ease-in-out infinite;
}

.heart-svg {
  position: absolute;
  top: 38px;
  width: 220px;
  height: 200px;
  filter:
    drop-shadow(0 18px 28px rgba(255, 47, 109, 0.32))
    drop-shadow(0 0 22px rgba(255, 79, 154, 0.22));
}

.heart-fixed {
  left: calc(50% - 110px);
  opacity: 0.96;
}

.heart-draggable {
  left: calc(50% + 92px);
  cursor: grab;
  transition:
    filter 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.heart-draggable:active {
  cursor: grabbing;
  filter:
    drop-shadow(0 24px 36px rgba(255, 47, 109, 0.46))
    drop-shadow(0 0 28px rgba(255, 79, 154, 0.38));
}

.heart-puzzle.dragging .heart-draggable {
  transition: none;
  transform: scale(1.04);
}

.heart-puzzle.near .heart-target-glow {
  background: rgba(255, 209, 102, 0.28);
  filter: blur(30px);
}

.heart-success {
  position: absolute;
  left: 50%;
  top: 38px;
  width: 220px;
  height: 200px;
  transform: translateX(-50%);
  animation: heartComplete 0.9s ease forwards;
  filter:
    drop-shadow(0 22px 44px rgba(255, 47, 109, 0.48))
    drop-shadow(0 0 36px rgba(255, 255, 255, 0.22));
}

.heart-success svg {
  width: 100%;
  height: 100%;
}

.heart-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.heart-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 18px;
  opacity: 0;
  animation: particleBurst 1.2s ease forwards;
}

.heart-progress {
  width: min(360px, 86vw);
  height: 8px;
  margin: 14px auto 18px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.heart-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  transition: width 0.18s ease;
}

.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  color: white;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--red));
  box-shadow: 0 18px 40px rgba(255, 47, 109, 0.3);
  transition: 0.25s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px rgba(255, 47, 109, 0.38);
}

.fallback-btn {
  margin-top: 2px;
  padding-inline: 22px;
  font-size: 14px;
  opacity: 0.92;
}

.intro-tip {
  display: block;
  margin-top: 16px;
  color: var(--muted);
}

/* MAIN */

.main-content {
  width: 100%;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 60px 18px 40px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: rgba(255, 79, 154, 0.22);
  filter: blur(80px);
}

.spotify-card {
  position: relative;
  z-index: 2;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 34px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.photo-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-info {
  min-width: 0;
}

.spotify-label,
.section-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
}

.song-info h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
}

.song-info h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 4vw, 36px);
}

.song-info p {
  color: var(--muted);
}

.player-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.play-btn {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--red));
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 16px 36px rgba(255, 47, 109, 0.28);
}

.fake-progress {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.fake-progress span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  animation: progressMove 8s linear infinite;
}

.youtube-hidden {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* SEÇÕES */

.title-section,
.counter-section,
.timeline-section,
.gallery-section,
.video-section,
.messages-section,
.final-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.title-section {
  text-align: center;
}

.title-section h2,
.timeline-section h2,
.gallery-section h2,
.video-section h2,
.messages-section h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
}

.title-section p {
  width: min(680px, 100%);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

/* COUNTER */

.counter-section {
  text-align: center;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.counter-card {
  padding: 22px 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  backdrop-filter: blur(16px);
}

.counter-card strong {
  display: block;
  font-size: clamp(26px, 5vw, 44px);
}

.counter-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* TIMELINE */

.timeline-list {
  position: relative;
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}

.timeline-date {
  color: var(--gold);
  font-weight: 800;
}

.timeline-item h3 {
  margin: 0 0 8px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* GALLERY */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.gallery-caption strong {
  display: block;
}

.gallery-caption span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

/* VIDEO */

.video-list {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.video-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}

.video-card video {
  width: 100%;
  max-height: 620px;
  border-radius: 18px;
  background: #000;
}

.video-card h3 {
  margin: 14px 0 6px;
}

.video-card p {
  margin: 0;
  color: var(--muted);
}

/* MESSAGES */

.messages-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.message-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 79, 154, 0.18), transparent 35%),
    var(--card);
}

.message-card h3 {
  margin: 0 0 12px;
}

.message-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* FINAL */

.final-section {
  padding-bottom: 90px;
}

.final-card {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 24px;
  border-radius: 34px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at center, rgba(255, 79, 154, 0.2), transparent 38%),
    var(--card);
  box-shadow: var(--shadow);
}

.final-card p {
  margin: 0;
  font-size: 62px;
}

.final-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(34px, 6vw, 64px);
}

.final-card h3 {
  width: min(720px, 100%);
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(20px, 4vw, 30px);
  line-height: 1.4;
}

/* MODAL */

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.88);
}

.image-modal img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 20px;
}

.modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  font-size: 32px;
  cursor: pointer;
}

/* ANIMAÇÕES */

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }
}

@keyframes floatHearts {
  from {
    transform: translateX(-10%);
  }

  to {
    transform: translateX(10%);
  }
}

@keyframes softGlow {
  0%, 100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes heartComplete {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.82);
    filter: blur(10px);
  }

  55% {
    opacity: 1;
    transform: translateX(-50%) scale(1.16);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    filter: blur(0);
  }
}

@keyframes particleBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--x)),
        calc(-50% + var(--y))
      )
      scale(1.4)
      rotate(var(--r));
  }
}

@keyframes progressMove {
  0% {
    width: 5%;
  }

  50% {
    width: 80%;
  }

  100% {
    width: 5%;
  }
}

/* MOBILE */

@media (max-width: 860px) {
  .spotify-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 18px;
  }

  .photo-frame {
    max-width: 420px;
    margin: 0 auto;
  }

  .counter-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid,
  .messages-list {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .intro-screen {
    padding: 18px;
  }

  .opening-text {
    margin-bottom: 18px;
    font-size: 27px;
  }

  .heart-puzzle {
    height: 250px;
  }

  .heart-svg,
  .heart-success {
    top: 36px;
    width: 190px;
    height: 174px;
  }

  .heart-fixed {
    left: calc(50% - 95px);
  }

  .heart-draggable {
    left: calc(50% + 78px);
  }

  .hero-section {
    min-height: auto;
    padding-top: 36px;
  }

  .spotify-card {
    border-radius: 22px;
  }

  .song-info h1 {
    font-size: 38px;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .title-section,
  .counter-section,
  .timeline-section,
  .gallery-section,
  .video-section,
  .messages-section,
  .final-section {
    width: min(100% - 24px, 1120px);
    padding: 48px 0;
  }

  .primary-btn {
    width: 100%;
  }
}