@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800;900&display=swap');

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #ff9a9e, #fecfef, #a18cd1, #fbc2eb);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Modern Start Button - Glassmorphism */
.loader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    background: url(img/back.png) center center / cover no-repeat #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader button {
    padding: 18px 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 800;
    border-radius: 50px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.loader button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255,255,255,0.4);
    border-color: rgba(255, 255, 255, 0.9);
}

.song {
    display: none;
}

img {
    width: 100%;
    max-width: 100%;
}

.balloon-border {
    position: fixed;
    top: 100%;
    opacity: 0.8;
    z-index: 1;
    pointer-events: none; /* Let clicks pass through */
}

/* Main Container Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 50px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    margin-top: 5vh;
    margin-bottom: 5vh;
    z-index: 10;
    position: relative;
}

.area {
    text-align: center;
    font-size: 4.5rem;
    color: #ffffff;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 0 30px rgba(255, 105, 180, 0.5);
    animation: pulseText 2s infinite alternate;
    margin: 30px 0;
}

@keyframes pulseText {
    0% { transform: scale(1); text-shadow: 0 0 15px rgba(255, 255, 255, 0.6); }
    100% { transform: scale(1.05); text-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 50px rgba(255, 105, 180, 0.8); }
}

#nae {
    text-transform: capitalize;
    color: #fff;
    font-style: normal;
    text-shadow: 0 0 15px rgba(255,255,255,0.8);
}

.type-wrap {
    font-size: 2rem;
    color: #4a4a4a;
    font-weight: 600;
    margin-bottom: 30px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.type-wrap h2 {
    font-weight: 600;
}

#typed {
    color: #fff;
    background: rgba(0,0,0,0.15);
    padding: 10px 25px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.cake {
    margin: 40px auto 0 auto;
    animation: floatCake 4s ease-in-out infinite;
    position: relative;
    z-index: 11;
    max-width: 320px;
}

@keyframes floatCake {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

#confetti {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 5;
    pointer-events: none;
}


/* -------------------------------------------
   INTERACTIVE FEATURES STYLES
---------------------------------------------- */

.cake-hint {
    font-size: 1.1rem;
    color: #fff;
    margin-top: 15px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0,0,0,0.6);
    animation: bounceText 2s infinite;
    cursor: pointer;
}

@keyframes bounceText {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.interactive-balloon {
    position: absolute;
    bottom: -150px;
    width: 60px;
    height: 80px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    box-shadow: inset -10px -10px 15px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.2);
    pointer-events: auto;
    cursor: pointer;
    animation: floatUp 10s linear forwards;
    transition: transform 0.1s;
    z-index: 12;
}

.interactive-balloon:active {
    transform: scale(0.85);
}

.interactive-balloon::before {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid currentColor;
}

.interactive-balloon::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.4);
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-60vh) rotate(5deg); }
    100% { transform: translateY(-130vh) rotate(-5deg); }
}


/* -------------------------------------------
   MOBILE RESPONSIVENESS
---------------------------------------------- */
@media (max-width: 768px) {
    .area {
        font-size: 2.8rem;
        letter-spacing: 2px;
        margin: 15px 0;
    }

    .type-wrap {
        font-size: 1.3rem;
        min-height: 90px;
        margin-bottom: 20px;
    }

    .loader button {
        font-size: 20px;
        padding: 12px 35px;
        letter-spacing: 2px;
    }

    .glass-card {
        padding: 30px 15px;
        margin-top: 2vh;
        margin-bottom: 2vh;
        border-radius: 20px;
    }

    .cake {
        max-width: 220px;
        margin-top: 20px;
    }

    .cake-hint {
        font-size: 0.95rem;
    }

    #typed {
        padding: 8px 15px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .area {
        font-size: 2.2rem;
    }
    
    .type-wrap {
        font-size: 1.1rem;
        min-height: 80px;
    }

    .glass-card {
        padding: 20px 10px;
    }
    
    .cake {
        max-width: 180px;
    }
}


/* Mini-Game Shake Animation */
.shake-animation {
    animation: shakeCard 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeCard {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}