@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
body {
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.scene{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;

    opacity: 1;
    transition: opacity 1s ease-in-out;

    background: black;
}

.scene.fade-out {
    opacity: 0;
}

#muffin-img {
    width: auto;
    height: 500px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transition: all 0.3s;
}

#muffin-img:hover {
    transform: scale(1.05);
    box-shadow: none;
}

#yes-btn, #no-btn {
    width: 400px;
    height: 60px;
    margin-top: 20px;

    font-size: 30px;
    font-family: "Press Start 2P", system-ui;

    cursor: pointer;

    image-rendering: pixelated;
    image-rendering: crisp-edges;
    box-shadow: 4px 4px 0px white;
    transition: all 0.1s;
}

#yes-btn:hover, #no-btn:hover, #next-btn:hover{
    background: white;
    color: black;
    box-shadow: none;
    transform: translate(4px, 4px);
}

#cake-img {
    width: auto;
    height: 500px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transition: all 0.3s;
}

#cake-img:hover {
    transform: scale(1.05);
    box-shadow: none;
}

p {
    font-size: 25px;
    font-family: "Press Start 2P", system-ui;
    color: white;
    text-align: center;
    margin-bottom: 5px;
}

#cake-intro, #cake-joke {
    font-size: 13px;
    margin-top: 0px;
    max-width: 80vw;
    white-space: normal;
    word-break: break-word;
}

#cake-directions {
    max-width: 80vw;
    white-space: normal;
    text-align: center;
    font-size: 20px;
    margin-top: 0px;
    padding: 0;
    color: black;
    background: white;
    border: 2px solid white;
    opacity: 0;
}

#cake-directions.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}


#cake-directions.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

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

#cake-container {
    position: relative;
    display: inline-block;
}     

#candle-container {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: -10px;
    z-index: 2;
}

.candle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;

    opacity: 0;
    transform: translateY(-300px);
    animation: candleFall0 1.3s ease-out forwards;
}

.candle {
    width: 100px;
    height: 150px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    pointer-events: none;
}

.flame {
    width: auto;
    height: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    margin-bottom: -50px;
    z-index: 2;

    cursor: pointer;
    transition: all 0.3s ease;
}

.flame:hover {
    transform: translateY(-30px) scale(1.7);
    box-shadow: none;
}

.flame.blown-out {
    opacity: 0;
    pointer-events: none;
}

@keyframes candleFall0 {
    from {
        transform: translateY(-300px);
        opacity: 0;
    }
    to {
        transform: translateY(-30px);
        opacity: 1;
    }
}

#slideshow-intro {
    max-width: 80vw;
    white-space: normal;
    text-align: center;
    font-size: 20px;
    margin-top: 0px;
    padding: 0;
    z-index: 100;
    color: white;

    opacity: 0;
}

#slideshow-intro.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#scene-letters {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    justify-content: flex-start;
    align-items: center;
    padding: 60px 20px;
    box-sizing: border-box;
    width: 100vw;
}

.ftcimg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateX(100vw);
    width: 80%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    transition: transform 0.8s ease-in-out;
}

.ftcimg.slide-in {
    transform: translate(-50%, -50%) translateX(0);
}

.ftcimg.slide-out {
    transform: translate(-50%, -50%) translateX(-100vw);
}

#letters-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    padding: 20px 0;
}

.letter-name {
    font-family: "Press Start 2P", system-ui;
    font-size: 10px;
    color: rgb(34, 16, 3);
    margin: 0 0 20px 0;
    text-align: left;
    display: block;
}

.letter-text {
    font-family: "Press Start 2P", system-ui;
    font-size: 7px;
    color: rgb(34, 16, 3);
    line-height: 2;
    white-space: normal;
    word-break: break-word;
    text-align: left;
    display: block;
    padding-top: 1px;
}

.letter-card{
    background-image: url('assets/imgs/letter.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    
    image-rendering: pixelated;
    image-rendering: crisp-edges;

    width: min(600px, 85vw);
    min-height: 400px;
    height: auto;

    padding: 120px;
    box-sizing: border-box;

    cursor: pointer;
    transition: all 0.3s;
}

.letter-card:hover {
    transform: rotate(-3deg) scale(1.5);
}

#next-btn {
    display: block;
    width: 400px;
    height: 60px;
    margin: 20px auto 0;
    padding-left: 20px;
    font-size: 30px;
    font-family: "Press Start 2P", system-ui;

    cursor: pointer;

    image-rendering: pixelated;
    image-rendering: crisp-edges;
    box-shadow: 4px 4px 0px white;
    transition: all 0.1s;
}

#final-container p{
    position: absolute;
    text-align: center;
    max-width: 70vw;
    opacity: 0;
    font-size: 20px;
    color: white;
    line-height: 2;
    transition: opacity 1.5s ease-in-out;
}

#final-greet{
    font-size: 40px;
}

#final-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#home-btn {
    position: absolute;
    bottom: 40px;         
    left: 50%;
    transform: translateX(-50%);  
    width: 400px;
    height: 60px;
    font-size: 16px;
    font-family: "Press Start 2P", system-ui;
    cursor: pointer;
    box-shadow: 4px 4px 0px white;
    opacity: 0;

    transition: opacity 1.5s ease-in-out, background 0.1s, color 0.1s, box-shadow 0.1s, transform 0.1s;

}

#home-btn.visible {
    opacity: 1;
}

#home-btn:hover {
    background: white;
    color: black;
    box-shadow: none;
    transform: translateX(-50%) translate(4px, 4px); 
}