* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent;}

body {
    height: 85vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #ffe4e1;
}

.bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #a1c4fd, #fbc2eb);
    background-size: 400% 400%;
    animation: moveGradient 10s infinite alternate;
    transition: filter 1.5s ease;
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

body.grayscale-mode .bg-wrapper {
    filter: grayscale(1) brightness(0.7);
}
body.grayscale-mode .card {
    filter: grayscale(1);
    background: rgba(255, 255, 255, 0.6);
}

.container {
    width: 90%;
    max-width: 350px;
    height: 500px;
    position: relative;
    perspective: 1000px;
}

.card {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    
    opacity: 0;
    visibility: hidden;
    transform: rotateY(20deg) translateZ(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card.active {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0) translateZ(0);
}

.emoji-large {
    font-size: 5.5rem;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
}

.floating { animation: float 3s ease-in-out infinite; }
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.pulse { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

#game-area { width: 100%; height: 200px; position: relative; margin-top: 10px; }
#moving-heart { 
    position: absolute; 
    font-size: 5rem;
    cursor: pointer; 
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    left: 35%;
    animation: heartHover 1.5s ease-in-out infinite; 
    filter: drop-shadow(0 10px 15px rgba(255,0,0,0.2));
}
@keyframes heartHover {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.cookie { 
    font-size: 8rem;
    cursor: pointer; 
    transition: 0.3s ease; 
    display: inline-block; 
    animation: cookieShake 4s infinite;
}
@keyframes cookieShake {
    0%, 90%, 100% { transform: rotate(0); }
    93% { transform: rotate(10deg); }
    96% { transform: rotate(-10deg); }
}
.cookie:hover { transform: scale(1.1); }

.floating { animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.pulse { animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }


h2 { color: #444; font-size: 1.4rem; margin-bottom: 15px; }
p { color: #666; font-size: 0.95rem; line-height: 1.5; }
.dancing { font-family: 'Dancing Script', cursive; font-size: 2.2rem; color: #ff6b81; }
.dancing-big { font-family: 'Dancing Script', cursive; font-size: 3rem; color: #ff6b81; }


.btn-3d {
    margin-top: 25px;
    background: #ff6b81;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 107, 129, 0.4);
    transition: 0.3s;
}
.btn-3d:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 107, 129, 0.6); }


.progress-bar {
    width: 100%; height: 10px; background: rgba(0,0,0,0.05);
    border-radius: 5px; margin: 20px 0; overflow: hidden;
}
.fill { height: 100%; background: #ff6b81; width: 0; transition: width 0.1s; }
.fill.infinite { width: 30%; animation: infiniteSlide 1.5s infinite linear; }
@keyframes infiniteSlide {
    0% { margin-left: -30%; } 100% { margin-left: 100%; }
}

.hidden { display: none; }
.hidden-fade { opacity: 0; transition: 1s; }
.praise-grid span {
    display: inline-block;
    background: white;
    padding: 5px 12px;
    border-radius: 15px;
    margin: 5px;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.birthday-text { font-family: 'Dancing Script', cursive; font-size: 1.8rem; }
.birthday-text span { color: #ff6b81; font-size: 3rem; }

#confetti { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 1000; }