/* storyAnimation.css */

#story-container {
    position: absolute;
    width: 100%;
    max-width: 600px;
    min-height: 100%;
    margin-top: 0px;
    display: none;
    align-items: center;
    justify-content: flex-start;
    background-color: #f5f5f5;
    overflow: hidden;
    flex-direction: column;
}

#startAdventureButton {
    position: absolute;
    bottom: 20px;
    /* width: 200px; */
    height: 50px;
    display: block;
    margin-block: 10px;
    margin-inline: auto;
    border: 2px solid black;
    /* padding: 10px; */
    color: black;
    background-color: transparent;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

#startAdventureButton:hover{
    background-color: black;
    color:white;
}

/* Adjust button position for mobile screens */
@media screen and (max-width: 767px) {
    #startAdventureButton {
        bottom: 90px; /* Adjust upwards to account for mobile browser UI */
    }
}

.typed-text {
    font-family: 'Dancing Script', cursive;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    /* border-right: 0.15em solid orange; */
    animation: typing 2s steps(30, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent
    }

    50% {
        border-color: orange;
    }
}

.story-image {
    max-width: 50%;
    max-height: 50%;
    filter: grayscale(90%);
    opacity: 0%;
    max-width: calc(min(80vw,500px));
    height: auto;
    /* margin-top: 50px; */
    /* left: 25%; */
    display: block;
    margin-left: auto;
    margin-right: auto;
    opacity: 100%;
    border-radius: 50%;
    transition: opacity 5s ease-in-out;
}

.image-fade-in {
    opacity: 0%;
    animation: image-fade-in 8s 0s 1 ease-in forwards;
}

.image-fade-out {
    animation: image-fade-out 3s ease-in forwards;
}


@keyframes image-fade-in {
    0% {
        opacity: 0%;
        transform: scale(100%);
    }

    50% {
        opacity: 15%;
    }

    100% {
        opacity: 100%;
        transform: scale(110%);
    }
}

@keyframes image-fade-out {
    from {
        opacity: 100%;
        transform: scale(110%);
    }

    to {
        opacity: 0;
        transform: scale(110%);
    }
}

.text-fade-in {
    opacity: 0;
    animation: text-fade-in 1s forwards;
}

.text-fade-out {
    opacity: 0;
    animation: text-fade-out 2s forwards;
}

@keyframes text-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes text-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

