body {
    font-family: 'Lora', sans-serif;
    padding: 10px;
    padding-bottom: 20px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    /* Stack child elements vertically */
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
}

.storybook {
    text-align: center;
    width: 100%;
    /* Ensure full available width */
    background-color: #ffffff;
    padding: 20px;
    padding-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    /* Ensure padding and border are included in width */
}

h1 {
    font-family: 'Lora', sans-serif;
    font-size: 30px;
    color: black;
    font-weight: 500;
    margin-bottom: 20px;
}

h2 {
    font-family: 'Alegreya', serif;
    margin: 10px;
    font-size: 35px;
}

p {
    font-size: 24px;
    line-height: 1.6;
    color: #333333;
    text-align: justify;
    margin: 5px;
}

p::first-letter {
    font-size: 54px;
    font-weight: bold;
    color: #ff4057;
    margin-right: 5px;
    margin-left: 10px;
    line-height: 1;
}

.no-first-letter::first-letter {
    font-size: 16px;
    font-weight: normal;
    color: initial;
    margin-right: 4px;
}

button {
    background-color: #ff4057;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 24px;
    font-family: 'Algreya', serif;
    border-radius: 25px;
    box-shadow: inset 0px -3px 0px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
}

button:hover {
    background-color: #ff6078;
    box-shadow: inset 0px -3px 0px rgba(0, 0, 0, 0), 0px 5px 15px rgba(0, 0, 0, 0.2);
}

button:active {
    background-color: #ff3d58;
    box-shadow: inset 0px 3px 5px rgba(0, 0, 0, 0.3);
}

.storybook {
    opacity: 1;
}

.fade-in {
    opacity: 1;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.quiz-container {
    margin-top: 20px;
    text-align: center;
}

.quiz-question,
.quiz-option {
    margin-bottom: 10px;
}

.quiz-correct {
    margin-top: 15px;
    color: green;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 36px;
    }

    p {
        font-size: 20px;
    }

    .storybook {
        width: 100%;
        padding: 10px;
    }

    button {
        font-style: bold;
        font-size: 20px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 30px;
    }

    p {
        font-size: 20px;
    }

    .storybook {
        width: 100%;
        padding: 12px;
    }

    button {
        font-size: 18px;
        padding: 8px 14px;
    }
}

.storybook img.rounded-image {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    margin: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .storybook img.rounded-image {
        max-width: 360px;
    }
}

@media (max-width: 480px) {
    .storybook img.rounded-image {
        max-width: 300px;
    }
}

footer {
    font-family: 'Balsamiq Sans', sans-serif;
    background-color: #f8f9fa;
    padding: 20px 0;
    text-align: center;
    color: #333333;
    width: 100%;
    box-sizing: border-box;
    /* Ensures footer spans the full width */
}

footer a {
    color: #ff4057;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

footer p {
    font-size: 18px;
}

footer a:hover {
    color: #ff6078;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    footer {
        padding: 15px 0;
    }

    footer p {
        font-size: 14px;
    }

    footer a {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 10px 0;
    }

    footer p {
        font-size: 12px
    }

    footer a {
        font-size: 12px;
    }
}

header {
    width: 100%;
    background-color: #ff4057;
    /* Matches button color */
    color: white;
    padding: 10px 0;
    text-align: center;
}

.header-content {
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-sizing: border-box;
}

header h2 {
    font-family: 'Algreya', serif;
    margin: 10px;
    font-size: 30px;
    font-weight: 500;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-family: 'Fredoka One' cursive;
    font-size: 16px;
}

nav a:hover {
    text-decoration: none;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h2 {
        font-size: 30px;
    }

    nav a {
        font-size: 18px;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
    }

    nav a {
        margin: 5px 0;
        font-size: 18px;
    }
}

#player-container-text {
    display: none;
    margin: 2px;
    font-size: 22px;
    color: red;
    /* Correct property for font color */
    animation: fadeInOut 8s infinite;
}

@keyframes fadeInOut {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

/* Responsive styling */
@media only screen and (max-width: 600px) {
    #player-container {
        font-size: 22px;
        /* Adjust the font size for mobile devices */
    }
}
