body {
  margin: 0;
  font-family: "Life Savers", serif;
  background: linear-gradient(135deg, #ffe6f2, #fff7fb);
  color: #5c2a45;
  text-align: center;
}

.screen {
  min-height: 100vh;

  display: flex;
  flex-direction: column;

  justify-content: center;
  align-items: center;

  text-align: center;

  padding: 20px;
}

.hidden {
  display: none;
}

:root {
  --bg-soft: #fff1f7;
  --pink: #f77fbe;
  --deep-plum: #ed429d;
  --berry: #ed429d;
  --cream: #fffaf2;
  --glow: rgba(247, 127, 190, 0.35);
}

body {
  margin: 0;
  font-family: "Life Savers", serif;
  background:
    linear-gradient(rgba(255, 241, 247, 0.82), rgba(255, 241, 247, 0.9)),
    url("assets/backgrounds/bg1.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--deep-plum);
  text-align: center;
}

h1,
h2,
.section-title {
  font-family: "Spicy Rice", serif;
  color: var(--deep-plum);
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(3rem, 8vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

button {
  font-family: "Life Savers", serif;
  font-weight: 800;
  background: linear-gradient(135deg, var(--pink), var(--berry));
  color: white;
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 10px 25px var(--glow);

  padding: 18px 42px;
  font-size: 1.4rem;
  min-width: 220px;
  cursor: pointer;
  transition: .3s ease;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px var(--glow);
}

#startScreen h1{
  font-size: clamp(4rem, 9vw, 8rem);
  color: var(--deep-plum);
  line-height: 1;
  margin-bottom:20px;
  text-shadow:
    3px 3px 0px rgba(255,255,255,.8),
      0 0 30px rgba(255,105,180,.25);

}

#startScreen p{
  font-family: "Life Savers", serif;
  font-size: 1.6rem;
  font-weight: 700;
  max-width: 700px;
  margin-bottom:35px;
  font-size:1.3rem;
}

.birthday-card,
.random-card,
.featured-card,
.message-card {
  background: rgba(255, 250, 255, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 32px;
  box-shadow: 0 18px 45px var(--glow);
  backdrop-filter: blur(6px);
  font-family: "Life Savers", serif;
}

.message-card {
  text-align: left;
}

.birthday-card {
  animation: cardPop 0.8s ease;
}

@keyframes cardPop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.featured-section {
  margin: 40px auto;
  text-align: center;
}

.featured-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
}

.featured-card {
  background: white;
  border-radius: 24px;
  padding: 25px;
  max-width: 600px;
  min-height: 150px;
  box-shadow: 0 10px 30px rgba(255, 142, 199, 0.25);
  animation: fadeIn 0.4s ease;
}

.featured-card p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.featured-card h4,
.random-card h4,
.message-card h4 {
   font-weight:800;
}

.featured-carousel button {
  width: 54px;
  height: 54px;
  min-width: 54px;
  padding: 0;

  border-radius: 50%;
  border: 3px solid white;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.8rem;
  line-height: 1;

  background: #f77fbe;
  color: white;

  box-shadow: 0 8px 25px rgba(247, 127, 190, 0.45);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.photo-string-section {
  width: 100%;
  margin: 60px auto;
  text-align: center;
  overflow: hidden;
}

.photo-marquee {
  width: 100%;
  overflow: hidden;
  padding: 40px 0;
}

.photo-track {
  display: flex;
  flex-direction: row;
  gap: 28px;
  width: max-content;
  animation: scrollPhotos 55s linear infinite;
}

.polaroid {
  flex: 0 0 auto;
  width: 180px;
  background: white;
  padding: 12px 12px 35px;
  box-shadow: 0 12px 30px rgba(194, 31, 116, 0.25);
}

.polaroid img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

@keyframes scrollPhotos {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

#cardScreen {
  background: transparent;
}

.polaroid:hover{

 animation:
 wiggle .4s ease;

}

@keyframes wiggle{

 0%{transform:rotate(-3deg)}

 25%{transform:rotate(3deg)}

 50%{transform:rotate(-2deg)}

 100%{transform:rotate(0)}

}

.birthday-card {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  max-width: 900px;
}

.featured-card {
  background: rgba(255, 255, 255, 0.95);
}

.hero-box {
  background: rgba(255,255,255,0.95);
  padding: 30px;
  border-radius: 32px;
  box-shadow:
      0 12px 30px rgba(247,127,190,.18);

  border:2px solid rgba(255,255,255,.7);
  max-width: 900px;

}

.ending {
  background: rgba(255,255,255,.95);
  padding: 30px;
  border-radius: 32px;
  max-width: 700px;
  margin-top: 60px;
  box-shadow:
      0 12px 30px rgba(247,127,190,.18);

  border:2px solid rgba(255,255,255,.7);

}

#messageWall {
  width: min(1400px, 92vw);
  margin: 40px auto;

  column-count: 4;
  column-gap: 24px;
}

.message-card {
  display: inline-block;
  width: 100%;

  height: auto;
  min-height: 0;

  break-inside: avoid;
  margin: 0 0 24px;
  box-sizing: border-box;

  background: rgba(255,255,255,.95);
  padding: 24px;
  border-radius: 24px;

  box-shadow: 0 12px 30px rgba(247,127,190,.18);
  text-align: left;
}

.floating-heart {
  position: fixed;
  bottom: -50px;
  opacity: 0.75;
  animation: floatUp linear forwards;
  z-index: 50;
}

.clickable-heart {
  pointer-events: auto;
  cursor: pointer;
}

@keyframes floatUp{

 from{

   transform:
    translateY(0)
    rotate(0deg);

 }

 to{

   transform:
    translateY(-120vh)
    rotate(360deg);

   opacity:0;

 }

}

.hidden {
  display: none !important;
}
.secret-popup {
  position: fixed;
  inset: 0;
  background: rgba(255, 182, 215, 0.45);
  backdrop-filter: blur(6px);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;
}

.secret-card {
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid white;
  border-radius: 32px;
  padding: 35px;
  max-width: 600px;
  width: 90%;
  position: relative;

  box-shadow: 0 20px 60px rgba(194, 31, 116, 0.35);
  animation: secretPop 0.5s ease;
}

.close-secret {

  min-width: unset;

  width: 45px;

  height: 45px;

  padding: 0;

  display:flex;

  align-items:center;

  justify-content:center;

  border-radius:50%;

  font-size:1.4rem;

  position:absolute;

  top:15px;

  right:15px;
}

@keyframes secretPop {
  from {
    transform: scale(0.7) rotate(-4deg);
    opacity: 0;
  }

  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.sparkle-mode {
  animation: sparkleGlow 1.5s ease-in-out infinite alternate;
}

@keyframes sparkleGlow {
  from {
    filter: brightness(1);
  }

  to {
    filter: brightness(1.08) saturate(1.2);
  }
}

#wishCounter{

 position:fixed;

 bottom:20px;

 right:20px;

 background:
 rgba(255,255,255,.95);

 padding:12px 18px;

 border-radius:999px;

 font-weight:800;

 z-index:100;

 box-shadow:
 0 8px 20px rgba(0,0,0,.12);

}

.social-links {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.social-btn {
  width: 60px;
  height: 60px;
  min-width: unset;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 50px;

  border-radius: 50%;
  text-decoration: none;

  background: linear-gradient(135deg, var(--pink), var(--berry));
  color: white;
  font-size: 1.8rem;
  box-shadow: 0 10px 25px var(--glow);
}

.social-btn:hover{

 transform:
 translateY(-4px)
 scale(1.05);

}

#cardScreen.hidden .social-section {
  display: none;
}

/* MOBILE */

@media (max-width: 768px) {

  /* GENERAL */

  body {

    overflow-x: hidden;

  }

  .screen {

    padding: 18px;

  }

  h1 {

    font-size: clamp(3rem, 12vw, 5rem);

    line-height: .95;

  }

  h2 {

    font-size: clamp(2rem, 8vw, 3rem);

  }


  /* HERO CARD */

  .hero-box {

    width: 90vw;

    max-width: 90vw;

    padding: 28px;

    box-sizing: border-box;

  }

  .hero-box p {

    font-size: 1.1rem;

    line-height: 1.5;

  }


  /* FEATURED MESSAGE SECTION */

.featured-carousel {

  position: relative;

  width: 92vw;

  margin: 0 auto;

  display:flex;

  justify-content:center;

  align-items:center;

}

.featured-card {

  width: 82vw;

  max-width: 420px;

  padding: 22px;

  max-height: 55vh;

  overflow-y:auto;

  box-sizing:border-box;

}

.featured-card p {

  font-size:1rem;

  line-height:1.5;

}

.featured-carousel button {

  position:absolute;

  top:50%;

  transform:translateY(-50%);

  width:46px;

  height:46px;

  min-width:46px;

  font-size:1.4rem;

  z-index:10;

}

.featured-carousel button:first-child {

  left:-6px;

}

.featured-carousel button:last-child {

  right:-6px;

}

  /* PHOTO GALLERY */

  .polaroid {

    width: 130px;

    padding-bottom: 28px;

  }

  .polaroid img {

    height: 160px;

  }

  .photo-track {

    gap: 16px;

    animation-duration: 75s;

  }


  /* MESSAGE WALL */

  #messageWall {

    column-count: 1;

    width: 92vw;

    margin: 30px auto;

  }

  .message-card {

    display: block;

    width: 100%;

    margin-bottom: 20px;

    padding: 22px;

    box-sizing: border-box;

  }

  .message-card p {

    font-size: 1rem;

    line-height: 1.5;

    overflow-wrap: break-word;

  }


  /* SOCIALS */

  .social-links {

    gap: 14px;

  }

  .social-btn {

    width: 58px;

    height: 58px;

    font-size: 1.6rem;

  }


  /* MUSIC + WISH COUNTER */

  #musicBtn {

    width: 70px;

    height: 70px;

  }

  #wishCounter {

    right: 15px;

    bottom: 85px;

    font-size: .9rem;

    padding: 10px 14px;

  }


  /* SECRET POPUPS */

  .secret-card {

    width: 88vw;

    padding: 28px;

  }

}