/* style.css - A Magia Visual do Portal */

/* --- Variáveis e Configurações Globais --- */
:root {
    --bg-main: #0D0D0D;
    --bg-contrast: #1F4007;
    --text-main: #51735A;
    --text-light: rgba(255, 255, 255, 0.85);
    --highlight-green-vibrant: #67A608;
    --highlight-green-olive: #3D7307;

    --font-title: 'Cinzel Decorative', cursive; /* Alternativa para Annabel 1 */
    --font-body: 'Cinzel', serif; /* Alternativa para Trajan Pro 3 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Estilização da barra de rolagem para Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--text-main) #1a1a1a;
}

/* --- Estilização Global da Barra de Rolagem (Navegadores WebKit) --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #111; /* Um tom escuro que combina com o fundo */
}

::-webkit-scrollbar-thumb {
    background-color: var(--text-main); /* Verde escuro sutil */
    border-radius: 10px;
    border: 2px solid #111; /* Cria um efeito de espaçamento */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--highlight-green-olive); /* Verde mais claro ao passar o mouse */
}

body {
    background-color: var(--bg-main);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h2 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-main);
    max-width: 700px;
    margin: -0.5rem auto 3rem auto;
    font-style: italic;
}

.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    left: -9999px;
    top: -9999px;
}

.content-section {
    padding: 6rem 0;
    position: relative;
    background-color: var(--bg-main);
    overflow-x: hidden; /* Previne que elementos filhos causem scroll horizontal */
}

/* Garante que o conteúdo fique sobre o overlay do background com parallax */
.countdown-section .container,
#autora .container,
#sinopse .container,
#mapa .container {
    position: relative;
    z-index: 1;
}

/* --- Seção 1: Hero --- */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-image: url('public/Capa/Capa-limpa.jpeg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Efeito Parallax */
    overflow-x: hidden; /* Previne que elementos filhos (como partículas) causem scroll horizontal */
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 1rem;
}

.main-title {
    font-family: var(--font-title);
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #d4af37, #f0e68c, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    letter-spacing: 2px;
}

.author-name {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    font-style: italic;
}

.cta-button, .cta-button-secondary {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.cta-button {
    background: linear-gradient(135deg, var(--highlight-green-olive), var(--highlight-green-vibrant));
    color: var(--text-light);
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--highlight-green-vibrant), var(--highlight-green-olive));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(103, 166, 8, 0.3);
}

/* Estilo aprimorado para o botão CTA principal no Hero */
.hero-content .cta-button {
    padding: 15px 40px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(103, 166, 8, 0.25), 
                inset 0 -2px 4px rgba(0,0,0,0.3);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-content .cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(103, 166, 8, 0.4),
                inset 0 -2px 4px rgba(0,0,0,0.2);
}

.hero-content .cta-button i {
    font-size: 1.3rem;
}

/* --- Seção 2: Sinopse --- */
#sinopse {
    background-image: url('public/Capa/Capa-limpa.jpeg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

#sinopse::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 13, 13, 0.85); /* Overlay escuro para legibilidade */
    z-index: 0;
}

.synopsis-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.kindle-mockup {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.synopsis-column-right h2 {
    text-align: left;
}

.synopsis-tagline {
    font-style: italic;
    font-weight: 700;
    color: var(--highlight-green-vibrant);
    font-size: 1.2rem;
    line-height: 1.4;
}

.synopsis-column-right p {
    font-size: 1.1rem;
    color: var(--text-main);
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.synopsis-column-right p:last-child {
    margin-bottom: 0;
}

/* --- Seção 2.5: Detalhes do Livro --- */
.book-details-section {
    background-color: var(--bg-main);
}

.details-list {
    list-style: none;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.details-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--text-main);
}

.details-list li:last-child {
    border-bottom: none;
}

.details-list strong {
    color: var(--text-light);
    margin-right: 0.5rem;
}

.mini-countdown {
    font-size: 0.9rem;
    color: var(--text-main);
    margin-top: 0.5rem;
    font-style: italic;
}

/* --- Seção 2.6: Livro 3D Interativo --- */
#livro-3d {
    background-color: #111;
}

.book-3d-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
    background: var(--bg-main);
    border: 1px solid var(--text-main);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#book-canvas-container {
    width: 100%;
    height: 450px; /* Altura fixa para o canvas */
    cursor: grab;
}

#book-canvas-container:active {
    cursor: grabbing;
}

.book-3d-info {
    text-align: left;
}

.book-3d-info h3 {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.book-3d-info p {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.rating-placeholder {
    margin-bottom: 2rem;
    color: #FFC107; /* Amarelo para estrelas */
    font-size: 1.2rem;
}

.rating-placeholder span {
    color: var(--text-main);
    font-size: 1rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.book-3d-info .cta-button {
    width: 100%;
    text-align: center;
}
/* --- Seção 2.7: Personagens --- */
#personagens {
    background-color: var(--bg-main);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.character-card {
    background-color: transparent;
    aspect-ratio: 3 / 4;
    perspective: 1000px;
    cursor: pointer;
}

.character-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border-radius: 10px;
}

/* Vira o card ao adicionar a classe .is-flipped (controlado por JS para cliques) */
.character-card.is-flipped .character-card-inner {
    transform: rotateY(180deg);
}

/* Mantém o efeito de hover para dispositivos com mouse, para uma melhor experiência no desktop */
@media (hover: hover) and (pointer: fine) {
    .character-card:hover .character-card-inner {
        transform: rotateY(180deg);
    }
}

.character-card-front, .character-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.character-card-front {
    background-color: #1a1a1a;
    color: white;
}

.character-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%) contrast(110%);
}

.character-card-front h3 {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem 1rem 1rem 1rem;
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.5rem;
}

.character-card-back {
    background-color: #fdfaf1; /* Cor de pergaminho, para consistência com o livro */
    color: #3d3222; /* Cor de tinta escura para melhor legibilidade */
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alinha ao topo para permitir rolagem */
    align-items: center;
    border: 1px solid #d4c8af;
    overflow-y: auto; /* Adiciona rolagem se o texto for muito longo */

    /* Estilização da barra de rolagem para Firefox */
    scrollbar-width: thin;
    scrollbar-color: #998a70 transparent; /* Cor de tinta envelhecida */
}

/* Estilização da barra de rolagem para Chrome, Safari e Edge */
.character-card-back::-webkit-scrollbar {
  width: 8px;
}

.character-card-back::-webkit-scrollbar-track {
  background: transparent;
}

.character-card-back::-webkit-scrollbar-thumb {
  background-color: #998a70; /* Cor de tinta envelhecida */
  border-radius: 10px;
}

.character-card-back::-webkit-scrollbar-thumb:hover {
  background-color: #5c4b33; /* Cor mais escura no hover */
}

.character-card-back h4 {
    font-family: var(--font-title);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #5c4b33; /* Cor de tinta mais escura para o título */
}

.character-card-back p {
    font-family: 'Times New Roman', Times, serif; /* Fonte mais legível para texto longo */
    font-size: 1rem;
    line-height: 1.6;
    text-align: left; /* Melhora a legibilidade de parágrafos */
}

.flip-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background-color: rgba(13, 13, 13, 0.7);
    border: 1px solid var(--text-main);
    color: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem; /* Levemente menor para não ser tão chamativo */
    transition: all 0.4s ease;
    opacity: 0.8;
    z-index: 5; /* Garante que fique acima da imagem */
    animation: gentle-pulse 3s infinite ease-in-out;
}

@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    }
}

.character-card:hover .flip-indicator, .character-card.is-flipped .flip-indicator {
    transform: rotate(360deg);
    background-color: var(--highlight-green-vibrant);
    color: var(--bg-main);
    animation: none; /* Pausa a animação de pulso no hover/clique */
}

/* --- Seção 3: Galeria --- */
.gallery-featured-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.gallery-main-image {
    width: 100%;
    max-width: 800px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.gallery-main-image img {
    width: 100%;
    display: block;
    transition: opacity 0.4s ease-in-out;
    cursor: pointer; /* Indica que a imagem principal é clicável */
}

.gallery-main-image img {
    width: 100%;
    display: block;
    transition: opacity 0.4s ease-in-out;
}

.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-thumbnail-item {
    width: 120px;
    height: 80px;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.gallery-thumbnail-item.active,
.gallery-thumbnail-item:hover {
    border-color: var(--highlight-green-vibrant);
    transform: scale(1.05);
}

.gallery-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Seção 3.2: Mapa Interativo --- */
#mapa {
    background-image: url('public/Capa/Capa-limpa.jpeg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

#mapa::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 13, 13, 0.85); /* Overlay escuro para legibilidade */
    z-index: 0;
}

.map-container {
    position: relative;
    max-width: 900px;
    margin: 2rem auto 0;
    border: 3px solid var(--text-main);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.4s ease-in-out;
}

.map-interactive-area {
    position: relative;
    width: 100%;
    /* A proporção da imagem do mapa é 2048 / 1450 */
    aspect-ratio: 2048 / 1450;
    border-radius: 5px; /* Para corresponder ao raio interno do contêiner pai */
    overflow: hidden;
}

.map-container.maximized {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    border: none;
    z-index: 1000;
    background-color: rgba(13, 13, 13, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.map-container.maximized .map-interactive-area {
    width: 100%;
    height: 100%;
    /* Garante que a área interativa não exceda as dimensões da viewport, mantendo a proporção */
    max-width: calc(100vh * (2048 / 1450));
    max-height: calc(100vw / (2048 / 1450));
    border-radius: 0;
}

.map-container.maximized .map-image {
    filter: none;
}

.map-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: sepia(30%) contrast(110%) brightness(0.9);
}

.map-control-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 12; /* Acima da área interativa e da info-box */
    background: rgba(13, 13, 13, 0.7);
    border: 1px solid var(--text-main);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.map-control-btn:hover {
    background: rgba(103, 166, 8, 0.7);
}

.map-container.maximized .map-control-btn {
    top: 20px;
    right: 20px;
}

.hotspot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--highlight-green-vibrant);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: transform 0.3s ease;
    animation: pulse 2s infinite;
}

.hotspot:hover {
    transform: translate(-50%, -50%) scale(1.3);
    animation-play-state: paused;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(103, 166, 8, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(103, 166, 8, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(103, 166, 8, 0);
    }
}

@keyframes pulse-mobile {
    0% {
        box-shadow: 0 0 0 0 rgba(103, 166, 8, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(103, 166, 8, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(103, 166, 8, 0);
    }
}

.map-info-box {
    position: absolute;
    display: none; /* Controlado por JS */
    width: 250px;
    background: rgba(13, 13, 13, 0.95);
    border: 1px solid var(--highlight-green-olive);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
    z-index: 11; /* Acima dos hotspots */
    color: var(--text-light);
    transform: translate(-50%, -110%); /* Posiciona acima do hotspot */
}

.map-info-box h4 {
    font-family: var(--font-title);
    color: var(--highlight-green-vibrant);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.map-info-box p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: var(--text-light);
}


/* --- Seção 3.4: Grimório --- */
#grimorio {
    background-color: var(--bg-main);
}

.accordion {
    max-width: 700px;
    margin: 2rem auto 0;
}

.accordion-item {
    border-bottom: 1px solid var(--text-main);
}

.accordion-item:first-child {
    border-top: 1px solid var(--text-main);
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem 1rem;
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--text-light);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: rgba(103, 166, 8, 0.1);
}

.accordion-header::after {
    content: '+';
    font-size: 2rem;
    font-weight: 300;
    color: var(--highlight-green-olive);
    transition: transform 0.3s ease;
}

.accordion-header.active::after {
    content: '−';
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #0a0a0a;
}

.accordion-content p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- Seção 3.4.5: Livro de História --- */
#historia-livro {
    background-color: var(--bg-main);
}

.book-wrapper {
    position: relative;
    margin-top: 2rem;
}

/* Estilos para o livro com PageFlip.js */
#flipbook-wrapper {
    /* A altura será definida pela proporção do livro */
    width: 90%;
    max-width: 1000px; /* Largura do livro aberto */
    margin: 0 auto;
}

#flipbook {
    /* A biblioteca controla o tamanho, mas podemos dar uma proporção */
    aspect-ratio: 2 / 1.34;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#flipbook .page {
    background-color: #fdfaf1;
    color: #3d3222;
    border: 1px solid #ded8c8;
}

#flipbook .page-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 2rem 2.5rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    /* 
      Sistema de fonte fluida: 
      A fonte se ajusta ao tamanho da tela para evitar que o texto vaze.
      Mínimo de 0.8rem, ideal de 1.6vw, máximo de 1rem.
    */
    font-size: clamp(0.8rem, 1.6vw, 1rem);
    line-height: 1.7;
    overflow-y: auto; /* GARANTIA: Adiciona rolagem apenas se o texto vazar */

    /* Estilização da barra de rolagem para Firefox */
    scrollbar-width: thin;
    scrollbar-color: #998a70 transparent; /* Cor de tinta envelhecida */
}

/* Estilização da barra de rolagem para Chrome, Safari e Edge */
#flipbook .page-content::-webkit-scrollbar {
  width: 8px;
}

#flipbook .page-content::-webkit-scrollbar-track {
  background: transparent;
}

#flipbook .page-content::-webkit-scrollbar-thumb {
  background-color: #998a70; /* Cor de tinta envelhecida */
  border-radius: 10px;
}

#flipbook .page-content::-webkit-scrollbar-thumb:hover {
    background-color: #5c4b33; /* Cor mais escura no hover */
}

#flipbook .page-content p {
    margin-bottom: 1rem;
}

#flipbook .page--cover .page-content {
    padding: 0;
}

#flipbook .page--cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-number {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #998a70;
}

.book-controls {
    /* Os botões serão posicionados absolutamente em relação ao .book-wrapper */
}

#prev-page-btn, #next-page-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(13, 13, 13, 0.7);
    border: 1px solid var(--text-main);
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

#prev-page-btn { left: 0; }
#next-page-btn { right: 0; }

#prev-page-btn:hover:not(:disabled), #next-page-btn:hover:not(:disabled) {
    background: var(--highlight-green-vibrant);
    transform: translateY(-50%) scale(1.1);
}

#prev-page-btn:disabled, #next-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Seção 3.4.1: Quiz Interativo --- */
#quiz {
    background-color: #111;
}

.quiz-container {
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 3rem;
    background: var(--bg-main);
    border: 1px solid var(--text-main);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-selection-screen {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.quiz-choice-card {
    flex: 1;
    padding: 2rem;
    border: 2px solid var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quiz-choice-card:hover {
    border-color: var(--highlight-green-vibrant);
    background-color: rgba(103, 166, 8, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(103, 166, 8, 0.1);
}

.quiz-choice-card i {
    font-size: 2.5rem;
    color: var(--highlight-green-vibrant);
    margin-bottom: 1rem;
}

.quiz-choice-card h3 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.quiz-choice-card p {
    color: var(--text-main);
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

#quiz-question-screen {
    width: 100%;
}

#quiz-question-text {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    line-height: 1.4;
}

.quiz-answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.quiz-answer-btn {
    background-color: transparent;
    border: 2px solid var(--text-main);
    color: var(--text-light);
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%; /* Garante que os botões tenham a mesma altura */
}

.quiz-answer-btn:hover {
    background-color: var(--highlight-green-olive);
    border-color: var(--highlight-green-vibrant);
    transform: translateY(-3px);
}

.quiz-result {
    animation: fade-in 0.5s ease-in-out;
}

.quiz-result-content h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    margin-bottom: 0.5rem;
}

#result-class-name {
    font-family: var(--font-title);
    font-size: 2.5rem;
    color: var(--highlight-green-vibrant);
    margin-bottom: 1rem;
}

#result-class-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

#result-class-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.quiz-share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.share-btn.share {
    background: linear-gradient(135deg, var(--highlight-green-olive), var(--highlight-green-vibrant));
    color: var(--text-light);
}
.share-btn.share:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--highlight-green-vibrant), var(--highlight-green-olive));
    transform: translateY(-3px);
}

.share-btn:disabled {
    cursor: wait;
    background: var(--text-main);
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-btn.download {
    background-color: var(--text-main);
    color: var(--text-light);
}
.share-btn.download:hover:not(:disabled) { 
    background-color: var(--highlight-green-olive); 
    transform: translateY(-3px);
}

.result-char-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    border: 4px solid var(--highlight-green-olive);
    margin-bottom: 1rem;
}

.result-char-reason {
    background-color: #111;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--highlight-green-vibrant);
    text-align: left;
    margin-bottom: 1.5rem;
}

.result-char-reason h5 {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.result-char-reason p {
    color: var(--text-main);
}

/* --- Seção 3.4.6: O Oráculo de Arvanis --- */
#oraculo {
    background-color: #111;
    text-align: center;
}

.oracle-container {
    max-width: 700px;
    margin: 2rem auto 0;
    padding: 3rem 2rem;
    background: var(--bg-main);
    border: 1px solid var(--text-main);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
}

.oracle-trigger {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem auto;
    border: 2px solid var(--highlight-green-olive);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(103, 166, 8, 0.3), inset 0 0 10px rgba(103, 166, 8, 0.2);
}

.oracle-trigger i {
    font-size: 2.5rem;
    color: var(--highlight-green-vibrant);
    transition: color 0.3s ease;
}

.oracle-trigger:hover {
    transform: scale(1.1);
    border-color: var(--highlight-green-vibrant);
    box-shadow: 0 0 25px rgba(103, 166, 8, 0.5), inset 0 0 15px rgba(103, 166, 8, 0.3);
}

.oracle-trigger.active {
    animation: oracle-pulse 0.8s ease;
}

@keyframes oracle-pulse {
    0% { transform: scale(1.1); }
    50% { transform: scale(1.2); box-shadow: 0 0 35px rgba(103, 166, 8, 0.7); }
    100% { transform: scale(1.1); }
}

.oracle-cta-text {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2rem;
    animation: fade-in-out 4s infinite ease-in-out;
}

@keyframes oracle-pulse {
    0% { transform: scale(1.1); }
    50% { transform: scale(1.2); box-shadow: 0 0 35px rgba(103, 166, 8, 0.7); }
    100% { transform: scale(1.1); }
}

.oracle-quote-wrapper {
    min-height: 80px; /* Evita que o layout pule */
    display: flex;
    align-items: center;
    justify-content: center;
}

#oracle-quote {
    font-family: var(--font-title);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-light);
    line-height: 1.5;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#oracle-quote.fading {
    opacity: 0;
}

/* --- Seção 3.5: Contagem Regressiva --- */
.countdown-section {
    background-image: url('public/Capa/Capa-limpa.jpeg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

.countdown-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 13, 13, 0.85); /* Overlay escuro para legibilidade */
    z-index: 0;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    text-align: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    border: 1px solid var(--text-main);
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(103, 166, 8, 0.2);
}

.countdown-item span {
    font-family: var(--font-body);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    display: block;
    line-height: 1;
}

.countdown-label {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--text-main);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Seção 4: Pré-Venda --- */
#pre-venda {
    text-align: center;
}

.store-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.store-logos img {
    height: 40px;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.store-logos a:hover img {
    opacity: 1;
    filter: none;
}

.store-logos .fab.fa-amazon {
    font-size: 50px;
    color: var(--text-light);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.store-logos a:hover .fab.fa-amazon {
    opacity: 1;
    color: #FF9900; /* Cor oficial da Amazon */
}

.community-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background-color: #1a1a1a;
    border-radius: 8px;
    border-top: 4px solid var(--highlight-green-vibrant);
}

.community-section h3 {
    font-family: var(--font-title);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.community-section p {
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.community-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.community-link i {
    font-size: 1.4rem;
}

.community-link.discord {
    background-color: #5865F2;
    color: #fff;
}
.community-link.discord:hover {
    background-color: #4a56d1;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
}

.community-link.whatsapp {
    background-color: #25D366;
    color: #fff;
}
.community-link.whatsapp:hover {
    background-color: #1ebe5a;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}
.cta-button-secondary {
    background-color: var(--highlight-green-olive);
    color: var(--text-light);
}

.cta-button-secondary:hover {
    background-color: var(--highlight-green-vibrant);
    color: var(--bg-main);
}

/* --- Seção 5: Sobre a Autora --- */
#autora {
    background-image: url('public/Capa/Capa-limpa.jpeg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}

#autora::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 13, 13, 0.85); /* Overlay escuro para legibilidade */
    z-index: 0;
}

.author-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: center;
}

.author-photo img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--text-main);
}

.author-bio h2 {
    text-align: left;
}

/* --- Rodapé --- */
.footer-section {
    padding: 3rem 0;
    text-align: center;
    background-color: #000;
}

.social-icons {
    margin-bottom: 1rem;
}

.social-icons a {
    color: var(--text-main);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--highlight-green-vibrant);
}

/* --- Funcionalidade: Botão Voltar ao Topo --- */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--highlight-green-vibrant);
    color: var(--bg-main);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(103, 166, 8, 0.4);
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: var(--highlight-green-olive);
    transform: scale(1.1);
}

/* --- Funcionalidade: Lightbox (Galeria Ampliada) --- */
.lightbox {
    position: fixed;
    z-index: 1001; /* Acima do mapa maximizado */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 13, 13, 0.95);
    display: none; /* Controlado por JS */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: lightbox-fade-in 0.4s ease;
}

@keyframes lightbox-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 90vw;
    max-height: 80vh;
}

.lightbox-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    animation: lightbox-zoom-in 0.4s ease;
}

@keyframes lightbox-zoom-in {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
}

.lightbox-prev, .lightbox-next {
    padding: 16px;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    color: var(--highlight-green-vibrant);
}

.lightbox-caption {
    margin-top: 15px;
    color: var(--text-main);
    font-size: 1.1rem;
    font-style: italic;
    text-align: center;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem; /* Reduz um pouco o padding lateral */
    }

    /*
     * CORREÇÃO PARA BACKGROUND EM DISPOSITIVOS MÓVEIS:
     * A propriedade `background-attachment: fixed;` (que cria o efeito parallax)
     * é conhecida por causar problemas em navegadores mobile, resultando em um
     * 'zoom' excessivo e inesperado na imagem de fundo.
     * A solução é alterar para `background-attachment: scroll;` em telas menores.
     * Isso faz com que a imagem role com a página (apenas no mobile),
     * corrigindo o bug de renderização sem afetar o efeito no desktop.
    */
    .hero-section,
    #sinopse,
    #mapa,
    .countdown-section,
    #autora {
        background-attachment: scroll;
    }

    h2 {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .main-title {
        font-size: 3.5rem; /* Ajuste para melhor visualização */
    }

    .subtitle {
        font-size: 1.2rem;
    }

    /* Ajusta o botão principal no hero para telas menores */
    .hero-content .cta-button {
        padding: 12px 30px;
        font-size: 1.1rem;
    }

    .hotspot {
        width: 16px;
        height: 16px;
        border-width: 1.5px;
        animation-name: pulse-mobile;
    }

    #flipbook-wrapper {
        width: 100%;
        max-width: 500px; /* Limita a largura em tablets para melhor visualização */
    }

    #flipbook {
        /* Altera a proporção para uma única página em modo retrato */
        aspect-ratio: 500 / 670;
    }

    .book-controls {
        display: flex;
        justify-content: center;
        gap: 2rem;
        margin-top: 2rem;
    }
    #prev-page-btn, #next-page-btn {
        position: static;
        transform: none;
    }

    #flipbook .page-content {
        padding: 1.5rem;
        /* Ajusta a faixa da fonte fluida para telas menores */
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        line-height: 1.6;
    }

    .synopsis-layout, .author-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem; /* Reduz o espaçamento quando empilhado */
    }

    .synopsis-column-left, .author-photo {
        margin: 0 auto 2rem auto;
    }

    .synopsis-column-right h2, .author-bio h2 {
        text-align: center;
    }

    /* Reduz o tamanho da fonte de parágrafos para melhor leitura */
    .synopsis-column-right p, .details-list {
        font-size: 1rem;
    }

    .synopsis-tagline {
        font-size: 1.1rem;
    }

    .book-3d-wrapper {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    #book-canvas-container {
        height: 350px; /* Altura menor para mobile */
        margin-bottom: 2rem;
    }

    .book-3d-info { text-align: center; }
    /* Padding do verso do card de personagem */
    .character-card-back {
        padding: 1.5rem;
    }

    /* Miniaturas da galeria */
    .gallery-thumbnail-item {
        width: 100px;
        height: 66px;
    }

    /* Mapa Interativo - Correção para evitar overflow */
    .map-info-box {
        /* Altera o posicionamento para um layout mobile mais robusto */
        left: 5% !important;
        right: 5% !important;
        top: 10px !important;
        width: auto !important; /* Deixa o 'left' e 'right' definirem a largura */
        transform: none !important; /* Reseta a transformação que causava o problema */
        padding: 1.2rem;
        max-height: 40%;
        overflow-y: auto;
    }

    .close-button { /* Botão de fechar maior para facilitar o toque */
        top: 8px;
        right: 8px;
        font-size: 1.8rem;
    }

    .quiz-answers {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .quiz-selection-screen {
        flex-direction: column;
        gap: 1.5rem;
    }

    /* Accordion (Grimório) */
    .accordion-header {
        font-size: 1.1rem;
        padding: 1.2rem 1rem;
    }

    .store-logos {
        flex-direction: column;
        gap: 2.5rem;
    }

    .countdown-item {
        padding: 1rem 1.5rem;
        min-width: 100px;
    }

    .countdown-item span {
        font-size: 2.5rem;
    }

    .back-to-top-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        bottom: 20px;
        right: 20px;
    }

    .lightbox-content-wrapper { max-height: 70vh; }
}

@media (max-width: 480px) {
    .content-section {
        padding: 4rem 0; /* Reduz o espaçamento vertical */
    }

    .main-title {
        font-size: 2.4rem; /* Reduzido para telas muito estreitas */
        line-height: 1.2; /* Melhora o espaçamento se quebrar linha */
    }

    .subtitle {
        font-size: 1rem;
    }

    .author-photo img {
        width: 150px;
        height: 150px;
    }

    .community-section {
        padding: 2rem 1.5rem;
    }

    .countdown-timer {
        gap: 1rem;
    }
    .countdown-item {
        flex-basis: calc(50% - 0.5rem); /* Dois itens por linha */
        margin-bottom: 1rem;
        padding: 1rem;
        min-width: auto;
    }

    .countdown-item span {
        font-size: 2.2rem;
    }

    .community-links {
        flex-direction: column;
    }

    .quiz-container {
        padding: 2rem 1.5rem;
    }

    #quiz-question-text {
        font-size: 1.3rem;
    }

    .lightbox-prev, .lightbox-next {
        /* Esconde as setas em telas muito pequenas para não poluir, a navegação por teclado ainda funciona */
        display: none;
    }

    .lightbox-content-wrapper { max-width: 95vw; }
}