:root {
    --azul-zafiro: #0074D9;
    --azul-oscuro: #001f3f;
    --fuente-titulos: 'Trocchi', serif;
    --fuente-cuerpo: 'Open Sans', sans-serif;
}

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

body, html {
    width: 100%; height: 100%;
    background-color: black; color: white;
    font-family: var(--fuente-cuerpo);
    display: flex; flex-direction: column; overflow: hidden;
}

/* HEADER */
.header-navegacion {
    height: 70px; background: var(--azul-oscuro);
    border-bottom: 2px solid var(--azul-zafiro);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; flex-shrink: 0;
}

.btn-menu {
    background: transparent; border: none; color: white;
    font-family: var(--fuente-titulos); margin: 0 15px;
    cursor: pointer; font-size: 1.1rem;
}

/* ESTRUCTURA PRINCIPAL */
.contenedor-principal { 
    flex-grow: 1; 
    display: flex; 
    width: 100%; 
    overflow: hidden; 
}

.seccion-mapa { 
    flex: 0 0 70%; 
    position: relative; 
    background: #000; 
    overflow: hidden; 
}

#mapa-img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    opacity: 0.8;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform-origin 1.5s ease;
}

/* MARCADOR */
.indicador-mapa {
    position: absolute; 
    width: 24px; 
    height: 24px;
    background: var(--azul-zafiro); 
    border: 2px solid white; 
    border-radius: 50%;
    transform: translate(-50%, -50%); 
    display: none; 
    z-index: 10;
    box-shadow: 0 0 15px var(--azul-zafiro);
}

.etiqueta-mapa {
    position: absolute; 
    left: 35px; top: 50%; 
    transform: translateY(-50%);
    white-space: nowrap; 
    font-family: var(--fuente-titulos);
    background: rgba(0, 31, 63, 0.9); 
    padding: 5px 15px;
    border-radius: 4px; 
    border-left: 4px solid var(--azul-zafiro);
}

/* PANEL LATERAL DE TEXTO */
.seccion-texto { 
    flex: 0 0 30%; 
    background: #050505; 
    padding: 30px; 
    height: calc(100vh - 70px);
    overflow-y: auto; 
    display: flex;
    flex-direction: column;
    border-left: 1px solid #222;
}

.seccion-texto::-webkit-scrollbar { width: 6px; }
.seccion-texto::-webkit-scrollbar-thumb { background: var(--azul-zafiro); border-radius: 3px; }

/* NODOS */
.nodo-contenido { display: none; flex-direction: column; gap: 20px; min-height: 100%; }
.nodo-contenido.activo { display: flex; }

.titulo-eragon { 
    font-family: var(--fuente-titulos); 
    font-size: 3.5rem; 
    color: var(--azul-zafiro);
    border-bottom: 2px solid white; 
    padding-bottom: 10px;         
    margin-bottom: 5px;            
    display: inline-block;
}
.titulo-nodo { 
    font-family: var(--fuente-titulos); 
    font-size: 2.2rem; /* Un poco más pequeño que el principal */
    color: var(--azul-zafiro); /* El mismo azul de Eragon */
    border-bottom: 2px solid white; 
    padding-bottom: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

/* Nueva clase para el texto explicativo */
.texto-guia {
    font-style: italic;
    font-size: 0.85rem;
    color: #aaa; /* Un gris suave para que no compita con el texto principal */
    margin-bottom: 15px;
    display: block;
}

.cuerpo-texto p { 
    line-height: 1.6; 
    margin-bottom: 15px; 
    text-align: justify; 
    color: #ccc; 
    font-size: 0.95rem; }

/* TABS (Historia / Evolución) */
.contenedor-tabs { 
    display: flex; 
    gap: 5px; 
    margin-bottom: 15px; 
}

.tab-btn {
    flex: 1; 
    padding: 10px; 
    background: #111; 
    border: 1px solid var(--azul-zafiro);
    color: white; 
    cursor: pointer; 
    transition: 0.3s; 
    font-family: var(--fuente-titulos);
}
.tab-btn.activo { background: var(--azul-zafiro); box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }

.tab-contenido { display: none; animation: fadeIn 0.5s; }

.tab-contenido.activo { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* PERSONAJES E IMÁGENES */
.lista-evolucion { list-style: none; margin-bottom: 10px; }
.lista-evolucion li { margin-bottom: 10px; border-left: 3px solid var(--azul-zafiro); padding-left: 10px; }

.contenedor-img-personaje {
    width: 100%; border: 1px solid #333; padding: 4px; background: #111; margin-bottom: 10px;
}
.img-evolucion { width: 100%; height: auto; display: block; filter: contrast(1.1); }

.separador-personaje {
    border: 0; height: 1px; 
    background: linear-gradient(to right, transparent, var(--azul-zafiro), transparent);
    margin: 25px 0;
}

/* BOTONES DE NAVEGACIÓN */
.controles-navegacion {
    margin-top: auto; padding-top: 25px; display: flex; gap: 10px;
}

.btn-accion {
    flex: 2; padding: 14px; background: var(--azul-zafiro); color: white; border: none;
    font-family: var(--fuente-titulos); cursor: pointer; transition: 0.3s; font-size: 0.9rem;
}

.btn-secundario {
    flex: 1.2; padding: 14px; background: transparent; border: 1px solid white;
    color: white; font-family: var(--fuente-titulos); cursor: pointer; transition: 0.3s; font-size: 0.8rem;
}

.btn-accion:hover { background: #0056a3; transform: translateY(-2px); }
.btn-secundario:hover { background: white; color: black; }