/* General Setup for Mobile */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: sans-serif;
    background: #000;
    color: white;
    overflow: hidden;
    height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    padding: 20px;
    transition: opacity 0.5s ease-in-out;
}
.screen.active { display: flex; }

/* Backgrounds */
#login-screen { background: linear-gradient(45deg, #ff8c00, #ff0080); }
#surprise-screen { background: linear-gradient(45deg, #00c6ff, #0072ff); }
#greeting-screen { background: linear-gradient(45deg, #8e2de2, #4a00e0); }
#cake-screen { background: linear-gradient(45deg, #1f003b, #000); }
#fireworks-screen { background: #000000; } /* Pure black background */
#letter-screen { background: linear-gradient(45deg, #4b134f, #c94b4b); }

/* Card & Button Styles */
.card-box, .card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    width: 90%;
    max-width: 400px;
}
.glass-effect { backdrop-filter: blur(10px); }

input[type="password"] {
    width: 100%; padding: 12px; margin: 20px 0; border: none; border-radius: 10px; text-align: center; font-size: 16px;
}

button {
    background: #fff; color: #333; border: none; padding: 12px 25px; border-radius: 25px; font-size: 16px; cursor: pointer; font-weight: bold; transition: transform 0.2s;
}
button:hover { transform: scale(1.1); }
#error-message { color: #ffdddd; height: 20px; margin-top: 10px; }

/* Screen 3: Greeting */
.greeting-card h1 { font-size: 2.2em; }
.colorful-text { background: linear-gradient(45deg, #f8ff00, #ff00c8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.profile-photo { width: 150px; height: 150px; border-radius: 50%; border: 5px solid white; box-shadow: 0 0 25px #ff00c8; margin: 20px 0; }

/* NEW Realistic Petals */
#petal-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999; }
.petal {
    position: absolute; top: -10vh;
    width: 30px; height: 30px;
    background-image: url('https://i.ibb.co/t8y1gB9/petal.png');
    background-size: contain; background-repeat: no-repeat;
    opacity: 0;
}
.petal.animate-1 { animation: flutter-1 12s linear infinite; }
.petal.animate-2 { animation: flutter-2 12s linear infinite; }
@keyframes flutter-1 { 0% { transform: translateY(-10vh) translateX(0) rotate(0); opacity: 1; } 100% { transform: translateY(110vh) translateX(15vw) rotate(360deg); opacity: 0.5; } }
@keyframes flutter-2 { 0% { transform: translateY(-10vh) translateX(0) rotate(0); opacity: 1; } 100% { transform: translateY(110vh) translateX(-20vw) rotate(270deg); opacity: 0.6; } }


/* Screen 4: Cake */
.cake{position:relative;width:250px;height:200px;margin:30px auto;}.plate{width:270px;height:110px;position:absolute;bottom:-10px;left:-10px;background-color:rgba(255,255,255,0.5);border-radius:50%;}.layer{position:absolute;display:block;width:250px;height:100px;border-radius:50%;background-color:#9a0052;}.layer-top{top:0px}.layer-middle{top:33px}.layer-bottom{top:66px}.icing{top:0px;width:250px;height:100px;position:absolute;border-radius:50%;background-color:#ff99dd;}.drip{display:block;width:50px;height:60px;border-radius:50%;position:absolute;top:50px;background-color:#ff99dd;}.drip1{left:10px}.drip2{left:80px;top:40px}.drip3{left:160px;top:45px}.candle{background-color:#fff;width:16px;height:50px;border-radius:8px/4px;top:-20px;left:50%;margin-left:-8px;}.flame{position:absolute;background-color:orange;width:15px;height:35px;border-radius:10px 10px 10px 10px/25px 25px 10px 10px;top:-34px;left:50%;margin-left:-7.5px;box-shadow:0 0 20px orange;animation:flame .5s infinite} @keyframes flame{50%{transform: scale(1.1);}}

/* NEW Fireworks / Crackers */
.fireworks-container { position: absolute; width: 100%; height: 100%; }
.firework{
    position: absolute; border-radius: 50%; opacity: 0; border-style: solid;
    animation: cracker-burst 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}
.firework:nth-child(1){left:50%;top:50%;width:150px;height:150px;border-width:4px;border-color:#ff0080;animation-delay:.5s}
.firework:nth-child(2){left:20%;top:30%;width:180px;height:180px;border-width:5px;border-color:#00ffff;animation-delay:1s}
.firework:nth-child(3){right:20%;top:60%;width:160px;height:160px;border-width:4px;border-color:#adff2f;animation-delay:1.5s}
@keyframes cracker-burst {
    0% { transform: scale(0.1); opacity: 1; }
    80% { opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Screen 6: Letter */
.final-letter { max-width: 90%; }
.heart { font-size: 50px; }
.message { font-size: 1.1em; margin: 20px 0; }
.signature { text-align: right; margin-top: 20px; font-style: italic; }