body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 10%);
}

.card-container {
    perspective: 1000px;
    /* This gives the 3D effect */
}

.card {
    width: 90%;
    min-width: 320px;
    max-width: 900px;
    height: 90vh;
    max-height: 600px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 3s 1s;
    transform-origin: 50% 50%;
}

.card-back::-webkit-scrollbar {
    display: none;
    /* For Chrome, Safari, and newer Edge */
}

.card.is-flipped {
    transform: rotateY(180deg);
    /* Flip the card */
}

.card-back {
    position: absolute;
    width: 100%;
    min-width: 160px;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.flex {
    display: flex;
    align-items: center;
    /* Vertical alignment */
    justify-content: space-between;
    /* Horizontal alignment */
}

.card-front {
    position: absolute;
    width: 100%;
    min-width: 160px;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);

}

.card-front .balloon-crown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.balloon-foot-left {
    position: absolute;
    width: 40%;
    /* Adjust this to suit your image size */
    height: auto;
    object-fit: cover;
    bottom: 0;
    z-index: 10;
    transition: all 2s ease-in-out;
}

.cake {
    width: 30%;
    /* Adjust this to suit your image size */
    height: auto;
    object-fit: cover;
    z-index: 10;
}

.balloon-foot-child1 {
    left: 0%;
    /* First image */
}

.balloon-foot-child2 {
    left: 25%;
    /* Second image */
}

.balloon-foot-child3 {
    left: 50%;
    /* Third image */
}

.balloon-foot-child4 {
    left: 65%;
    /* Fourth image */
}

.card.is-flipped .balloon-foot-left {
    bottom: 100%;
    /* Move the balloons up, out of the view */
    opacity: 0;
    /* Fade out the balloons as they move */
}

/* Specific delays for each balloon */
.card.is-flipped .balloon-foot-child1 {
    transition-delay: 0s;
}

.card.is-flipped .balloon-foot-child2 {
    transition-delay: 0.2s;
    /* Delay second balloon */
}

.card.is-flipped .balloon-foot-child3 {
    transition-delay: 0.4s;
    /* Delay third balloon */
}

.card.is-flipped .balloon-foot-child4 {
    transition-delay: 0.6s;
    /* Delay fourth balloon */
}

.card-front {
    background: #ffe1e8;
    color: #333;
}

.card-back {
    background: #fff4e6;
    color: #444;
    transform: rotateY(180deg);
    overflow-y: scroll;
    padding: 40px;
    box-sizing: border-box;
}

.oleo-script-bold {
    font-family: "Oleo Script", system-ui;
    font-weight: 700;
    font-style: normal;
}

h1 {
    margin: 1px 0;
    font-size: 2em;
    text-align: center;
    z-index: 10;
}


p {
    font-size: 1.2em;
    line-height: 1.5em;
    text-align: center;
    font-family: "Edu AU VIC WA NT Hand", cursive;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1em;
    background-color: #ff4081;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #e53670;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
        /* Move up by 3px */
    }

    100% {
        transform: translateY(0);
    }
}

.bouncing {
    animation: bounce 2s ease-in-out infinite;
    /* Apply the bounce animation */
}