/* ==========================================================
       RESET & DASAR
       ========================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-gradient: linear-gradient(145deg, #081226 0%, #0c1e3d 45%, #142e5e 100%);
  --blue-primary: #38bdf8;
  --blue-glow: rgba(56, 189, 248, 0.4);
  --card-bg: rgba(15, 23, 42, 0.65);
  --card-border: rgba(147, 197, 253, 0.25);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ==========================================================
       BINTANG & BALON MELAYANG
       ========================================================== */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  color: #bae6fd;
  animation: twinkle 3s infinite ease-in-out;
  text-shadow: 0 0 8px var(--blue-primary);
}

.star-1 {
  top: 12%;
  left: 8%;
  font-size: 20px;
  animation-delay: 0s;
}
.star-2 {
  top: 25%;
  right: 12%;
  font-size: 26px;
  animation-delay: 1.2s;
}
.star-3 {
  top: 48%;
  left: 15%;
  font-size: 18px;
  animation-delay: 0.5s;
}
.star-4 {
  top: 65%;
  right: 8%;
  font-size: 24px;
  animation-delay: 2.1s;
}
.star-5 {
  top: 80%;
  left: 10%;
  font-size: 22px;
  animation-delay: 1.7s;
}
.star-6 {
  top: 38%;
  right: 25%;
  font-size: 16px;
  animation-delay: 0.9s;
}
.star-7 {
  top: 90%;
  right: 20%;
  font-size: 20px;
  animation-delay: 2.6s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.balloons-container {
  position: fixed;
  bottom: -120px;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.balloon {
  position: absolute;
  width: 55px;
  height: 70px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  animation: floatBalloon 16s infinite ease-in;
  opacity: 0.65;
}

.balloon::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: rgba(255, 255, 255, 0.4);
}

.b1 {
  left: 6%;
  background: radial-gradient(circle at 35% 35%, #7dd3fc, #0284c7);
  animation-duration: 14s;
}
.b2 {
  left: 28%;
  background: radial-gradient(circle at 35% 35%, #bae6fd, #0369a1);
  animation-duration: 18s;
  animation-delay: 3s;
}
.b3 {
  left: 52%;
  background: radial-gradient(circle at 35% 35%, #93c5fd, #1d4ed8);
  animation-duration: 15s;
  animation-delay: 6s;
}
.b4 {
  left: 75%;
  background: radial-gradient(circle at 35% 35%, #38bdf8, #0284c7);
  animation-duration: 20s;
  animation-delay: 1.5s;
}
.b5 {
  left: 90%;
  background: radial-gradient(circle at 35% 35%, #60a5fa, #2563eb);
  animation-duration: 17s;
  animation-delay: 5s;
}

@keyframes floatBalloon {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-60vh) rotate(8deg);
  }
  100% {
    transform: translateY(-130vh) rotate(-8deg);
  }
}

/* ==========================================================
       LAYOUT UTAMA & HERO
       ========================================================== */
.main-wrapper {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.hero {
  text-align: center;
  padding: 40px 0 30px;
}

.badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 24px;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.title {
  font-family: "Dancing Script", cursive;
  font-size: 4rem;
  font-weight: 700;
  color: #f0f9ff;
  text-shadow:
    0 0 25px rgba(56, 189, 248, 0.6),
    0 0 50px rgba(14, 165, 233, 0.4);
  margin-bottom: 12px;
}

.sub-title {
  font-size: 1.35rem;
  font-weight: 500;
  color: #93c5fd;
  margin-bottom: 18px;
}

.hero-desc {
  max-width: 620px;
  margin: 0 auto 30px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ==========================================================
       KUE ULANG TAHUN CSS
       ========================================================== */
.cake-container {
  position: relative;
  width: 180px;
  height: 140px;
  margin: 20px auto 25px;
}

.candle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 35px;
  background: repeating-linear-gradient(45deg, #ffffff, #ffffff 4px, #38bdf8 4px, #38bdf8 8px);
  border-radius: 4px;
  z-index: 5;
}

.flame {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 20px;
  background: radial-gradient(ellipse at bottom, #ffea79 0%, #38bdf8 70%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  animation: flameFlicker 1.2s infinite ease-in-out alternate;
  box-shadow:
    0 0 16px #38bdf8,
    0 0 24px #93c5fd;
}

@keyframes flameFlicker {
  0% {
    transform: translateX(-50%) scale(1) rotate(-2deg);
    opacity: 0.9;
  }
  100% {
    transform: translateX(-50%) scale(1.15) rotate(3deg);
    opacity: 1;
  }
}

.cake-top {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 30px;
  background: #bae6fd;
  border-radius: 10px 10px 4px 4px;
  border-bottom: 4px solid #0284c7;
  z-index: 4;
}

.cake-middle {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 36px;
  background: #7dd3fc;
  border-radius: 10px 10px 4px 4px;
  border-bottom: 5px solid #0369a1;
  z-index: 3;
}

.cake-bottom {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 42px;
  background: #38bdf8;
  border-radius: 12px 12px 6px 6px;
  border-bottom: 6px solid #075985;
  z-index: 2;
}

.plate {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 190px;
  height: 10px;
  background: #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* ==========================================================
       PEMUTAR LAGU
       ========================================================== */
.music-card {
  margin: 35px auto 0;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  padding: 18px 24px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(56, 189, 248, 0.15);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.music-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.5);
}

.music-icon-pulse {
  font-size: 2rem;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

.music-details {
  text-align: center;
}

.music-tag {
  display: inline-block;
  font-size: 0.75rem;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 2px;
}

.music-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8fafc;
}

.music-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.custom-audio {
  width: 100%;
  max-width: 320px;
  height: 38px;
  border-radius: 20px;
  outline: none;
}

/* ==========================================================
       JUDUL SEKSI
       ========================================================== */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: #bae6fd;
  margin-bottom: 8px;
}

.section-subtitle,
.hint-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 35px;
}

/* ==========================================================
       AMPLOP & SURAT SPESIAL (PURE CSS CHECKBOX)
       ========================================================== */
.letter-section {
  margin: 70px 0;
  text-align: center;
}

.envelope-box {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.letter-checkbox {
  display: none;
}

.envelope-label {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  width: 100%;
  max-width: 500px;
}

.envelope {
  position: relative;
  width: 440px;
  max-width: 100%;
  height: 280px;
  background: #0284c7;
  border-radius: 12px;
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 0 20px var(--blue-glow);
  display: flex;
  justify-content: center;
  transition: all 0.5s ease;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 220px solid transparent;
  border-right: 220px solid transparent;
  border-top: 130px solid #0369a1;
  transform-origin: top;
  transition:
    transform 0.6s ease,
    opacity 0.3s;
  z-index: 5;
}

.envelope-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 220px solid #0284c7;
  border-right: 220px solid #0284c7;
  border-bottom: 140px solid #0ea5e9;
  border-radius: 0 0 12px 12px;
  z-index: 4;
  transition: opacity 0.4s ease;
}

.letter-paper {
  position: absolute;
  top: 15px;
  width: 90%;
  background: #ffffff;
  color: #1e293b;
  border-radius: 10px;
  padding: 30px 24px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.4s ease,
    max-height 0.6s ease;
  z-index: 2;
  text-align: left;
  max-height: 200px;
  overflow: hidden;
  opacity: 0.85;
}

.letter-content h4 {
  font-family: "Dancing Script", cursive;
  font-size: 1.8rem;
  color: #0369a1;
  margin-bottom: 14px;
}

.letter-content p {
  font-size: 0.96rem;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 12px;
}

.letter-sign {
  font-family: "Dancing Script", cursive;
  font-size: 1.3rem;
  color: #0284c7;
  text-align: right;
  margin-top: 20px !important;
}

.letter-sign span {
  font-weight: 700;
  font-size: 1.4rem;
}

.click-tag {
  display: inline-block;
  margin-top: 25px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
  transition: all 0.3s ease;
}

.click-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.6);
}

/* Kondisi Saat Surat Dibuka */
.letter-checkbox:checked + .envelope-label .envelope {
  height: auto;
  min-height: 480px;
  background: transparent;
  box-shadow: none;
}

.letter-checkbox:checked + .envelope-label .envelope-flap {
  transform: rotateX(180deg);
  opacity: 0;
  pointer-events: none;
}

.letter-checkbox:checked + .envelope-label .envelope-body {
  opacity: 0;
  pointer-events: none;
}

.letter-checkbox:checked + .envelope-label .letter-paper {
  position: relative;
  top: 0;
  max-height: 1200px;
  opacity: 1;
  z-index: 10;
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(56, 189, 248, 0.35);
  border: 2px solid #bae6fd;
}

/* ==========================================================
       FOTO POLAROID
       ========================================================== */
.memories-section {
  margin: 70px 0;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.polaroid-card {
  position: relative;
  background: #ffffff;
  padding: 14px 14px 24px;
  border-radius: 4px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
  text-align: center;
}

.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 22px;
  background: rgba(186, 230, 253, 0.65);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

.polaroid-img-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 2px;
  background: #e2e8f0;
}

.polaroid-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.polaroid-caption {
  font-family: "Dancing Script", cursive;
  font-size: 1.25rem;
  color: #1e3a8a;
  margin-top: 14px;
  font-weight: 600;
}

.polaroid-card:hover {
  transform: translateY(-10px) rotate(-1.5deg);
  box-shadow:
    0 20px 35px rgba(0, 0, 0, 0.4),
    0 0 20px var(--blue-glow);
}

.polaroid-card:nth-child(2):hover {
  transform: translateY(-10px) rotate(1.5deg);
}

.polaroid-card:hover .polaroid-img-wrapper img {
  transform: scale(1.06);
}

.photo-tip {
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 25px;
}

/* ==========================================================
       KARTU DOA & HARAPAN
       ========================================================== */
.wishes-section {
  margin: 70px 0;
}

.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.wish-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(14px);
  padding: 30px 24px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.wish-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.35),
    0 0 20px var(--blue-glow);
}

.wish-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.wish-card h4 {
  font-size: 1.25rem;
  color: #bae6fd;
  margin-bottom: 12px;
  font-weight: 600;
}

.wish-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================
       QUOTE BANNER & FOOTER
       ========================================================== */
.quote-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  margin: 70px 0;
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.3),
    0 0 25px rgba(56, 189, 248, 0.2);
}

.quote-text {
  font-family: "Dancing Script", cursive;
  font-size: 1.65rem;
  color: #e0f2fe;
  line-height: 1.8;
  margin-bottom: 16px;
}

.quote-author {
  font-size: 0.95rem;
  color: #7dd3fc;
  font-weight: 500;
  letter-spacing: 1px;
}

.footer {
  text-align: center;
  padding: 40px 0 20px;
  border-top: 1px solid rgba(147, 197, 253, 0.15);
  color: #94a3b8;
  font-size: 0.95rem;
}

.copyright {
  margin-top: 8px;
  font-size: 0.88rem;
  color: #64748b;
}

/* ==========================================================
       RESPONSIF (HP / LAYAR KECIL)
       ========================================================== */
@media (max-width: 600px) {
  .title {
    font-size: 2.8rem;
  }
  .sub-title {
    font-size: 1.1rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }

  .envelope {
    width: 320px;
    height: 190px;
  }

  .envelope-flap {
    border-left-width: 160px;
    border-right-width: 160px;
    border-top-width: 95px;
  }

  .envelope-body {
    border-left-width: 160px;
    border-right-width: 160px;
    border-bottom-width: 105px;
  }

  .letter-paper {
    padding: 22px 18px;
  }
  .letter-content h4 {
    font-size: 1.5rem;
  }
  .letter-content p {
    font-size: 0.88rem;
  }
  .quote-text {
    font-size: 1.35rem;
  }
  .music-card {
    padding: 14px 18px;
  }
}
