html {
  box-sizing: border-box;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  overflow-x: hidden;
  background-image: url('../img/background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

.song {
  visibility: hidden;
}

.container {
  height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  text-align: center;
  visibility: hidden;
  width: 100vw;
}

.container > div {
  left: 0;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.one {
  font-size: 4.5rem;
}

.two {
  font-size: 1.2rem;
  font-weight: lighter;
}

.three {
  font-size: 3rem;
}

.four .text-box {
  border: 2px solid rgba(189, 110, 207, 0.4);
  border-radius: 16px;
  margin: 0 auto;
  padding: 18px 20px;
  position: relative;
  width: 600px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(253, 240, 255, 0.9) 100%);
  box-shadow: 0 8px 32px rgba(189, 110, 207, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
}

.text-box p {
  margin: 0;
  text-align: left;
  line-height: 1.5;
}

.text-box span {
  visibility: hidden;
}

.text-box .fake-btn {
  background: linear-gradient(135deg, rgb(21, 161, 237) 0%, rgb(127, 206, 248) 100%);
  border: none;
  border-radius: 12px;
  bottom: -56px;
  color: #fff;
  padding: 0.5rem 1.5rem;
  position: absolute;
  right: 5px;
  margin-top: 14px;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(21, 161, 237, 0.4);
  cursor: default;
}

.five p {
  font-size: 2rem;
  left: 0;
  position: absolute;
  right: 0;
}

.idea-3 strong {
  border-radius: 3px;
  display: inline-block;
  padding: 3px 5px;
}

.five .idea-5 {
  font-size: 4rem;
}

.idea-5 span, .idea-6 span, .wish-hbd span {
  display: inline-block;
}

.idea-6 span {
  font-size: 15rem;
}

.six {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.six img {
  display: inline-block;
  height: 350px;
  max-width: 100%;
}

.baloons img {
  display: inline-block;
  position: absolute;
}

.baloons img:nth-child(even) {
  left: -10%;
}

.baloons img:nth-child(odd) {
  right: -10%;
}

.baloons img:nth-child(3n + 0) {
  left: 30%;
}

.seven, .eight {
  height: 100vh;
  position: fixed;
  top: 0;
  width: 100vw;
  overflow: hidden;
}

.eight svg {
  left: 0;
  position: absolute;
  top: 0;
  visibility: hidden;
  width: 25px;
  z-index: -1;
}

.eight svg:nth-child(1) {
  fill: #bd6ecf;
  left: 5vw;
  top: 7vh;
}

.eight svg:nth-child(2) {
  fill: #7dd175;
  left: 35vw;
  top: 23vh;
}

.eight svg:nth-child(3) {
  fill: #349d8b;
  left: 23vw;
  top: 33vh;
}

.eight svg:nth-child(4) {
  fill: #347a9d;
  left: 57vw;
  top: 43vh;
}

.eight svg:nth-child(5) {
  fill: #c66053;
  left: 7vw;
  top: 68vh;
}

.eight svg:nth-child(6) {
  fill: #bfaa40;
  left: 77vw;
  top: 42vh;
}

.eight svg:nth-child(7) {
  fill: #e3bae8;
  left: 83vw;
  top: 68vh;
}

.eight svg:nth-child(8) {
  fill: #8762cb;
  left: 37vw;
  top: 86vh;
}

.eight svg:nth-child(9) {
  fill: #9a90da;
  left: 87vw;
  top: 94vh;
}

.wish-hbd {
  font-size: 3em;
  margin: 0;
  text-transform: uppercase;
}

.wish h5 {
  font-size: 2rem;
  font-weight: lighter;
  margin: 10px 0 0;
}

.nine p {
  font-size: 2rem;
  font-weight: lighter;
}

#replay {
  cursor: pointer;
  z-index: 3;
}

/* ----- Mobile only: centered layout & adaptive font sizes ----- */
@media screen and (max-width: 768px) {
  .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .container > div {
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Adaptive font sizes for mobile */
  .one {
    font-size: clamp(1.75rem, 8vw, 3rem);
    text-align: center;
  }

  .two {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
    text-align: center;
  }

  .three {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
    text-align: center;
  }

  /* Centered text box */
  .four {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .four .text-box {
    width: 90%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 12px;
  }

  .text-box p {
    text-align: center;
  }

  .text-box .fake-btn {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: -48px;
    margin-top: 14px;
  }

  .five p {
    font-size: clamp(0.95rem, 4vw, 1.4rem);
    text-align: center;
    left: 0;
    right: 0;
  }

  .five .idea-5 {
    font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  }

  .idea-5 span {
    display: block;
  }

  .idea-6 span {
    font-size: clamp(4rem, 22vw, 9rem);
    text-align: center;
  }

  /* Centered profile & wish */
  .six {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
  }

  .six img.profile-picture {
    height: auto;
    max-height: 45vh;
    max-width: 85vw;
    margin: 0 auto;
    display: block;
  }

  .six .wish {
    width: 90%;
    margin: 0 auto;
    text-align: center;
  }

  .wish-hbd {
    font-size: clamp(1.25rem, 5.5vw, 2rem);
    text-align: center;
  }

  .wish h5 {
    font-size: clamp(0.9rem, 3.5vw, 1.25rem);
    text-align: center;
  }

  .nine {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .nine p {
    font-size: clamp(0.9rem, 3.5vw, 1.35rem);
    text-align: center;
    max-width: 95%;
  }
}

/* Extra small mobile */
@media screen and (max-width: 380px) {
  .container > div {
    top: 50%;
    transform: translateY(-50%);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .one {
    font-size: 1.6rem;
  }

  .idea-6 span {
    font-size: 3.5rem;
  }

  .wish-hbd {
    font-size: 1.15rem;
  }
}

/* Short mobile viewport */
@media screen and (max-width: 768px) and (max-height: 600px) {
  .container > div {
    top: 50%;
    transform: translateY(-50%);
  }

  .six {
    top: 50%;
    transform: translateY(-50%);
  }

  .six img.profile-picture {
    max-height: 38vh;
  }

  .idea-6 span {
    font-size: clamp(3rem, 18vw, 6rem);
  }
}
