/* Main Storybook Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f8ff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.book-container {
    width: 90%;
    height: 80vh;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    perspective: 1500px;
}

#book {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.page {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-content {
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-header {
    margin-bottom: 20px;
}

.page-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-image {
    max-width: 80%;
    max-height: 60%;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.page-footer {
    margin-top: 20px;
    font-style: italic;
    color: #7f8c8d;
}

.navigation {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
}

.nav-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.nav-button:hover {
    background-color: #2980b9;
}

.nav-button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.control-button {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 0 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.control-button:hover {
    background-color: #27ae60;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .book-container {
        height: 70vh;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .page {
        padding: 15px;
    }
    
    .page-image {
        max-width: 90%;
    }
}

/* Animation effects */
.turn-animation {
    transition: transform 0.5s ease;
}

/* Character styles */
.character {
    display: inline-block;
    margin: 10px;
    text-align: center;
}

.character img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3498db;
}

.character-name {
    margin-top: 5px;
    font-weight: bold;
}

/* Code blocks */
.code-block {
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    font-family: 'Courier New', Courier, monospace;
    text-align: left;
    overflow-x: auto;
}

/* Concept highlight */
.concept-highlight {
    background-color: #fffacd;
    border-left: 4px solid #f1c40f;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 0 5px 5px 0;
}

/* Sound controls */
.sound-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sound-button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #3498db;
}

.sound-button:hover {
    color: #2980b9;
}
