/* Leo the Lion Cub's Great Adventure - Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

/* Container */
.storybook-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Header */
.story-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(45deg, #ff9a56, #ffad56);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255, 154, 86, 0.3);
}

.story-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.story-subtitle {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Story Pages */
.story-main {
    position: relative;
    min-height: 600px;
    margin-bottom: 30px;
}

.story-page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.story-page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.story-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Illustrations */
.illustration-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #f7f1e3, #fdf6e3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.story-illustration {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.story-illustration:hover {
    transform: scale(1.02);
}

/* Story Text */
.story-text {
    padding: 10px;
}

.page-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #e67e22;
    margin-bottom: 20px;
    text-align: center;
}

.story-text p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: justify;
    color: #34495e;
    line-height: 1.7;
}

/* Navigation */
.story-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    margin-bottom: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    border: none;
    border-radius: 25px;
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    font-weight: 700;
    color: #2980b9;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover:not(:disabled) {
    background: #ecf0f1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.nav-icon {
    font-size: 1.2rem;
}

/* Page Controls */
.page-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.page-indicator {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    color: #2980b9;
    font-size: 1rem;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    gap: 10px;
}

.audio-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #e74c3c;
    border: none;
    border-radius: 20px;
    font-family: 'Comic Neue', cursive;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.audio-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.audio-icon {
    font-size: 1rem;
}

/* Footer */
.story-footer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    border-radius: 15px;
    color: #fff;
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
}

.story-footer p {
    margin-bottom: 5px;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .storybook-container {
        margin: 10px;
        padding: 15px;
    }
    
    .story-title {
        font-size: 2rem;
    }
    
    .story-subtitle {
        font-size: 1rem;
    }
    
    .story-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .story-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .page-controls {
        order: -1;
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }
    
    .audio-controls {
        flex-direction: column;
        gap: 5px;
    }
    
    .audio-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .story-title {
        font-size: 1.5rem;
    }
    
    .page-title {
        font-size: 1.4rem;
    }
    
    .story-text p {
        font-size: 1rem;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.nav-btn:focus,
.audio-btn:focus {
    outline: 3px solid #f39c12;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .storybook-container {
        box-shadow: none;
        background: white;
    }
    
    .story-navigation,
    .audio-controls {
        display: none;
    }
    
    .story-page {
        display: block !important;
        page-break-after: always;
    }
    
    .story-page:last-child {
        page-break-after: avoid;
    }
}