/* --- VARIABLES GLOBALES --- */
:root {
    --bg-principal: #1c1f46;
    --bg-filtros: rgba(23, 26, 56, 0.95);
    --borde-sutil: rgba(255, 255, 255, 0.1); /* Ajustado para que se note la división */
    --dorado-genshin: #ffe14c; 
    --texto-apagado: #6a6f8e;
    
    /* Colores de Estado */
    --color-completo: #4caf50;
    --color-revision: #00bcd4;
    --color-vacio: #9e9e9e;
    --color-new: #ffc107;
    
    /* Gradientes Genshin (Restaurados) */
    --rarity-5-bg: linear-gradient(180deg, #bb7e39 0%, #4a3621 100%);
    --rarity-4-bg: linear-gradient(180deg, #9063ae 0%, #352a46 100%);
}

body {
    background-color: var(--bg-principal);
    color: #dbddef;
    font-family: "Roboto", sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* =========================================
   NAVBAR (Tu código original)
   ========================================= */
.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;
}

.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;
}

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

.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;
}

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

/* =========================================
   ZONA DE FILTROS (ESTILO UNIFICADO / IMAGEN 2)
   ========================================= */

/* --- CONTENEDOR PRINCIPAL (Fila Única) --- */
.filters {
    display: flex;
    flex-direction: row; /* Todo en una línea como en Honkai */
    flex-wrap: wrap;    /* Para que no se rompa en pantallas chicas */
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    padding: 0 10px;
}

/* --- BLOQUES DE FILTROS --- */
.filters-list {
    background-color: rgba(23, 26, 56, 0.6); /* Más transparente y elegante */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    padding: 0;
    overflow: hidden;
}

/* CADA BOTÓN (Icono o Texto) */
.filters .filters-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;      /* Más bajito, como en Honkai */
    min-width: 38px;
    padding: 0 10px;
    cursor: pointer;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.2s;
}

.filters .filters-item:last-child { border-right: none; }

/* ICONOS PEQUEÑOS Y ELEGANTES */
.filters .filters-item img {
    width: 20px !important; 
    height: 20px !important;
    opacity: 0.4;
    filter: grayscale(100%) brightness(0.8);
}

/* --- ESTADO ACTIVO (Línea Dorada Vertical) --- */
.filters .filters-item.active {
    background-color: rgba(255, 255, 255, 0.08);
}

.filters .filters-item.active img {
    opacity: 1;
    filter: none;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

/* Línea dorada vertical idéntica a Honkai */
.filters .filters-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 2px;
    background-color: #ffd780;
    box-shadow: 0 0 8px #ffd780;
}

/* BUSCADOR ESTILO MINIMALISTA */
.search-container {
    background: rgba(23, 26, 56, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    width: 180px; /* Más corto como en Honkai */
}

.search-input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    font-size: 13px;
    width: 100%;
}
/* CADA BOTÓN DE FILTRO */
.filters .filters-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;       /* Altura fija */
    min-width: 45px;
    padding: 0 15px;
    cursor: pointer;
    position: relative;
    font-size: 12px;
    font-weight: 700;
    color: var(--texto-apagado);
    background: transparent;
    transition: all 0.2s ease;
    border-right: 1px solid var(--borde-sutil); /* Línea divisoria */
}

.filters .filters-item:last-child { border-right: none; }

/* Iconos de la barra de filtros SOLAMENTE */
.filters .filters-item img {
    width: 22px !important;
    height: 22px !important;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: 0.2s;
    pointer-events: none;
}

/* --- ESTADO ACTIVO EN FILTROS --- */
.filters .filters-item.active {
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.filters .filters-item.active img {
    opacity: 1;
    filter: none;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}

/* Línea dorada vertical (Izquierda) */
.filters .filters-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--dorado-genshin);
    box-shadow: 1px 0 5px rgba(255, 215, 0, 0.4);
}

/* Colores de texto activos */
.filters .status-done.active { color: var(--color-completo) !important; }
.filters .status-fix.active { color: var(--color-revision) !important; }
.filters .status-empty.active { color: var(--color-vacio) !important; }
.filters .status-new.active { color: var(--color-new) !important; }

/* Buscador alineado */
.search-container {
    background-color: var(--bg-filtros);
    border: 1px solid var(--borde-sutil);
    border-radius: 8px;
    padding: 0 15px;
    height: 40px;
    display: flex;
    align-items: center;
    width: 280px;
}

.search-input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    font-size: 13px;
}

/* =========================================
   GRID DE PERSONAJES (RESTAURADO EXACTO A TU CÓDIGO)
   ========================================= */

.character-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px;
    justify-items: center;
    padding: 10px;
}

.character-portrait {
    position: relative;
    width: 90px;
    transition: transform 0.2s ease;
}

/* ESTA CLASE ES LA QUE DEFINE EL ICONO DEL PERSONAJE */
/* Restaurada exactamente a: border-radius 10px y borde beige 0.1 */
.character-icon {
    width: 90px;
    height: 105px;
    object-fit: cover;
    border-radius: 10px 10px 0 10px; 
    border: 2px solid rgba(233, 229, 220, 0.1); 
}

/* Fondos de rareza */
.character-icon.rarity-5 { background: var(--rarity-5-bg); }
.character-icon.rarity-4 { background: var(--rarity-4-bg); }

/* Elemento (Bolita) */
.character-type {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    z-index: 5;
}

.character-type img {
    width: 100%;
    height: 100%;
}

/* Etiquetas de Estado */
.status-tag {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 8px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 3px;
    z-index: 10;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.completo { background-color: var(--color-completo); border: 1px solid #2e7d32; }
.revision { background-color: var(--color-revision); border: 1px solid #0097a7; }
.vacio { background-color: var(--color-vacio); border: 1px solid #616161; }

.character-name {
    margin-top: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-shadow: 1px 1px 2px black;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.new-tag {
    background-color: var(--color-new);
    color: #000;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 4px;
    position: absolute;
    bottom: 30px; 
    z-index: 10;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}
