html {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #fff9fc;
  color: #4a6c5d; /* Sage green color */
  overflow-x: hidden;
}

/* Welcome Screen */
.welcome-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffe6f2 0%, #ffd6e7 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.welcome-screen h1 {
  color: #4a6c5d; /* Sage green color */
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  padding: 0 20px;
}

#start-button {
  background: none;
  color: #4a6c5d;
  border: 2px solid #4a6c5d;
  padding: 8px 16px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

#start-button:hover {
  background-color: rgba(74, 108, 93, 0.1);
}

/* Cherry Blossoms Animation */
.cherry-blossoms {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.cherry-petal {
  position: absolute;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10,0 C13,3 20,7 10,20 C0,7 7,3 10,0 Z" fill="%23ffcce6" /></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.8;
}

.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: 20vh;
}

.one {
  font-size: 4.5rem;
  color: #4a6c5d; /* Sage green color */
}

.two {
  font-size: 1.2rem;
  font-weight: lighter;
  color: #4a6c5d; /* Sage green color */
}

.three {
  font-size: 3rem;
  color: #4a6c5d; /* Sage green color */
}

/* Chat App Styling */
.chat-app {
  width: 90%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  position: relative;
}

.chat-header {
  background-color: #ff69b4;
  color: white;
  padding: 15px;
  display: flex;
  align-items: center;
  position: relative;
}

.profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  border: 2px solid white;
}

.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-name {
  font-weight: bold;
  font-size: 1.2rem;
}

.chat-status {
  font-size: 0.8rem;
  opacity: 0.8;
  position: absolute;
  right: 15px;
}

.chat-body {
  padding: 20px;
  background-color: #f5f5f5;
  height: 300px;
  overflow-y: auto;
}

.message-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 15px;
}

.message-bubble {
  background-color: #e1f5fe;
  border-radius: 18px;
  padding: 10px 15px;
  max-width: 80%;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  word-break: break-word;
  min-width: 50px;
}

.message-time {
  font-size: 0.7rem;
  color: #999;
  display: block;
  text-align: right;
  margin-top: 5px;
}

.chat-footer {
  padding: 15px;
  background-color: #fff;
  display: flex;
  align-items: center;
  border-top: 1px solid #eee;
  position: relative;
}

.fake-btn {
  background-color: #ff69b4;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  margin-left: auto;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  border: none;
  outline: none;
}

.hbd-chatbox {
  color: #4a6c5d; /* Sage green color */
  visibility: hidden;
  display: inline;
}

.hbd-chatbox span {
  visibility: hidden;
}

.five p {
  font-size: 2rem;
  left: 0;
  position: absolute;
  right: 0;
  color: #4a6c5d; /* Sage green color */
}

.idea-3 strong {
  border-radius: 3px;
  display: inline-block;
  padding: 3px 5px;
}

.five .idea-5 {
  font-size: 4rem;
  color: #4a6c5d; /* Sage green color */
}

.idea-5 span, .idea-6 span, .wish-hbd span {
  display: inline-block;
}

.idea-6 span{
  font-size: 15rem;
  color: #4a6c5d; /* Sage green color */
}

/* Birthday Card */
.six {
  position: relative;
  top: 10vh;
  z-index: 1;
}

.hat-and-profile {
  position: relative;
  width: 200px;
  margin: 20px auto;
}

.profile-container {
  width: 200px;
  height: 200px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.profile-picture {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-picture.active {
  display: block;
}

.hat {
  position: absolute;
  width: 70px;
  top: -60px;
  left: -30px;
  z-index: 2;
  transform: rotate(-30deg);
}

.wish-hbd {
  font-size: 2.5em;
  margin: 15px 0;
  color: #4a6c5d; /* Sage green color */
}

#wishText {
  font-size: 1.2rem;
  line-height: 1.5;
  color: #4a6c5d; /* Sage green color */
  margin: 0 auto;
  max-width: 600px;
  padding: 0 20px;
}

.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;
}

.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;
}

.nine p {
  font-size: 2rem;
  font-weight: lighter;
  color: #4a6c5d; /* Sage green color */
}

#replay {
  cursor: pointer;
  z-index: 3;
}

/* Media Queries */
@media screen and (max-width: 768px) {
  .one {
    font-size: 3.5rem;
  }

  .three {
    font-size: 2.5rem;
  }

  .hat-and-profile {
    width: 180px;
  }
  
  .profile-container {
    width: 180px;
    height: 180px;
  }

  .hat {
    width: 60px;
    top: -40px;
    left: -30px;
  }

  .wish-hbd {
    font-size: 2em;
  }

  #wishText {
    font-size: 1rem;
  }
}

@media screen and (max-width: 500px) {
  .container {
    width: 90%;
  }

  .welcome-screen h1 {
    font-size: 1.5rem;
  }

  #start-button {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .one {
    font-size: 2.5rem;
  }

  .three {
    font-size: 2rem;
  }

  .chat-app {
    width: 95%;
  }

  .chat-body {
    height: 250px;
  }

  .idea-5 span {
    display: block;
  }

  .idea-6 span {
    font-size: 8rem;
  }

  .hat-and-profile {
    width: 150px;
  }
  
  .profile-container {
    width: 150px;
    height: 150px;
  }

  .hat {
    width: 50px;
    top: -15px;
    left: -8px;
  }

  .wish-hbd {
    font-size: 1.8em;
  }

  #wishText {
    font-size: 0.9rem;
  }

  .nine p {
    font-size: 1.3rem;
  }
}
