* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    user-select: none;
}

.wrapper {
    overflow: hidden;
    width: 100vw;
    height: 100dvh;
}

.page-container {
    display: flex;
    flex-direction: row;
    transition: transform 0.5s ease-in-out;
    width: 700vw; /* Six pages' width to match the number of pages */
    height: 100dvh;
}

.page {
    position: relative;
    overflow: hidden;
    width: 100vw;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #000; /* Debug border to visualize the pages */
}

.youare {
    position: absolute;
    width: 100vw;
    top: 20px;
    text-align: center;
    font-size: 3em;
    font-weight: bold;
}

.message {
    font-size: 4em;
    position: absolute;
    top: 1.85em;
    z-index: 1;
}

.image {
    z-index: 0;
}

.fade-in {
    opacity: 1 !important;
    transition: opacity 2s ease-in;
}

.cursive {
    font-family: 'Pacifico', cursive;
}


.text {
    width: 100vw;
    height: 100px;
}

.speech-bubble {
    --bubble-bg: #f0f0f0;
    --bubble-border: #ccc;
    --tail-size: 12px; /* Reduced by 25% from 15px */
    
    position: absolute;
    background-color: var(--bubble-bg);
    border: 2px solid var(--bubble-border);
    border-radius: 10px;
    padding: 15px 20px;
    max-width: 250px;
    font-size: 1rem;
    color: #333;
    margin-bottom: calc(var(--tail-size) * 2); /* Space for the tail */
    text-align: center;
    font-family: 'Pacifico', cursive;
}

.speech-bubble p {
    margin: 0;
}

.speech-bubble::after,
.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: calc(var(--tail-size) * -0.95); /* Move tail up a bit */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
}

.speech-bubble::after {
    border-width: var(--tail-size) var(--tail-size) 0 var(--tail-size);
    border-color: var(--bubble-bg) transparent transparent transparent;
}

.speech-bubble::before {
    bottom: calc((var(--tail-size) * -1) - 2px); /* Align with border */
    border-width: calc(var(--tail-size) + 2px) calc(var(--tail-size) + 2px) 0 calc(var(--tail-size) + 2px);
    border-color: var(--bubble-border) transparent transparent transparent;
}

.swipe-bubble {
    position: absolute;
    bottom: 50px;
    background-color: rgba(240, 240, 240, 0.8); /* Semi-transparent background */
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 15px 20px;
    max-width: 250px;
    text-align: center;
    font-size: 1.2rem;
    color: #333;
    animation: oscillate 1s ease-in-out infinite; /* Oscillation animation */
    display: flex; /* Use flexbox */
    align-items: center; /* Center items vertically */
}

.swipe-text {
    display: flex; /* Use flexbox */
    align-items: center; /* Center arrow vertically */
    margin: 0; /* Reset margin */
    padding: 0; /* Reset padding */
}

.fancy-arrow {
    display: inline-block;
    width: 0; 
    height: 0; 
    border-top: 10px solid transparent; /* Triangle arrow */
    border-bottom: 10px solid transparent;
    border-left: 15px solid #333; /* Color of the arrow */
    margin-left: 8px; /* Space between text and arrow */
    /* No additional margin for precise alignment */
}

@keyframes oscillate {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px); /* Move up */
    }
    100% {
        transform: translateY(0); /* Return to original position */
    }
}

.kidsAlternate {
    animation: alternateOpacity 2s infinite;
}

#kidsA, #kidsC {
    animation-delay: 0s;
}

#kidsB, #kidsD  {
    animation-delay: 1s;
}

@keyframes alternateOpacity {
    0%, 50% {
        opacity: 1;
    }
    50.01%, 100% {
        opacity: 0;
    }
}

.kick {
    transform: rotateY(0deg) !important;
    transition: transform 1s ease-in;
}

#restart {
    position: absolute;
    border: 3px solid indianred;
    border-radius: 5px;
    background-color: #6d363650;
    bottom: 20px;
    left: 20px;
    padding: 5px;
    opacity: 0;
    font-weight: bold;
    user-select: none;
}