body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url("heart-bg.jpg");
    font-family: "Pixelify Sans", sans-serif;
}

/* Envelope Screen */
#envelope-container {
    text-align: center;
    cursor:pointer;
}

@keyframes pulse {
    0% {
        transform:scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

#envelope{
    width: 200px;
    animation: pulse 1.5s infinite;
    cursor: pointer;
}

#letter-container{
    display: none;
    position:fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
}

.letter-window{
    width: 90vw;
    max-width: 800px;
    aspect-ratio: 3/2;
    padding: 20px 20px 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url("window.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 12px;
    gap: 1px;
    padding-top: 180px;

    transform: scale(1.2);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.letter-window.open {
    transform: scale(1);
    opacity: 1;
}

h1 {
    font-size: 30px;
    margin:0;
}

p {
    font-size: 40px;
}

/* Cat */
.cat {
    width: 250px;
    margin: 10px 0;
    transition: width 0.4s ease;
}

.letter-window.final .cat {
    width: 180px;
}

/* buttons */
.buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    position: relative;
}

.no-wrapper{
    position:relative;
}

.btn {
    width: 120px;
    cursor: pointer;
    user-select: none;
}

.yes-btn,
.no-btn {
  width: 120px;
  height: auto;
  display: inline-block;
}

.yes-btn {
    position: relative;
    z-index: 2;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

.no-btn {
    z-index: 1;
    position: relative;
    transition: transform 0.15s ease;
    cursor: default;
}

.final-text{
    font-size: 22px;
    line-height: 1.4;
    text-align: center;
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(255,240,240,0.5);
    border-radius: 12px;
}

/* Music toggle */
#music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 22px;
  background: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

#music-toggle:hover {
  transform: scale(1.1);
}

/* Love Letter Screen */
#loveletter-container{
  display: none;
  position: fixed;
  inset: 0;
  justify-content: center;
  align-items: center;

  /* NEW: smooth fade in/out */
  opacity: 0;
  transition: opacity 1s ease;
}

#loveletter-container.show{
  opacity: 1;
}

.loveletter-window{
  width: 90vw;
  max-width: 800px;
  padding: 40px 30px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.loveletter-text{
  margin-top: 18px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 240, 240, 0.6);
  max-height: 50vh;
  overflow: auto;
  text-align: left;
}

.loveletter-text p{
  font-size: 22px;
  line-height: 1.6;
  margin: 0;
}

#back-btn{
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: "Pixelify Sans", sans-serif;
  font-size: 18px;
}

/* Floating GIFs Around Letter */
.floating-gif{
  position: absolute;
  width: 120px;
  pointer-events: none;
  animation: floaty 3s ease-in-out infinite;
}

.gif-top-left{
  top: 5%;
  left: 5%;
}

.gif-top-right{
  top: 5%;
  right: 5%;
}

.gif-bottom-left{
  bottom: 5%;
  left: 5%;
}

.gif-bottom-right{
  bottom: 5%;
  right: 5%;
}

@keyframes floaty{
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
