@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Barrio&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bahianita&family=Young+Serif&display=swap');


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #f8f9ff, #f0f2f7);
    height: 100vh;
    color: #4a5568;
    cursor: url('selecao-botao.png') 12 12, auto;
}

/* =========================================
   SEÇÃO DO LIVRO - ELEMENTOS PRINCIPAIS
   ========================================= */

.inicio {
    height: 200px;
    width: 100%;
}

.livro {
    display: flex;
    flex-direction: row;
    width: 1700px;
    height: 1200px;
    padding: 0px 150px 200px 40px;
    background: url('imgs/background-diario.png') no-repeat center center;
    background-size: contain;
    align-self: center;
    justify-self: center;
    position: relative;
    transition: background 0.2s ease;
}

.intro-esquerda {
    display: none;
}

/* Estado do diário fechado */
.livro.fechado {
    background: url('imgs/diario-fechado.png') no-repeat center center;
    background-size: contain;
}

.livro.fechado .pag-esq,
.livro.fechado .pag-dir {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Botão para abrir o diário */
.botao-abrir-diario {
    position: absolute;
    top: 74%;
    left: 48%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 160px;
    background: url('imgs/menu/botao-voltar-diario-rebeca.png') no-repeat center center;
    background-size: contain;
    border: none;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.livro.fechado .botao-abrir-diario {
    opacity: 1;
    pointer-events: auto;
}

.botao-abrir-diario:hover {
    transform: translate(-50%, -50%) scale(1.05);
    transition: transform 0.2s ease;
}

.botao-abrir-diario:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.pag-esq {
    margin: 0px 0 0 -50px;
    left: 0px;
    width: 900px;
    height: 100%;
    top: 0px;
    background: rgba(245, 245, 245, 0);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2%;
    align-self: flex-start;
    justify-self: left;
}

/* =========================================
   PÁGINA ESQUERDA - PERFIL E INFORMAÇÕES
   ========================================= */

/* Seção de Perfil - 33% */
.perfil {
    flex: 0 0 26%;
    width: 73%;
    margin: 0 0 10px 100px;
    background: rgba(0, 0, 0, 0.089);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 15px;
}

/* Estilo para foto do perfil */
.perfil-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.perfil-img {
    width: 280px;
    height: auto;
    object-fit: fill;
    cursor: help;
}

/* Estilo para informações do perfil */
.perfil-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-left: 20px;
}

.perfil-info-nome {
    font-family: 'Bahianita', 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 9vw, 5.6rem);
    color: #2d3748;
    font-weight: 400;
    text-align: center;
    letter-spacing: 1px;
    cursor: help;
}

.perfil-info-base {
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    font-size: clamp(1.7rem, 2.8vw, 1.8rem);
    color: #4a5568;
    font-weight: 500;
    text-align: left;
}

/* Seção de Informações - 33% */
.infos {
    flex: 0 0 30%;
    width: 73%;
    margin: 0 0 10px 100px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 5px;
    padding: 2%;
    padding-bottom: 15px;
    background: rgba(0, 0, 0, 0.089);
    border-radius: 10px;
}

.infos-tipo,
.info-tipo {
    background: rgba(255, 255, 255, 0);
    border-radius: 8px;
    padding: 2%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.info-tipo-titulo {
    font-size: clamp(2.5rem, 6.5vw, 3rem);
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 3px;
    font-family: 'Bahianita', sans-serif;
    cursor: help;
    text-align: left;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.info-tipo-info {
    font-size: clamp(1.7rem, 2.8vw, 1.8rem);
    color: #4a5568;
    line-height: 1.4;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
}

/* Seção de Ciclos de Violência - 33% */
.ciclos {
    flex: 0 0 30%;
    width: 73%;
    margin: 0 0 0 100px;
    background: rgba(0, 0, 0, 0.089);
    border-radius: 10px;
    padding: 2%;
    padding-bottom: 15px;
    text-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ciclos-titulo {
    font-size: clamp(2.5rem, 7vw, 3.2rem);
    color: #2d3748;
    margin: 0 0 15px 0;
    font-weight: 700;
    font-family: 'Bahianita', sans-serif;
    cursor: help;
    background: rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.ciclos-img {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: clamp(8px, 1.5vw, 12px);
    align-items: start;
}

.ciclo-tipo {
    width: 100px;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
    cursor: url('selecao-botao.png') 12 12, pointer;
}

.ciclo-tipo:hover {
    transform: scale(1.1);
}

.pag-dir {
    width: 40%;
    height: 980px;
    align-self: flex-end;
    justify-self: flex-end;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-left: 60px;
    margin-top: 250px;
    position: relative;
}

/* MENU DO LIVRO */
.menu {
    display: flex;
    gap: 2%;
    justify-content: flex-start;
    align-items: center;
    flex-shrink: 0;
    height: 120px;
    width: 100%;
}

.botao-menu {
    width: 120px;
    height: 90px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
}

.botao-menu:hover {
    transform: scale(1.1);
    opacity: 1;
}

.botao-menu:nth-child(1) {
    background-image: url('imgs/menu/botao-perfil.png');
}

.botao-menu:nth-child(2) {
    background-image: url('imgs/menu/botao-historia.png');
}

.botao-menu:nth-child(3) {
    background-image: url('imgs/menu/botao-eventos.png');
}

.botao-menu:nth-child(4) {
    background-image: url('imgs/menu/botao-fechar.png');
}

/* TEXTO DA PÁGINA */
.texto-pag {
    flex: none;
    height: auto;
    max-height: 350px;
    background: rgba(255, 255, 255, 0);
    padding: 2%;
    font-size: clamp(1rem, 2.8vw, 1.3rem);
    line-height: 1.6;
    color: #2d3748;
    overflow-y: auto;
    min-height: fit-content;
}

.texto-pag .titulo-secao {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    color: #2d3748;
    margin-bottom: 15px;
    text-align: left;
    margin-top: 0;
    letter-spacing: 1px;
    line-height: 1.2;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estilo especial para o título de boas-vindas */
.texto-pag .titulo-secao.titulo-boas-vindas {
    font-size: clamp(4rem, 10vw, 6rem);
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.1;
    margin-bottom: 25px;
}

/* Estilo para títulos do tutorial */
.texto-pag .titulo-secao.titulo-tutorial {
    font-family: "Bahianita", sans-serif;
    font-size: clamp(5rem, 10vw, 6rem);
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
    margin-bottom: 20px;
    display: block;
    justify-content: center;
}

.texto-pag .descricao-secao {
    font-size: clamp(0.85rem, 2.3vw, 1.1rem);
    color: #718096;
    margin-bottom: 0;
    text-align: justify;
    line-height: 1.7;
    font-weight: 400;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
}

/* Estilo especial para a descrição de boas-vindas */
.texto-pag .descricao-secao.descricao-boas-vindas {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
    color: #4a5568;
}

/* Estilo para descrição do tutorial (aplica mesmo estilo da boas-vindas) */
.texto-pag .descricao-secao.descricao-tutorial {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
    color: #4a5568;
}

/* SEÇÃO DE ESCOLHAS */
.escolhas {
    background: rgba(255, 255, 255, 0);
    padding: 1.5%;
    flex-shrink: 0;
    height: 280px;
    max-height: 280px;
}

.texto-escolha {
    background: rgba(72, 187, 120, 0);
    padding: 1.5%;
    margin-bottom: 3px;
    font-size: clamp(0.85rem, 2.3vw, 1.1rem);
    color: #2d3748;
    font-weight: 400;
    line-height: 1.7;
    min-height: 320px;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
}

.opcoes-escolha {
    display: flex;
    gap: 3%;
    justify-content: center;
    height: 100%;
}

.botao-escolha {
    flex: 1;
    min-height: clamp(12px, 2.5vh, 22px);
    border: none;
    background: transparent;
    color: #2d3748;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 600;
    cursor: url('selecao-botao.png') 12 12, pointer;
    transition: all 0.3s ease;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    padding: 12px;
    margin: 1%;
    letter-spacing: 0.3px;
    border-radius: 12px;
    animation: pulse 2s infinite;
}

.botao-escolha:hover {
    transform: translateY(-4px) scale(1.05);
    animation: none;
}

.botao-escolha:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Estilos para imagens dentro dos botões de escolha */
.botao-escolha img {
    width: 100%;
    height: 100%;
    max-height: clamp(120px, 24vh, 180px);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* NAVEGAÇÃO ENTRE PÁGINAS */
.passar-pag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2%;
    flex-shrink: 0;
    height: 140px;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 0 3%;
}

.passar-pag-tras,
.passar-pag-frente {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
    height: clamp(120px, 20vh, 180px);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 500;
    color: #2d3748;
    padding: 0 2%;
    letter-spacing: 0.2px;
    opacity: 0.9;
}

.passar-pag-reset {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    min-width: 70px;
    max-width: 70px;
    border: none;
    border-radius: 50%;
    background: #8b2e2e;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
}

.passar-pag-tras {
    background-image: url('imgs/menu/botao-voltar.png');
}

.passar-pag-frente {
    background-image: url('imgs/menu/botao-avancar.png');
}

.passar-pag-reset svg {
    width: 36px;
    height: 36px;
    fill: #e3e3e3;
    pointer-events: none;
}

.passar-pag-reset:hover {
    background: #a33838;
    transform: scale(1.05);
}

.passar-pag-tras:hover,
.passar-pag-frente:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.passar-pag-reset:active {
    transform: scale(0.95);
    background: #6b2222;
}

.passar-pag-tras:active,
.passar-pag-frente:active {
    transform: translateY(-1px);
}

.passar-pag-reset:active {
    transform: translateY(-1px);
    box-shadow: 
        0 3px 6px rgba(107, 88, 67, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Estado desabilitado dos botões de navegação */
.passar-pag-tras:disabled,
.passar-pag-frente:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.passar-pag-tras:disabled {
    background-image: url('imgs/menu/botao-voltar-bloqueado.png');
}

.passar-pag-frente:disabled {
    background-image: url('imgs/menu/botao-avancar-bloqueado.png');
}

.passar-pag-tras:disabled:hover,
.passar-pag-frente:disabled:hover {
    transform: none;
}

/* RESPONSIVIDADE PARA O LIVRO */
@media (max-width: 768px) {
    .livro {
        flex-direction: column;
        background-size: cover;
    }
    
    .pag-esq {
        width: 100%;
        height: 20%;
    }
    
    .pag-dir {
        width: 100%;
        height: 80%;
        padding: 3%;
        gap: 3%;
    }
    
    .menu {
        justify-content: center;
        gap: 3%;
        height: 10%;
    }
    
    .texto-pag {
        flex: 1.5;
    }
    
    .escolhas {
        min-height: 120px;
        max-height: 30vh;
    }
    
    .texto-escolha {
        max-height: 80px;
    }
    
    .opcoes-escolha {
        flex-direction: column;
        gap: 2%;
    }
    
    .passar-pag {
        gap: 3%;
        height: 10%;
    }
}

@media (max-width: 480px) {
    .pag-esq {
        height: 15%;
    }
    
    .pag-dir {
        height: 85%;
        padding: 2%;
        gap: 2%;
    }
    
    .menu {
        height: 12%;
    }
    
    .escolhas {
        min-height: 100px;
        max-height: 35vh;
    }
    
    .texto-escolha {
        max-height: 60px;
        font-size: 0.75rem;
    }
    
    .passar-pag {
        height: 12%;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .livro {
        background-size: contain;
    }
    
    .pag-esq {
        height: 25%;
    }
    
    .pag-dir {
        height: 75%;
        gap: 1%;
    }
    
    .texto-pag {
        flex: 1.2;
    }
    
    .escolhas {
        min-height: 80px;
        max-height: 25vh;
    }
    
    .menu,
    .passar-pag {
        height: 15%;
    }
}

/* =========================================
   SISTEMA DE PONTUAÇÃO E TENTATIVAS
   ========================================= */

.info-tentativa {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    white-space: nowrap;
}

.info-tentativa span {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex: 1;
    justify-content: center;
}

.resultado-final, .historico-completo {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin: 10px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-height: 300px;
}

.resultado-final h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 24px;
}

.resultado-final p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.botao-resultado {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 8px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
}

.botao-resultado:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.botao-resultado:active {
    transform: translateY(0);
}

.historico {
    text-align: left;
    margin: 15px 0;
    padding: 15px;
    background: rgba(248, 249, 255, 0.8);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.historico h3 {
    margin-top: 0;
    color: #2d3748;
    text-align: center;
}

.historico p {
    margin: 8px 0;
    font-size: 14px;
}

.botoes-historico {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.historico-completo .historico {
    margin-bottom: 20px;
}

.historico-completo h2 {
    font-family: 'Bebas Neue', 'Arial Black', sans-serif;
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 1px;
}

.descricao-historico {
    font-size: 16px;
    color: #718096;
    text-align: center;
    margin-bottom: 25px;
    font-style: italic;
}

/* =========================================
   FIM DA SEÇÃO DO LIVRO
   ========================================= */

/* Estilo para capa dos capítulos */
.capa-capitulo {
    display: block;
    max-width: 180px;
    width: 180px;
    height: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    flex-shrink: 0;
}

.titulo-secao {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    width: 100%;
}

/* Tooltip personalizado que segue o cursor */
.custom-tooltip {
    position: fixed;
    background: white;
    color: #2d3748;
    padding: 12px 20px;
    border-radius: 12px;
    max-width: 350px;
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif;
    font-weight: 500;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    white-space: normal;
    border: 2px solid #e2e8f0;
}

.custom-tooltip.show {
    opacity: 1;
}

/* Animação de pulsação para botões de escolha */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}



