body {
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* background-image: url("heartbg1.png"); */
    background-color: rgb(255, 209, 221);
    font-family: "Pixelify Sans", sans-serif !important;
}

/* Envelope Screen */

#envelope-container {
    text-align: center;
    cursor:pointer;
}

@keyframes pulse {
    0% {
        transform:scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    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;
    color: rgb(150, 10, 0);
    font-weight: 900;
}

p {
    font-size: 40px;
    font-family: "Pixelify Sans", sans-serif;
    color: rgb(150, 10, 0);
}

#letter {
    font-weight: 700;
    animation: pulse 1.5s infinite;
    color: rgb(202, 57, 53);
    
}

.kermit-wrapper {
    left: -20px;
    /* width: 150px; */
    opacity: 0;
    z-index: -1;
    position: absolute;
}

.kermit-wrapper2 {
    right: -20px;
    /* width: 150px; */
    opacity: 0;
    transform: scaleX(-1);
    z-index: -1;
    position: absolute;
}

.kermit-wrapper.open {
    opacity: 1;
}

.kermit-wrapper2.open {
    opacity: 1;
}

/* Simple Kermit dance used when 'dance' class is added */
@keyframes kermit-dance {
    0% { transform: translateY(0) rotate(0deg); }
    30% { transform: translateY(-10px) rotate(-8deg); }
    60% { transform: translateY(0) rotate(0deg); }
 100% { transform: translateY(-6px) rotate(8deg); }
}

.kermit-wrapper.dance {
    will-change: transform;
    animation: kermit-dance 0.9s cubic-bezier(0.2,0.8,0.2,1) infinite alternate;
}

/* mirrored version keeps scaleX(-1) so the right Kermit stays mirrored */
@keyframes kermit-dance-mirror {
  0% { transform: scaleX(-1) translateY(0) rotate(0deg); }
  30% { transform: scaleX(-1) translateY(-10px) rotate(-8deg); }
  60% { transform: scaleX(-1) translateY(0) rotate(0deg); }
 100% { transform: scaleX(-1) translateY(-6px) rotate(8deg); }
}

.kermit-wrapper2.dance {
    will-change: transform;
    animation: kermit-dance-mirror 0.9s cubic-bezier(0.2,0.8,0.2,1) infinite alternate;
}

/* 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;
    margin-top: 40px;
}

/* Fun title growth animation that expresses exclamation */
@keyframes title-grow {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1.4); }
}

#letter-title.celebrate {
    animation: title-grow 0.75s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

/* Audio player at bottom center */
#audio-player-container {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(255, 240, 240, 0.9);
    /* padding: 12px 20px; */
    padding: 0.1px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    display: none;
}

#audio-player-container.show {
    display: block;
}

#love-song {
    width: 300px;
    max-width: 90vw;
    height: 32px;
    outline: none;
    margin-top: -50px;
}

.song-title {
    font-size: 14px;
    color: rgb(150, 10, 0);
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    margin-bottom: 25px;
}

/* Ganja Button */
.ganja-text {
    position: fixed;
    top: 115px;
    left: 47.8%;
    transform: translateX(-50%);
    font-family: "Pixelify Sans", sans-serif;
    font-size: 14px;
    color: rgb(150, 10, 0);
    font-weight: 900;
    padding: 0;
    z-index: 200;
    animation: pulse 1.5s infinite;
}

.ganja-btn {
    position: fixed;
    top: 100px;
    left: 50%;
    bottom: 60%; 
    transform: translateX(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 110px;
    height: auto;
    z-index: 200;
}

.ganja-btn img {
    width: 100%;
    height: auto;
    display: block;

    animation: pulse 1.5s infinite;
}

@keyframes press-down {
    0% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) translateY(4px) scale(0.98); }
    100% { transform: translateX(-50%) scale(1); }
}

.ganja-btn.pressed {
    animation: pr1ess-down 0.3s ease;
}
/* Falling Hearts Animation */
@keyframes fall {
    0% {
        top: -50px;
        opacity: 1;
    }
    100% {
        top: 100vh;
        opacity: 0;
    }
}

@keyframes sway {
    0% { transform: translateX(0); }
    50% { transform: translateX(30px); }
    100% { transform: translateX(0); }
}

.heart-container {
    position: fixed;
    pointer-events: none;
    z-index: 10;
}

.heart-container img {
    width: 30px;
    height: 30px;
    animation: fall linear, sway ease-in-out;
    display: block;
}