/* General Body Styling */
body {
    font-family: 'Comic Neue', cursive, sans-serif;
    background: linear-gradient(135deg, #a8e6cf, #dcedc1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* Main Storybook Container */
#storybook-container {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 30px;
    max-width: 800px;
    width: 100%;
    text-align: center;
    border: 5px solid #ffaaa5;
}

#storybook-title {
    color: #ff6b6b;
    font-size: 2.5em;
    margin-bottom: 20px;
}

/* Page Content (Image and Text) */
#page-container {
    margin-bottom: 25px;
}

#story-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid #ffd3b6;
    margin-bottom: 20px;
    transition: transform 0.3s ease-in-out;
}

#story-image:hover {
    transform: scale(1.02);
}

#story-text {
    font-size: 1.4em;
    line-height: 1.6;
    color: #575757;
    text-align: left;
    padding: 0 15px;
}

/* Navigation and Audio Controls */
#navigation-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.nav-button, .audio-button {
    font-family: 'Comic Neue', cursive, sans-serif;
    font-weight: 700;
    font-size: 1.1em;
    padding: 12px 25px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-button {
    background-color: #ffaaa5;
    color: white;
}

.nav-button:hover:not(:disabled) {
    background-color: #ff8b80;
    transform: translateY(-2px);
}

.nav-button:disabled {
    background-color: #dcdcdc;
    cursor: not-allowed;
    opacity: 0.7;
}

.audio-button {
    background-color: #8ce1a9;
    color: white;
    flex-grow: 1; /* Allows it to take more space */
    justify-content: center;
}

.audio-button:hover {
    background-color: #76c893;
    transform: translateY(-2px);
}

.audio-button .play-icon, .audio-button .pause-icon {
    font-size: 1.2em;
}

/* Responsive Design for Smaller Screens */
@media (max-width: 600px) {
    #storybook-container {
        padding: 20px;
    }

    #storybook-title {
        font-size: 2em;
    }

    #story-text {
        font-size: 1.2em;
    }

    #navigation-controls {
        flex-direction: column;
    }

    .nav-button, .audio-button {
        width: 100%;
    }
}