/* =========================================
   NAVBAR (ESTILO HORIZONTAL HSR)
   ========================================= */
.navbar {
    background: rgba(15, 17, 36, 0.85) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 128, 0.2);
    padding: 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Forzamos que el contenedor de links sea siempre una fila */
.navbar-nav {
    display: flex !important;
    flex-direction: row !important; 
    flex-wrap: nowrap !important;
    align-items: center;
}

.navbar-nav .nav-link {
    color: #8a91b4 !important;
    font-weight: 500;
    font-size: 14px;
    height: 55px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap; /* Evita que el texto salte de línea */
}

/* Efecto Activo */
.navbar-nav .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(0deg, rgba(63, 81, 181, 0.3) 0%, rgba(63, 81, 181, 0) 100%) !important;
    border-bottom: 3px solid #ffd780;
}

/* Efecto Hover */
.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05);
}

/* Icono de retroceder */
.back-icon {
    transition: transform 0.2s ease;
    color: #ffd780;
    display: block;
}

.nav-link:hover .back-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px #ffd780);
}

/* Separadores verticales */
.border-end {
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.navbar img {
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
    flex-shrink: 0;
}

/* ==========================================================================
   RESET Y BASES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1c1f46;
    color: #dbddef;
    font-family: "Roboto", sans-serif;
}

/* ==========================================================================
   ESTRUCTURA Y CONTENEDORES
   ========================================================================== */
.container {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.padre, .padre1, .padre2, .padre3, .padre6, .padre9 {
    background-color: rgb(34, 35, 94);
    margin: 10px auto;
    border-radius: 8px;
}

.padre { width: 100%; max-width: 550px; padding: 15px; display: flex; justify-content: center; }
.padre1 { width: 95%; max-width: 900px; padding: 20px; }
.padre2, .padre3 { flex: 1; min-width: 300px; padding: 20px; }

/* ==========================================================================
   CABECERA Y MATERIALES
   ========================================================================== */
.character-data { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 20px; flex-wrap: wrap; }
.character-portrait { width: 120px; height: auto; border-radius: 10px; border: 2px solid #ffd780; }
.character-title { text-align: left; }
.character-name { font-size: 2rem; color: white; margin-bottom: 10px; }
.character-data-wrapper { display: flex; gap: 15px; }
.character-path { display: flex; align-items: center; background: rgba(255, 255, 255, 0.1); padding: 5px 12px; border-radius: 20px; font-size: 0.9rem; }
.character-path-icon { width: 20px; height: 20px; margin-right: 8px; }

.materiales-container { display: flex; flex-direction: row; gap: 15px; width: 100%; justify-content: center; margin-top: 10px; }
.character-info-materials-name { flex: 1; display: flex; align-items: center; justify-content: space-between; background-color: #2d3268; padding: 10px 15px; border-radius: 4px; }
.character-info-materials-icon1 { height: 30px; width: auto; }
.character-info-materials-title1 { color: #ffd780; margin-bottom: 15px; }

/* ==========================================================================
   SISTEMA DE EQUIPAMIENTO Y RAREZAS
   ========================================================================== */
.character-info-weapon {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #2d3268;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 4px solid transparent;
}

.character-info-weapon:hover { background-color: #353b7a; }

.lc-rarity-5 {
    border-bottom-color: #ffb13f !important;
    box-shadow: inset 0 -8px 8px -10px #ffb13f;
}

.lc-rarity-4 {
    border-bottom-color: #a35dff !important;
    box-shadow: inset 0 -8px 8px -10px #a35dff;
}

.rank-number { background-color: #1a1b41; color: #4fa8ff; font-weight: bold; padding: 4px 10px; border-radius: 4px; margin-right: 12px; font-size: 0.9rem; }
.character-info-weapon-icon { height: 45px; margin-right: 15px; border-radius: 4px; }
.character-info-weapon-name { text-align: left; font-size: 0.95rem; color: white; }

/* ==========================================================================
   TOOLTIPS (ESTILO HSR - DUAL: RELIQUIAS Y ARMAS)
   ========================================================================== */
.relic-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    width: 350px;
    background-color: #121331; 
    border: 1px solid #3182ce;
    border-radius: 6px;
    padding: 18px; /* Padding base */
    text-align: left;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    line-height: 1.4;
}

.character-info-weapon:hover .relic-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0px);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.tooltip-title-area {
    display: flex;
    flex-direction: column;
}

/* --- ESTILO PARA ARMAS (EL EXTRA QUE PEDISTE) --- */
.tooltip-weapon-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.weapon-icon-bg {
    background-color: rgba(0, 0, 0, 0.3); /* Cuadradito oscuro */
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
}

.mini-weapon-icon {
    width: 22px;
    height: 22px;
}

.weapon-main-stat {
    color: #4fa8ff; /* Azul del DEF / ATK */
    font-weight: bold;
    font-size: 1.1rem;
}

.tooltip-footer-border {
    height: 5px;
    background-color: #f29e24; /* Línea naranja de arma 5* */
    margin: 18px -18px -18px -18px; /* Ajuste para que pegue al borde */
    border-radius: 0 0 6px 6px;
}

/* --- ESTILO PARA RELIQUIAS (SE QUEDA COMO ANTES) --- */
.artifact-type {
    color: #8fa3ff;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.tooltip-header h4 {
    color: #ffffff; /* Nombre siempre en blanco para ambos */
    font-size: 1.2rem;
    margin: 0;
    font-weight: bold;
}

.tooltip-img-side {
    height: 55px;
    width: auto;
    object-fit: contain;
}

/* Bonus de piezas 2 y 4 */
.bonus-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    align-items: flex-start;
}

.bonus-num {
    background: #00a19a;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.bonus-text {
    color: #dbddef;
    font-size: 0.95rem;
}

.stat-blue {
    color: #4fa8ff !important;
    font-weight: bold;
}
/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 850px) {
    .eidolon-grid { grid-template-columns: 1fr; }
    .materiales-container { flex-direction: column; }
    .relic-tooltip { width: 280px; font-size: 0.85rem; left: 50%; bottom: 110%; }
    .character-data { flex-direction: column; text-align: center; }
    .character-title { text-align: center; }
}