/* --- VARIABLES --- */
:root {
    --bg-principal: #1c1f46;
    --bg-filtro: #1e2246;
    --azul-select: rgba(63, 81, 181, 0.3);
    --texto-color: #dbddef;
    --rarity-5-bg: linear-gradient(180deg, #c38b43 0%, #322921 100%);
    --rarity-4-bg: linear-gradient(180deg, #8a538a 0%, #2a2132 100%);
    --color-new: #ffb100;
}

/* --- BASES --- */
body {
    background-color: var(--bg-principal);
    color: var(--texto-color);
    font-family: "Roboto", sans-serif;
    margin: 0;
}

/* --- NAVBAR --- */
.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-size: 14px; height: 55px;
    display: flex; align-items: center;
    transition: all 0.3s ease; border-bottom: 3px solid transparent;
}
.navbar-nav .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(0deg, var(--azul-select) 0%, rgba(63, 81, 181, 0) 100%) !important;
    border-bottom: 3px solid #ffd780;
}

/* --- FILTROS SEGMENTADOS --- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 20px; }
.filters-list {
    background-color: var(--bg-filtro); border-radius: 8px; display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden;
}
.filters-item {
    padding: 6px 12px; cursor: pointer; opacity: 0.5;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; align-items: center; justify-content: center; min-width: 38px;
}
.filters-item:last-child { border-right: none; }
.filters-item img { width: 22px; height: 22px; }
.filters-item span { font-size: 11px; font-weight: bold; color: #8a91b4; }

.filters-item.active {
    opacity: 1; background: rgba(255, 255, 255, 0.05);
    border-color: #ffd780 !important; box-shadow: inset 0 -2px 0 #ffd780;
}
.filters-item.active span { color: #ffffff !important; }

/* Colores específicos de filtros */
.filter-done span { color: #4caf50 !important; }
.filter-fix span { color: #00bcd4 !important; }
.filter-empty span { color: #6c757d !important; }

/* --- REJILLA (90px) --- */
.character-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px; justify-items: center; padding: 20px;
}
.character-portrait { width: 90px; position: relative; text-decoration: none; transition: 0.2s; }
.character-portrait:hover { transform: scale(1.05); }

.character-icon {
    width: 90px; height: 105px; object-fit: cover;
    border-radius: 10px 10px 0 10px; border: 1px solid rgba(255, 255, 255, 0.1);
}
.character-icon.rarity-5 { background: var(--rarity-5-bg); border-bottom: 2px solid #ffd780; }
.character-icon.rarity-4 { background: var(--rarity-4-bg); border-bottom: 2px solid #a256ff; }

.character-type { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; z-index: 5; }

/* --- ETIQUETAS DE ESTADO (PJ) --- */
.status-tag {
    position: absolute; top: 5px; right: 5px; padding: 1px 6px; font-size: 8px;
    border-radius: 3px; color: white; text-transform: uppercase; z-index: 10;
    font-weight: bold;
}

.revision { 
    background-color: #00bcd4; 
    box-shadow: 0 0 5px rgba(0, 188, 212, 0.5);
}

.completo { 
    background-color: #4caf50; 
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.vacio { 
    background-color: #6c757d; 
    opacity: 0.9;
}

.new {
    position: absolute; bottom: 35px; left: 50%; transform: translateX(-50%);
    background-color: var(--color-new); color: #000; font-weight: 800; font-size: 10px;
    padding: 1px 8px; border-radius: 5px; z-index: 10; text-transform: uppercase;
}

.character-name {
    margin-top: 8px; color: white; font-size: 11px; text-align: center;
    width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* --- BUSCADOR --- */
.search {
    background-color: var(--bg-filtro); border-radius: 8px; padding: 0 15px;
    display: flex; align-items: center; border: 1px solid rgba(255, 255, 255, 0.1); height: 34px;
}
.search-input { background: transparent; border: none; color: white; outline: none; font-size: 13px; }