@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

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

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

.big-flex {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

#initialContent, #newContent, #finalContent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 1s, transform 1s;
}

.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(100px);
    pointer-events: none; /* Prevents interaction with hidden elements */
}

button {
    padding: 15px 30px;
    font-size: 20px;
    color: #fff;
    background-color: #660066;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Gloria Hallelujah', cursive;
    animation: shake 1s infinite;
    transition: background-color 0.3s, transform 0.3s;
}

button:hover {
    background-color: #993399;
    transform: scale(1.1);
    animation: none;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.photo {
    margin: 20px;
    width: 30%;
    height: 30%;
}

.photo2 {
    animation: hop 1s infinite;
    margin: 20px;
}

.text-bubble {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin-top: 20px;
    position: relative;
}

.large-text-bubble {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin-top: 20px;
    position: relative;
}

.text-bubble::after, .large-text-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkTextCursor {
    from { border-right-color: rgba(0, 0, 0, 0.75); }
    to { border-right-color: transparent; }
}

#typedText, #finalText {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    font-family: 'Gloria Hallelujah', cursive;
}

#typedText {
    border-right: 0.15em solid black;
    animation: 
        typewriter 4s steps(44) 1s 1 normal both,
        blinkTextCursor 500ms steps(44) infinite normal;
}

#responseButtons {
    display: none;
    margin-top: 20px;
}

.response-button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 18px;
    color: #fff;
    background-color: #660066;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    font-family: 'Gloria Hallelujah', cursive;
    transition: background-color 0.3s, transform 0.3s;
}

.response-button:hover {
    background-color: #993399;
    transform: scale(1.1);
}

#noButton {
    position: absolute;
    transition: all 0.5s ease;
}
