body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  background-image: url("images/heart-bg.jpg");
  font-family: "Pixelify Sans", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif
}

#envelope-container {
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

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

  50% {
    transform: scale(1.1);
  }

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

#envelope{
    width: 260px;
    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("images/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;
}

/* Photo + roses */

.photo-frame {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 6px 0 14px;
}

.letter-window.final .photo-frame {
    display: flex;
}

.cat {
    width: 250px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    opacity: 0.92;
    -webkit-mask-image: radial-gradient(circle at center, #000 60%, transparent 100%);
    mask-image: radial-gradient(circle at center, #000 65%, transparent 100%);
    transition: width 0.4s ease, opacity 0.3s ease;
}

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

.rose {
    width: 82px;
    padding: 12px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.22));
    animation: float-rose 3.8s ease-in-out infinite;
}

.rose-left {
    animation-delay: 0s;
}

.rose-right {
    animation-delay: 1.9s;
}

@keyframes float-rose {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

@media (max-width: 540px) {
    body {
        align-items: center;
        justify-content: center;
    }

    #letter-container {
        align-items: center;
        justify-content: center;
    }

    .letter-window {
        width: 100vw;
        max-width: none;
        padding: 12px 12px 0 12px;
        padding-top: 130px;
        transform: scale(1);
    }

    h1 {
        font-size: 22px;
    }

    p {
        font-size: 28px;
    }

    .photo-frame {
        gap: 10px;
        margin: 4px 0 10px;
    }

    .cat {
        width: 130px;
    }

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

    .rose {
        width: 40px;
        padding: 3px;
    }

    .buttons {
        gap: 16px;
    }

    .btn,
    .yes-btn,
    .no-btn {
        width: 90px;
    }

    .final-text {
        font-size: 8px;
        max-width: 70vw;
        margin: 0;
    }
}

/* 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;
}