body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f8ff;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.story-container {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    width: 100%;
}

#story-title {
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

.scene {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background-color: #f9f9f9;
}

#scene-image {
    max-width: 100%;
    height: auto;
    max-height: 350px; /* Adjusted for audio controls */
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #ccc;
    transition: transform 0.5s ease-in-out;
}

#scene-image.animate-jump {
    animation: jump 0.5s ease-in-out;
}

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

.text-area {
    margin-top: 10px;
}

.story-text {
    font-size: 1.2em;
    line-height: 1.6;
    color: #555;
    padding: 10px;
    border-radius: 5px;
    background-color: #eef;
    display: none; /* Initially hide both */
    margin-bottom: 10px;
}

.story-text.active-text {
    display: block; /* Show active language */
}

.story-text p {
    margin: 0 0 10px 0; /* Add margin below paragraph for button */
}

.play-pause-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 15px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}

.play-pause-button:hover {
    background-color: #0056b3;
}

.controls button {
    background-color: #5cb85c;
    color: white;
    border: none;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1em;
    margin: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.controls button:hover {
    background-color: #4cae4c;
}

.controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.moral-section {
    margin-top: 30px;
    padding: 15px;
    background-color: #fff8e1;
    border: 1px dashed #ffc107;
    border-radius: 8px;
    margin-bottom: 20px; /* Added margin for the new button */
}

.moral-section h2 {
    color: #e65100;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.moral-section p {
    font-size: 1.1em;
    color: #795548;
    line-height: 1.5;
    margin: 5px 0 10px 0;
}

#english-moral-container,
#chinese-moral-container {
    margin-bottom: 10px;
}

.interactive-button {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 15px;
}

.interactive-button:hover {
    background-color: #f57c00;
}

.interactive-page {
    padding: 20px;
    border: 2px solid #ffc107;
    border-radius: 10px;
    background-color: #fffaf0;
    margin-top: 20px;
}

.interactive-page h2 {
    color: #e65100;
    margin-bottom: 15px;
}

.interactive-page p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 10px;
}

.examples-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.examples-list li {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.examples-list li:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
}

.examples-list li.selected {
    background-color: #ffe0b2; /* Light orange for selected */
    border-color: #ffb74d;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 600px) {
    .story-container {
        padding: 15px;
    }
    #story-title {
        font-size: 1.5em;
    }
    .story-text {
        font-size: 1em;
    }
    .play-pause-button {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    .controls button {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .moral-section h2 {
        font-size: 1.3em;
    }
    .moral-section p {
        font-size: 1em;
    }
    .interactive-button {
        font-size: 0.9em;
        padding: 8px 15px;
    }
    .interactive-page h2 {
        font-size: 1.3em;
    }
    .interactive-page p {
        font-size: 1em;
    }
    .examples-list li {
        font-size: 0.95em;
        padding: 8px 12px;
    }
}

