* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #fff 0%, #fff6a4 100%);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left {
    font-weight: bold;
    font-size: 18px;
    color: #FFE082;
}

.nav-center {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #FFE082;
}

/* Main */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
}

.main-title {
    color: #444;
    text-align: left;
    font-size: 36px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Fábula Container */
.fabula-container {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.fabula-container:hover {
    transform: translateY(-2px);
}

.fabula-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #FFE082 0%, #FFE082 100%);
    transition: background 0.3s ease;
}

.fabula-header:hover {
    background: linear-gradient(135deg, #FFD54F 0%, #FFE082 100%);
}

.fabula-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.fabula-thumb {
    width: 100px;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    border: 3px solid #FFD54F;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.fabula-title {
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

.toggle-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
    color: #666;
}

/* Conteúdo expansível */
.fabula-content {
    display: none;
    padding: 30px;
    background: #fafafa;
    border-top: 2px solid #eee;
}

.fabula-content.active {
    display: block;
}

.fabula-text {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #FFD54F;
}

/* Vídeo */
.video-section {
    margin-bottom: 30px;
}

.video-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Carrossel */
.carousel-section {
    margin-top: 30px;
}

.carousel-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    /* Mesmo tamanho da div do vídeo */
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.carousel-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-images img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    background: rgba(255, 213, 79, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-btn:hover:not(:disabled) {
    background: rgba(255, 193, 7, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:disabled {
    background: rgba(204, 204, 204, 0.6);
    cursor: not-allowed;
    box-shadow: none;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #FFD54F;
    transform: scale(1.3);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: white;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: #FFE082;
}

.autores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.autor-card {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.autor-card h4 {
    color: #FFE082;
    margin-bottom: 10px;
    font-size: 18px;
}

.autor-card p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.autor-bio {
    font-style: italic;
    opacity: 0.8;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 14px;
    opacity: 0.7;
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }
    
    .nav-left, .nav-center {
        width: 100%;
        text-align: center;
    }
    
    .main-title {
        font-size: 28px;
        text-align: center;
    }
    
    .fabula-header {
        padding: 15px;
    }
    
    .fabula-thumb {
        width: 60px;
        height: 60px;
    }
    
    .fabula-title {
        font-size: 16px;
    }
    
    .fabula-content {
        padding: 15px;
    }
    
    .carousel-images img {
        min-width: 150px;
        height: 100px;
    }
    
    .autores-grid {
        grid-template-columns: 1fr;
    }
}

/* Efeito de entrada - Livro mágico */
.magic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0a2e 0%, #2d1b69 50%, #4a2c8a 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeOutOverlay 0.8s ease-in-out 2.5s forwards;
}

.magic-book {
    position: relative;
    width: 200px;
    height: 150px;
    perspective: 1000px;
}

.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #6B3410 100%);
    border-radius: 5px 15px 15px 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform-origin: left center;
    animation: openBook 1.5s ease-in-out 0.5s forwards;
    overflow: hidden;
}

.book-cover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,215,0,0.1) 50%, transparent 100%);
}

.book-pages {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #f5e6d3;
    border-radius: 5px 15px 15px 5px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
    transform: rotateY(0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.book-pages::before {
    content: '📚';
    font-size: 60px;
    animation: floatIcon 2s ease-in-out infinite;
}

/* Estrelas mágicas */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkleStar 1.5s ease-in-out infinite;
}

.star:nth-child(1) { width: 3px; height: 3px; left: 10%; top: 20%; animation-delay: 0s; }
.star:nth-child(2) { width: 2px; height: 2px; left: 25%; top: 45%; animation-delay: 0.2s; }
.star:nth-child(3) { width: 4px; height: 4px; left: 40%; top: 15%; animation-delay: 0.4s; }
.star:nth-child(4) { width: 2px; height: 2px; left: 55%; top: 60%; animation-delay: 0.6s; }
.star:nth-child(5) { width: 3px; height: 3px; left: 70%; top: 30%; animation-delay: 0.8s; }
.star:nth-child(6) { width: 2px; height: 2px; left: 85%; top: 50%; animation-delay: 1s; }
.star:nth-child(7) { width: 4px; height: 4px; left: 15%; top: 75%; animation-delay: 1.2s; }
.star:nth-child(8) { width: 3px; height: 3px; left: 50%; top: 80%; animation-delay: 1.4s; }
.star:nth-child(9) { width: 2px; height: 2px; left: 75%; top: 10%; animation-delay: 0.3s; }
.star:nth-child(10) { width: 3px; height: 3px; left: 90%; top: 70%; animation-delay: 0.7s; }

/* Partículas mágicas */
.magic-particles {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
}

.particle {
    position: absolute;
    font-size: 20px;
    animation: floatParticle 2s ease-out forwards;
    opacity: 0;
}

.particle:nth-child(1) { animation-delay: 1s; }
.particle:nth-child(2) { animation-delay: 1.2s; }
.particle:nth-child(3) { animation-delay: 1.4s; }
.particle:nth-child(4) { animation-delay: 1.6s; }
.particle:nth-child(5) { animation-delay: 1.8s; }
.particle:nth-child(6) { animation-delay: 2s; }

@keyframes openBook {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

@keyframes fadeOutOverlay {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes twinkleStar {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatParticle {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* Abertura Mágica - 5 segundos */
.magic-opening {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0d0628 0%, #000000 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: closeOpening 0.5s ease-in-out 4.5s forwards;
}

/* Livro 3D */
.book-container {
    position: relative;
    width: 250px;
    height: 180px;
    perspective: 1200px;
    animation: floatBook 3s ease-in-out infinite;
}

.book {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: initialBookAppear 1s ease-out 0s forwards,
               openBookMagic 1.5s ease-in-out 1s forwards;
}

/* Capa do livro */
.book-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 30%, #A0522D 60%, #6B3410 100%);
    border-radius: 5px 20px 20px 5px;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.8),
        inset 0 2px 5px rgba(255,255,255,0.2),
        0 0 30px rgba(255,215,0,0.3);
    transform-origin: left center;
    overflow: hidden;
    border: 3px solid #DAA520;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, transparent 40%, rgba(255,215,0,0.3) 45%, transparent 50%),
        linear-gradient(135deg, rgba(255,215,0,0.2) 0%, transparent 20%);
}

/* Detalhes dourados na capa */
.book-cover::after {
    content: 'FÁBULAS';
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%) rotate(-90deg);
    color: #FFD700;
    font-family: 'Georgia', serif;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
    letter-spacing: 5px;
}

/* Páginas do livro */
.book-pages-container {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #FFF8DC;
    border-radius: 3px 18px 18px 3px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.1);
    transform: rotateY(0deg);
    overflow: hidden;
    border: 2px solid #DEB887;
}

.book-pages-container::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid #DEB887;
    border-radius: 2px;
}

/* Centro do livro de onde saem as estrelas */
.book-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    z-index: 10;
}

.glow-point {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 
        0 0 20px #FFD700,
        0 0 40px #FFA500,
        0 0 60px #FFD700,
        0 0 80px #FFA500;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Estrelas grandes */
.big-stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

.big-star {
    position: absolute;
    font-size: 50px;
    animation: bigStarBurst 2s ease-out forwards;
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.8));
}

.big-star:nth-child(1) { 
    animation-delay: 2.2s; 
    left: 50%; 
    top: 50%;
    --angle: 0deg;
    --distance: 0px;
    animation: bigStarBurst1 2.5s ease-out 2.2s forwards;
}
.big-star:nth-child(2) { 
    animation-delay: 2.3s; 
    left: 50%; 
    top: 50%;
    animation: bigStarBurst2 2.5s ease-out 2.3s forwards;
}
.big-star:nth-child(3) { 
    animation-delay: 2.4s; 
    left: 50%; 
    top: 50%;
    animation: bigStarBurst3 2.5s ease-out 2.4s forwards;
}
.big-star:nth-child(4) { 
    animation-delay: 2.5s; 
    left: 50%; 
    top: 50%;
    animation: bigStarBurst4 2.5s ease-out 2.5s forwards;
}
.big-star:nth-child(5) { 
    animation-delay: 2.6s; 
    left: 50%; 
    top: 50%;
    animation: bigStarBurst5 2.5s ease-out 2.6s forwards;
}
.big-star:nth-child(6) { 
    animation-delay: 2.7s; 
    left: 50%; 
    top: 50%;
    animation: bigStarBurst6 2.5s ease-out 2.7s forwards;
}
.big-star:nth-child(7) { 
    animation-delay: 2.8s; 
    left: 50%; 
    top: 50%;
    animation: bigStarBurst7 2.5s ease-out 2.8s forwards;
}
.big-star:nth-child(8) { 
    animation-delay: 2.9s; 
    left: 50%; 
    top: 50%;
    animation: bigStarBurst8 2.5s ease-out 2.9s forwards;
}

/* Pequenas estrelas cintilantes */
.tiny-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.tiny-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: twinkle 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* Animação do livro aparecendo */
@keyframes initialBookAppear {
    0% {
        transform: scale(0) rotateY(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

/* Animação do livro abrindo */
@keyframes openBookMagic {
    0% {
        transform: scale(1) rotateY(0deg);
    }
    100% {
        transform: scale(1.3) rotateY(-180deg);
    }
}

/* Animação do livro flutuando */
@keyframes floatBook {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulsar do brilho central */
@keyframes pulseGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.8;
    }
}

/* Estrelas grandes explodindo em diferentes direções */
@keyframes bigStarBurst1 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-200px, -300px) scale(3);
    }
}

@keyframes bigStarBurst2 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(250px, -280px) scale(3);
    }
}

@keyframes bigStarBurst3 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-300px, 150px) scale(3);
    }
}

@keyframes bigStarBurst4 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(280px, 200px) scale(3);
    }
}

@keyframes bigStarBurst5 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-150px, -350px) scale(3);
    }
}

@keyframes bigStarBurst6 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(180px, -320px) scale(3);
    }
}

@keyframes bigStarBurst7 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(-250px, 250px) scale(3);
    }
}

@keyframes bigStarBurst8 {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, 0) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translate(220px, 280px) scale(3);
    }
}

/* Fechamento da abertura */
@keyframes closeOpening {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Brilho das estrelas pequenas */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(2);
    }
}