body {
    background-color: #f0ead6;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Changed from height to min-height so it can grow if needed */
    min-height: 100vh; 
    
    margin: 0;
    
    /* Adds breathing room so content never touches the edges */
    padding: 40px 20px; 
    box-sizing: border-box; 
    
    font-family: 'Arial', sans-serif;
    
    /* Allow vertical scrolling, but prevent accidental horizontal scrolling */
    overflow-x: hidden; 
    overflow-y: auto; 
}

/* --- CUPCAKE SCENE --- */
#candle-scene {
    text-align: center;
    cursor: pointer;
    transition: opacity 1s ease;
    
    /* Add these lines to remove the mobile tap highlight and outline */
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

#candle-scene h3 {
    color: #454545; /* Makes the text a lighter gray */
    margin-bottom: 50px;
    font-weight: bold; /* Makes it look a bit softer */
}

.cupcake-container {
    position: relative;
    width: 200px;
    height: 250px;
    margin: 0 auto;
}

/* The Wrapper/Cup */
.cup {
    position: absolute;
    bottom: 0;
    left: 25px;
    width: 150px;
    height: 90px;
    background: linear-gradient(to right, #ff99cc, #ff66aa);
    border-radius: 10px 10px 40px 40px;
    box-shadow: inset 0 -10px 15px rgba(0,0,0,0.1);
    
    /* Center the "20" text inside the cup */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Styling the "20" */
    color: #fff;
    font-family: 'Just Another Hand', cursive;
    font-size: 4rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* The Frosting base */
.frosting {
    position: absolute;
    bottom: 80px;
    left: 10px;
    width: 180px;
    height: 70px;
    background-color: #fff;
    border-radius: 90px 90px 20px 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Extra Frosting fluff */
.frosting-layer {
    position: absolute;
    bottom: 120px;
    left: 40px;
    width: 120px;
    height: 50px;
    background-color: #fff;
    border-radius: 50px;
}

/* The Candle */
.candle {
    position: absolute;
    bottom: 150px;
    left: 90px;
    width: 20px;
    height: 60px;
    background-color: #aae0ff;
    border-radius: 5px;
    box-shadow: inset -3px 0 5px rgba(0,0,0,0.1);
}

/* The Wick */
.wick {
    position: absolute;
    bottom: 210px;
    left: 98px;
    width: 4px;
    height: 12px;
    background-color: #333;
}

/* The Flame */
.flame {
    position: absolute;
    bottom: 220px;
    left: 90px;
    width: 20px;
    height: 35px;
    background-color: #ffaa00;
    border-radius: 50% 50% 20% 20%;
    box-shadow: 0 0 15px #ffaa00, 0 0 30px #ff5500;
    animation: flicker 0.15s infinite alternate;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

@keyframes flicker {
    0% { transform: scale(1) rotate(-3deg); }
    100% { transform: scale(1.1) rotate(3deg); }
}

/* JS Class to hide flame */
.blown-out {
    opacity: 0 !important;
    transform: scale(0) !important;
}

.hide-scene {
    display: none !important;
}


/* --- POLAROID SCENE --- */
#card-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 1.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.polaroid {
    background: white;
    padding: 15px 15px 60px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transform: rotate(-3deg);
    position: relative;
    width: 300px;
    margin: 0;
}

.polaroid img {
    width: 100%;
    height: 300px;
    object-fit: cover; /* Ensures your image fits the square nicely */
    display: block;
    background-color: #eee;
}

.polaroid figcaption {
    font-family: 'Just Another Hand', cursive;
    font-size: 2.5rem;
    text-align: center;
    margin-top: 15px;
    color: #333;
}

.tape {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 100px;
    height: 30px;
    background-color: rgba(255, 255, 200, 0.7);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

.card-text {
    font-family: 'Just Another Hand', cursive;
    font-size: 2.2rem; /* Slightly reduced so the Polish text fits nicely */
    
    /* This centers the block while left-aligning the text inside */
    text-align: left; 
    width: 90vw; /* Keeps it responsive on small mobile screens */
    max-width: 330px; /* Matches the width of the polaroid to force text wrapping */
    
    margin-top: 30px;
    transform: rotate(1deg);
    color: #444;
    line-height: 1.1; /* Keeps the lines of handwritten text close together */
}