/* RESET */
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, sans-serif;
}

html, body{
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body{
  background: linear-gradient(to bottom, #050012, #12002b, #1d003d);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 90px 15px 25px;
  position: relative;
  transition: 1s ease;
}

/* MODE PINK */
body.pinkMode{
  background: linear-gradient(to bottom, #ff2e63, #ff7aa2, #ffb3c6);
}

/* SKY TEXT */
.skyText{
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  text-align: center;
  font-size: 1.8rem;
  font-weight: bold;
  color: #ffb3c6;
  text-shadow: 0px 0px 20px rgba(255, 179, 198, 0.9);
  z-index: 30;
  animation: glow 2s infinite alternate;
}

@keyframes glow{
  from{ opacity: 0.75; }
  to{ opacity: 1; }
}

/* CARD */
.card{
  width: 100%;
  max-width: 650px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  border-radius: 25px;
  padding: 26px;
  text-align: center;
  box-shadow: 0px 15px 45px rgba(0,0,0,0.6);
  z-index: 10;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  max-height: calc(100vh - 120px);
  overflow: hidden;
}

.card h1{
  font-size: 2.1rem;
  margin-bottom: 15px;
  color: white;
  text-shadow: 0px 0px 15px rgba(255,255,255,0.5);
}

/* MESSAGE BOX */
.messageBox{
  background: rgba(0,0,0,0.35);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 15px;

  flex: 1;
  min-height: 160px;
  max-height: 260px;

  overflow-y: auto;
  scrollbar-width: thin;
}

.messageBox p{
  font-size: 1.05rem;
  color: white;
  line-height: 1.7;
  white-space: pre-line;
  text-align: center;
}

/* QUESTION */
.questionText{
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: white;
}

/* BUTTON AREA */
.btnArea{
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

button{
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  transition: 0.25s;
}

.yesBtn{
  background: #ff2e63;
  color: white;
  box-shadow: 0px 8px 25px rgba(255,46,99,0.7);
}

.yesBtn:hover{
  transform: scale(1.08);
  background: #ff0f4f;
}

.noBtn{
  background: #3b3b3b;
  color: white;
}

.noBtn:hover{
  transform: scale(1.05);
}

/* HINT */
.hintText{
  margin-top: 12px;
  font-size: 0.9rem;
  opacity: 0.85;
  color: white;
}

/* START SCREEN */
.startScreen{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.startBox{
  width: 100%;
  max-width: 500px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 25px;
  padding: 35px;
  text-align: center;
  box-shadow: 0px 15px 45px rgba(0,0,0,0.8);
}

.startBox h1{
  font-size: 2.1rem;
  color: #ffb3c6;
  margin-bottom: 15px;
}

.startBox p{
  font-size: 1.05rem;
  line-height: 1.7;
  color: white;
  margin-bottom: 25px;
}

#startBtn{
  width: 100%;
  background: #ff2e63;
  color: white;
  padding: 14px;
  border-radius: 18px;
  font-size: 1.1rem;
}

#startBtn:hover{
  transform: scale(1.05);
}

/* ENVELOPE */
.envelopeScene{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.envelopeWrap{
  width: 100%;
  max-width: 430px;
  text-align: center;
}

.envelope{
  width: 100%;
  height: 250px;
  position: relative;
  margin: auto;
}

.envBody{
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 75%;
  background: #ffb3c6;
  border-radius: 18px;
  box-shadow: 0px 15px 35px rgba(0,0,0,0.4);
}

.envTop{
  position: absolute;
  top: 0;
  width: 100%;
  height: 60%;
  background: #ff85a1;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  animation: openEnv 1.2s ease forwards;
}

@keyframes openEnv{
  0%{ transform: rotateX(0deg); }
  100%{ transform: rotateX(180deg); }
}

.letter{
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  height: 85%;
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0px 10px 30px rgba(0,0,0,0.35);
  overflow-y: auto;
  animation: letterUp 1.3s ease forwards;
}

@keyframes letterUp{
  from{ transform: translateX(-50%) translateY(80px); opacity: 0; }
  to{ transform: translateX(-50%) translateY(-65px); opacity: 1; }
}

.letter h2{
  font-size: 1.3rem;
  color: #ff2e63;
  margin-bottom: 10px;
}

.letter p{
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
  white-space: pre-line;
}

.ants{
  margin-top: 20px;
  font-size: 1.3rem;
  animation: antWalk 3s linear infinite;
}

@keyframes antWalk{
  0%{ transform: translateX(-35px); }
  50%{ transform: translateX(35px); }
  100%{ transform: translateX(-35px); }
}

.closeBtn{
  margin-top: 18px;
  width: 100%;
  background: #00c896;
  color: white;
  padding: 14px;
  border-radius: 18px;
  font-size: 1.05rem;
}

/* CANVAS */
canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* LOVE FALL */
.fallingLove{
  position: fixed;
  top: -40px;
  font-size: 1.7rem;
  animation: fall linear forwards;
  z-index: 6;
  opacity: 0.95;
}

@keyframes fall{
  to{
    transform: translateY(120vh) rotate(360deg);
    opacity: 0;
  }
}

/* SHAKE */
.shake{
  animation: shakeAnim 0.25s;
}

@keyframes shakeAnim{
  0%{ transform: translate(0,0); }
  25%{ transform: translate(6px, -6px); }
  50%{ transform: translate(-6px, 6px); }
  75%{ transform: translate(6px, 6px); }
  100%{ transform: translate(0,0); }
}

/* RESPONSIVE HP */
@media (max-width: 600px){

  body{
    padding: 80px 12px 20px;
  }

  .skyText{
    font-size: 1.25rem;
    top: 14px;
  }

  .card{
    padding: 20px;
    border-radius: 18px;
  }

  .card h1{
    font-size: 1.55rem;
  }

  .messageBox{
    min-height: 140px;
    max-height: 200px;
  }

  .messageBox p{
    font-size: 0.92rem;
  }

  .questionText{
    font-size: 1.05rem;
  }

  button{
    width: 100%;
    font-size: 1rem;
    padding: 12px;
  }

  .btnArea{
    flex-direction: column;
    gap: 12px;
  }

  .startBox h1{
    font-size: 1.7rem;
  }

  .startBox p{
    font-size: 0.95rem;
  }

  .letter p{
    font-size: 0.9rem;
  }

  .ants{
    font-size: 1.15rem;
  }
}
