body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
}

.cake-container {
    position: relative;
    width: 200px;
    height: 250px;
}

.cake-layer {
    position: absolute;
    width: 100%;
    background-color: #f5c6cb; /* Pink Cake */
    border-radius: 10px;
    left: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    cursor: pointer;
}

.bottom {
    height: 80px;
    bottom: 0;
}

.middle {
    height: 60px;
    bottom: 80px;
    transform: scaleX(0.9);
}

.top {
    height: 40px;
    bottom: 140px;
    transform: scaleX(0.8);
}

.cake-layer.eaten {
    transform: scaleY(0) scaleX(0);
    opacity: 0;
}

.candle-container {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
}

.candle {
    width: 8px;
    height: 30px;
    background-color: #ffffff;
    border-radius: 2px;
    position: relative;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.flame {
    position: absolute;
    width: 6px;
    height: 12px;
    background-color: #ffcc00;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    top: -10px;
    left: 1px;
    animation: flicker 1s infinite alternate;
}

@keyframes flicker {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
        opacity: 0.8;
    }
}