:root {
    --accent-primary: #00d2ff;
    --accent-secondary: #0088ff;
    --accent-gold: #ffd700;
    --bg-dark: #0a0c10;
    --bg-deep: #06090f;
    --bg-card: rgba(15, 23, 42, 0.7);
    --glass-bg: rgba(20, 25, 35, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-main: #e0e6ed;
    --success: #0cff86;
    --warning: #f59e0b;
    --danger: #ef4444;
    --font-header: 'Orbitron', sans-serif;
    --font-body: 'Outfit', 'Calibri', sans-serif;
    
    /* Variables inyectadas para evitar fallos de silencio */
    --unit-bg: rgba(0, 0, 0, 0);
    --v-sticky-offset: 0;

    /* Escala de z-index (Sugerencia Claude Code) */
    --z-modal: 10000;
    --z-panel: 5000;
    --z-header: 1200;
    --z-sticky: 1100;
    --z-dropdown: 2000;
}
/* Browser Autofill Fix (Prevent white background) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0a0c10 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Toast Notification */
#swgoh-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 210, 255, 0.95);
    color: #000;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    font-weight: 900;
    font-family: var(--font-header);
    font-size: 0.85rem;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 210, 255, 0.4);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    white-space: normal;
    max-width: 90vw;
    width: max-content;
    display: inline-block;
}

#swgoh-toast.visible {
    opacity: 1;
    visibility: visible;
    bottom: 60px;
}

/* Visibility Utilities */
@media (max-width: 850px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 851px) {
    .hide-desktop { display: none !important; }
}

/* Price Drop Indicator */
.price-drop-arrow {
    color: #ff3e3e;
    font-size: 0.85rem;
    margin-left: 6px;
    cursor: pointer;
    filter: drop-shadow(0 0 3px rgba(255, 0, 0, 0.4));
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    vertical-align: middle;
}

.price-drop-arrow:hover {
    transform: scale(1.4);
    color: #ff0000;
}

.price-history-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-family: 'Outfit', sans-serif;
}

.price-history-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    color: var(--accent-gold);
    font-family: 'Orbitron';
    font-size: 0.7rem;
    text-transform: uppercase;
}

.price-history-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 0.95rem;
}

.price-history-row:last-child {
    background: rgba(0, 242, 255, 0.05);
}

.price-history-row:last-child td:last-child {
    color: var(--accent-primary);
    font-weight: bold;
}

/* Marketplace Styles */
#marketplace {
    padding: 0 !important;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: visible !important;
}


.marketplace-header { 
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 1001 !important;
    transform: none !important;
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--glass-border);
    border-bottom: none;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .marketplace-header {
        padding: 0.2rem 0.75rem;
    }
    
    .must-have-panel {
        left: -0.5rem !important;
        right: -0.5rem !important;
        width: calc(100% + 1rem) !important;
        padding: 1rem 0.5rem !important;
    }
}

/* Fila única de filtros */
.marketplace-filters-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative; /* Contenedor de referencia para el panel Must Have */
}

/* --- Must Have Panel Emergente --- */
.must-have-trigger-item {
    align-items: center;
}

.must-have-trigger-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 255, 0.06);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 8px;
    color: var(--accent-primary);
    width: 40px;
    height: 36px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.must-have-trigger-btn:hover,
.must-have-trigger-btn.active {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.2);
}

.must-have-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent-primary);
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    font-family: var(--font-header);
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.must-have-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5000 !important;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    animation: panelFadeIn 0.2s ease;
    background: #0f172a !important; 
    border: 1px solid var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block !important;
    contain: layout;
}
.must-have-panel.hidden {
    display: none !important;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Botón Limpiar Todo con Animación */
.clear-filters-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 255, 0.06);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 8px;
    color: var(--accent-primary);
    width: 40px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-filters-btn-icon:hover {
    background: rgba(255, 82, 82, 0.15);
    border-color: #ff5252;
    color: #ff5252;
    box-shadow: 0 0 15px rgba(255, 82, 82, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.clear-filters-btn-icon:active {
    transform: rotate(90deg) scale(0.95);
}

.must-have-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.must-have-panel-header h3 {
    font-family: var(--font-header);
    font-size: 0.85rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.must-have-panel-scrollable {
    padding-right: 4px;
}

.must-have-panel-scrollable::-webkit-scrollbar { width: 4px; }
.must-have-panel-scrollable::-webkit-scrollbar-track { background: transparent; }
.must-have-panel-scrollable::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 4px; }


.unit-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.75);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-weight: 500;
    white-space: nowrap;
}

.unit-tag:hover {
    background: rgba(0, 242, 255, 0.05);
    border-color: rgba(0, 242, 255, 0.3);
    color: #fff;
}

.unit-tag.active {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

/* --- Must Have Panel 3 Columns --- */
.must-have-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0.5rem 0;
}

@media (max-width: 1200px) {
    .must-have-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .must-have-columns {
        grid-template-columns: 1fr;
    }
}

.must-have-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.must-have-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
}

.must-have-group h4 {
    font-family: var(--font-header);
    font-size: 0.7rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(0, 210, 255, 0.1);
    letter-spacing: 1px;
}

.must-have-unit-row {
    display: grid;
    grid-template-columns: 1fr 70px 70px;
    gap: 12px;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.must-have-unit-row:hover {
    background: rgba(0, 242, 255, 0.05);
}

.must-have-unit-row.active {
    background: rgba(0, 242, 255, 0.12);
    border: 1px solid rgba(0, 242, 255, 0.3);
}

/* Custom Language Dropdown */
.custom-lang-dropdown {
    position: relative;
    display: inline-block;
    order: 2;
}

.custom-lang-trigger {
    background: transparent;
    border: none;
    border-radius: 8px;
    color: white;
    padding: 0.6rem 0;
    width: 82px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.custom-lang-trigger:hover {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    transform: translateY(-1px);
}

.custom-lang-trigger::after {
    content: '\25BC';
    font-size: 0.6rem;
    opacity: 0.5;
    transition: transform 0.3s ease;
}

.custom-lang-dropdown.active .custom-lang-trigger::after {
    transform: rotate(180deg);
}

.custom-lang-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 82px;
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.custom-lang-dropdown.active .custom-lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.lang-option {
    padding: 10px 5px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-header);
    font-size: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-option img {
    justify-self: end;
}

.lang-option span {
    justify-self: start;
}

.lang-option:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--accent-primary);
}

.lang-option.selected {
    color: var(--accent-primary);
    background: rgba(0, 242, 255, 0.05);
    font-weight: bold;
}

.must-have-header-row {
    display: grid;
    grid-template-columns: 1fr 70px 70px;
    gap: 12px;
    padding: 0 14px;
    margin-bottom: 0.6rem;
}

@media (max-width: 600px) {
    .must-have-unit-row, .must-have-header-row {
        grid-template-columns: 1fr 65px 65px !important;
        gap: 8px !important;
        padding: 8px 4px !important;
    }
    
    .must-have-unit-name {
        font-size: 0.8rem !important;
    }
    
    .must-have-select {
        font-size: 0.7rem !important;
    }
    
    .mh-col-label {
        font-size: 0.6rem !important;
    }
}

.mh-col-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
}

.mh-col-label.empty {
    visibility: hidden;
}

.must-have-unit-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer !important;
    transition: all 0.2s;
    user-select: none;
}

.must-have-unit-name:hover {
    color: var(--accent-primary);
    transform: translateX(2px);
}

.must-have-unit-row.active .must-have-unit-name {
    color: var(--accent-primary);
    font-weight: 800;
}

.must-have-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-family: var(--font-body);
    border-radius: 4px;
    padding: 2px 4px;
    outline: none; transition: box-shadow 0.2s ease;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.must-have-select:hover {
    border-color: var(--accent-primary);
    color: #fff;
}

.must-have-select.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(0, 210, 255, 0.1);
}

.must-have-select option {
    background: var(--bg-deep);
    color: #fff;
}

.filter-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center label and input relative to each other */
    gap: 0.2rem;
}

.filter-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-header);
    margin-bottom: 0.25rem;
    text-align: center;
}

.filter-item input {
    background: rgba(0, 242, 255, 0.05); /* Match Scanner background */
    border: 1px solid rgba(0, 242, 255, 0.3); /* Match Scanner border */
    border-radius: 8px;
    padding: 0.6rem 0.6rem;
    color: white;
    width: 75px;
    outline: none; transition: box-shadow 0.2s ease;
    font-family: var(--font-header);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center; /* Center numbers inside input */
}

/* Chrome, Safari, Edge, Opera */
.filter-item input::-webkit-outer-spin-button,
.filter-item input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* Firefox */
.filter-item input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.filter-item input:focus, .filter-item input:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

/* Tabla Marketplace */
.table-container {
    margin-top: 0 !important;
    overflow-x: scroll !important;
    overflow-y: auto !important;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: 
        /* Sombras indicativas de scroll (premium UX reforzada) */
        linear-gradient(to bottom, #0a0c10 30%, rgba(10, 12, 16, 0)),
        linear-gradient(to top, rgba(10, 12, 16, 0), #0a0c10 70%) 0 100%,
        radial-gradient(farthest-side at 50% 0%, rgba(0, 242, 255, 0.35), rgba(0, 0, 0, 0)),
        radial-gradient(farthest-side at 50% 100%, rgba(0, 242, 255, 0.35), rgba(0, 0, 0, 0)) 0 100%;
    background-repeat: no-repeat;
    background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
    background-attachment: local, local, scroll, scroll;
    background-color: #0a0c10;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-bottom: 25px;
}

table {
    width: 100%;
    min-width: 2000px; /* Forzado extremo para asegurar el scroll en monitores 2K/4K */
    border-collapse: separate;
    border-spacing: 0;
    font-size: 1rem;
    text-align: center;
    color: var(--text-main);
    box-sizing: border-box;
    font-family: var(--font-body); /* Rajdhani para el grueso de la tabla */
}

table tr, table th, table td {
    box-sizing: border-box;
}

thead {
    /* system-generated sticky is handled by JS for horizontal compatibility */
    background: var(--bg-deep);
}

#tableHeaders th {
    position: relative;
    z-index: 1005;
    background: var(--bg-deep) !important;
    vertical-align: bottom !important; /* AlineaciÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬  ÃƒÆ’Ã¢â‚¬Â¦ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬  ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡n al fondo de la celda */
    padding: 0.6rem 0 0.5rem 0 !important; /* Padding horizontal eliminado para centrado perfecto */
    text-align: center;
    white-space: nowrap;
    font-family: var(--font-header);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 1px;
    box-shadow: none !important;
    /* OptimizaciÃƒÆ’Ã‚Â³n Performance: Variable CSS centralizada para Sticky */
    transform: translate3d(0, var(--v-sticky-offset, 0px), 0.1px);
}

.is-sticky-vertical {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 1100 !important;
}

.header-cap {
    display: inline-flex;
    align-items: center; 
    justify-content: center;
    padding: 0.3rem 0.5rem;
    margin: 0 1px;
    background: rgba(15, 20, 30, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 210, 255, 0.15);
    border-bottom: 3px solid var(--accent-primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.65rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    width: calc(100% - 2px);
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 28px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* Estilo especial solo para cuando hay imagen de personaje */
th.header-unit-bg .header-cap,
th.col-std-unit .header-cap {
    height: 52px !important;
    min-height: 52px !important;
    width: 74px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 0 0 0 !important;
    border-radius: 12px;
}

th.header-unit-bg .header-cap span,
th.col-std-unit .header-cap span {
    transform: translateY(0.5px) !important;
    display: inline-block;
}

.header-cap[style*="--unit-bg"]::before {
    content: '';
    position: absolute;
    inset: -1px;
    background-image: var(--unit-bg);
    background-size: cover; /* Asegura que la cara siempre cubra el botÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬  ÃƒÆ’Ã¢â‚¬Â¦ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬  ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡n fijo */
    background-position: center 20%;
    opacity: 0.8;
    z-index: -1;
    transition: all 0.3s ease;
}

.header-cap[style*="--unit-bg"]:hover::before {
    opacity: 1;
    transition: transform 0.3s ease;
    transform: scale(1.15); /* Zoom interactivo mÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬  ÃƒÆ’Ã¢â‚¬Â¦ÃƒÂ¢Ã¢â€šÂ¬Ã…â€œÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ­s fluido */
}

/* Columna especial para Mods +25 Velocidad - Solo en la Cabecera */
th.col-speed-primary .header-cap {
    position: relative;
    background-image: url('images/mod_speed.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 4px !important;
    background-size: 36px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

/* Backgrounds para Zeta, Omi y Data */
th.col-zeta-bg .header-cap {
    position: relative;
    background-image: url('images/zeta.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 4px !important;
    background-size: 36px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-omi-bg .header-cap {
    position: relative;
    background-image: url('images/omicron.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 4px !important;
    background-size: 36px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-data-bg .header-cap {
    position: relative;
    background-image: url('images/datacron.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 4px !important;
    background-size: 36px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-offense-bg .header-cap {
    position: relative;
    background-image: url('images/mod_offense.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 4px !important;
    background-size: 36px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-6dots-bg .header-cap {
    position: relative;
    background-image: url('images/mod_6_dots.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 1px !important;
    background-size: 32px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-g12-bg .header-cap {
    position: relative;
    background-image: url('images/G12.png') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 42px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
    align-items: center !important;
    padding-bottom: 0 !important;
}

th.col-g13-bg .header-cap {
    position: relative;
    background-image: url('images/G13.png') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 42px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
    align-items: center !important;
    padding-bottom: 0 !important;
}



th.col-r7-bg .header-cap {
    position: relative;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 42px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-r8-bg .header-cap {
    position: relative;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 42px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-r9-bg .header-cap {
    position: relative;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 42px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-r10-bg .header-cap {
    position: relative;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 42px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
    align-items: center !important;
    padding-bottom: 0 !important;
}


/* Evitar el fondo en las celdas de datos */
td.col-speed-primary, 
td.col-zeta-bg, 
td.col-omi-bg, 
td.col-data-bg,
td.col-offense-bg,
td.col-6dots-bg,
td.col-g12-bg,
td.col-g13-bg,
td.col-r7-bg,
td.col-r8-bg,
td.col-r9-bg,
td.col-r10-bg {
    background-image: none !important;
}

/* Ancho estÃƒÆ’Ã‚Â¡ndar para columnas con cabecera tipo botÃƒÆ’Ã‚Â³n (68px) */
.col-std-unit {
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
}

/* Forzado de centrado para las celdas de datos en estas columnas */
#accountsTable tbody td {
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#tableHeaders th.col-std-unit {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.header-cap[style*="--unit-bg"] {
    background: linear-gradient(to bottom, rgba(0,0,0,0) 25%, rgba(0,0,0,0.95) 100%);
    box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
}

/* Sin padding extra en la primera fila ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ ¬ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€šÃ‚  el diseÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ±o header-cap ya no lo necesita */

td {
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    font-size: 1rem;
    text-align: center;
    font-family: var(--font-body); /* Rajdhani para datos */
}

.table-container::-webkit-scrollbar {
    height: 14px; /* Obvio y prominente */
    width: 14px;
    display: block !important;
}

.table-container::-webkit-scrollbar-track {
    background: #1a1f2b !important; /* Pista sólida de alto contraste */
    border-radius: 7px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 5px;
    border: 2px solid #0a0c10; /* Hace que destaque mÃƒÂ¡s */
}

tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: 1px 45px;
}

tbody tr:nth-child(odd) {
    background-color: #0d121d; /* Deep Dark Blue */
}

tbody tr:nth-child(even) {
    background-color: #161c2b; /* Slightly Lighter Dark Blue */
}

/* Celdas especÃƒÆ’Ã‚Â­ficas */
.val-price {
    color: var(--accent-primary);
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    font-size: 1rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

/* --- Suggested Price Coloring & Animations --- */
.bargain-price {
    color: #FFF5CC !important; /* Bright White-Gold (Now static) */
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5), 0 0 6px rgba(255, 255, 255, 0.3);
    animation: none;
    transition: transform 0.2s ease, text-shadow 0.2s ease, color 0.2s ease;
    cursor: pointer;
    font-weight: 800 !important;
    font-size: 1rem;
    display: inline-block;
    will-change: color, text-shadow;
}

.bargain-price:hover {
    color: #ffff00 !important; /* Yellow Instant */
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
    transition: none !important;
}

.inflated-price {
    color: #9ca3af !important; /* Charcoal Grey */
    opacity: 0.4;
    transition: none !important;
    filter: saturate(0.5);
    cursor: pointer;
    font-size: 1rem;
}

.inflated-price:hover {
    opacity: 1;
    color: #d1d5db !important; /* Lighter Grey-Silver */
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
    transition: none !important;
}



#accountsTable .ally-code-text {
    color: var(--accent-primary) !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    cursor: pointer;
    transition: all 0.2s;
    justify-self: start !important;
}

.ally-link-content {
    display: grid !important;
    grid-template-columns: 25px 90px 22px 22px !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 4px !important;
    font-weight: bold;
    padding-left: 7px;
}

.summary-trigger-icon {
    justify-self: end !important;
}

.fav-icon-container, 
.note-icon-container, 
.copy-link-icon-container {
    justify-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ally-code-text:hover {
    color: #fff !important;
    text-shadow: 0 0 8px var(--accent-primary) !important;
}

.val-gp { font-weight: 600; }
.val-gl { font-weight: 700; color: #fff; }
.val-act { color: #ffffff; font-weight: 800; }

/* Summary Trigger Icon in Table */
.summary-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 4px;
    transition: all 0.2s;
    background: transparent !important;
    border: 1px solid transparent;
    color: var(--accent-secondary); 
    opacity: 0.8;
    vertical-align: middle;
}

.summary-trigger-icon:hover {
    opacity: 1;
    transform: scale(1.15);
    background: transparent !important;
    border-color: rgba(0, 210, 255, 0.2);
    color: var(--accent-primary) !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.copy-link-icon {
    opacity: 0.7 !important;
    color: var(--accent-primary) !important;
    cursor: pointer;
    transition: none !important;
    flex-shrink: 0;
}

.copy-link-icon:hover {
    opacity: 1 !important;
    transform: scale(1.15);
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.profile-link-icon {
    opacity: 0.7 !important;
    color: var(--accent-secondary) !important;
    cursor: pointer;
    transition: none !important;
    flex-shrink: 0;
}

.profile-link-icon:hover {
    opacity: 1 !important;
    transform: scale(1.15);
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

/* Forcing tight columns */
table th, table td {
    padding: 0.3rem 0.5rem !important;
    min-width: 0 !important;
    vertical-align: middle;
    text-align: center !important;
}

/* Sticky Columns (Aliado, Precio) - Definición Única */
.val-price-col, .val-ally-col {
    position: sticky !important;
    z-index: var(--z-sticky) !important;
    background-color: #0d121d !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.val-ally-col {
    left: 0 !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    padding-left: 0 !important;
}

.val-price-col {
    left: 180px !important;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    white-space: nowrap !important;
}

#tableHeaders th.val-ally-col,
#tableHeaders th.val-price-col {
    z-index: calc(var(--z-sticky) + 10) !important; 
    background-color: var(--bg-deep) !important;
    padding: 0.6rem 0.2rem 0.5rem 0.2rem !important;
    border-right: none !important;
}

/* Backgrounds para Sticky Cells por filas */
tbody tr:nth-child(odd) .val-price-col,
tbody tr:nth-child(odd) .val-ally-col {
    background-color: #0d121d !important;
}

tbody tr:nth-child(even) .val-price-col,
tbody tr:nth-child(even) .val-ally-col {
    background-color: #161c2b !important;
}

tbody tr:hover .val-price-col,
tbody tr:hover .val-ally-col {
    background-color: #1e293b !important;
}

/* Ensure data visibility */
tbody td {
    opacity: 1 !important;
    visibility: visible !important;
}

#tableHeaders th:nth-child(1), #tableHeaders th:nth-child(2) {
    box-shadow: none !important;
}

/* Asegurar que el resto de th tengan el fondo correcto para el scroll vertical */
#tableHeaders th {
    background-color: var(--bg-deep);
}

/* Unificando borders con el resto de la tabla */
.val-price-col, .val-ally-col {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
#tableHeaders th:nth-child(1), 
#tableHeaders th:nth-child(2) {
    border-right: none !important;
}

/* --- Desactivar columnas fijas en móvil (vista vertical y horizontal) --- */
@media (max-width: 1024px) {
    .val-price-col, 
    .val-ally-col {
        position: static !important;
        left: auto !important;
        z-index: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    #tableHeaders th.val-price-col, 
    #tableHeaders th.val-ally-col {
        position: relative !important;
        left: auto !important;
        z-index: 1500 !important;
        /* transform: none !important; */
    }
}

.gl-tracker-header-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .gl-tracker-header-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.8rem !important;
    }
    .gl-tracker-header-controls .back-btn {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    .gl-tracker-header-controls .gl-search-container {
        width: 100% !important;
    }
}

.badge-td {
    display: flex;
    gap: 0.4rem;
}

/* Management Mode Styles */
.mgmt-col {
    background: var(--bg-deep) !important; /* Mantener fondo oscuro */
}

.mgmt-col .header-cap {
    background: rgba(212, 175, 55, 0.08) !important;
    border-color: rgba(212, 175, 55, 0.2) !important;
    color: #d4af37 !important;
}

.mgmt-col .header-cap::after {
    background: #d4af37 !important;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

.mgmt-td {
    background: rgba(212, 175, 55, 0.03);
    border-left: 1px solid rgba(212, 175, 55, 0.1);
}

.mgmt-td:hover {
    background: rgba(212, 175, 55, 0.1) !important;
}

/* Navigation */
#profileNav {
    margin-bottom: 2rem;
}

.account-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.badge-mini {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-zeta { background: rgba(97, 97, 97, 0.2); color: #9e9e9e; border: 1px solid rgba(97, 97, 97, 0.4); }
.badge-omi { background: rgba(255, 152, 0, 0.2); color: #ff9800; border: 1px solid rgba(255, 152, 0, 0.4); }
.badge-datacron { background: rgba(0, 229, 255, 0.2); color: #00e5ff; border: 1px solid rgba(0, 229, 255, 0.4); }
.badge-act { background: rgba(0, 210, 255, 0.2); color: var(--accent-primary); border: 1px solid var(--accent-primary); font-family: 'Orbitron', sans-serif; }

.highlights-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.highlight-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.highlight-section h3 {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.8rem;
}

.highlight-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    padding: 0.6rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.highlight-unit span:first-child {
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0.6;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-unit .val {
    font-size: 0.85rem;
    font-weight: 900;
    color: #fff;
}

.highlight-unit .val.comp { color: var(--success); }
.highlight-unit .val.pend { opacity: 0.3; }

.gl-icon-mini {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    background-size: cover;
}

.hidden { display: none !important; }

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

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 242, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(112, 0, 255, 0.05) 0%, transparent 40%);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    /* transform: translateZ(0); REMOVED: Breaks position: sticky and absolute panel stacking */
    /* will-change: transform; REMOVED: Breaks position: sticky and absolute panel stacking */
}

header {
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    left: 0; /* Keep header visible on horizontal scroll */
    width: 100%;
    z-index: var(--z-dropdown);
    background: rgba(5, 7, 10, 0.98);
    backdrop-filter: blur(12px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    /* Espacio reducido entre logo e iconos sociales */
}

/* Removed duplicated/old player stats rules */

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.logo {
    font-family: var(--font-header);
    font-size: 1.3rem;
    /* TÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ­tulo mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s grande */
    font-weight: 900;
    letter-spacing: 1.5px;
    color: white;
}

.logo .accent {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.search-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-inputs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    /* MÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s juntos: scanner, cuadro y selector */
}

.player-info-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.9rem;
    padding-left: 1.2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 auto;
}

#playerName {
    font-family: var(--font-header);
    letter-spacing: 0.5px;
    padding-right: 1.2rem;
    /* MÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s juntos */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.player-name-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Horizontally center GAC info under name */
}

.player-name-main {
    font-size: 0.80rem;
    /* Igualado al GP */
    font-weight: 800;
    line-height: normal;
    color: #fff;
    margin-bottom: -1px;
}

.player-gac-info {
    font-size: 0.6rem;
    color: var(--text-secondary);
    opacity: 0.5;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1;
    margin-top: 2px;
}

#playerStats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.gp-number {
    font-size: 1.00rem;
    color: var(--accent-primary);
    font-weight: 800;
    font-family: var(--font-header);
    letter-spacing: 0.5px;
    margin-right: 10px;
}

.gp-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.5;
    /* More opaque / dimmed as requested */
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#allyCodeInput {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.6rem 0.5rem;
    color: white;
    font-family: var(--font-header);
    width: 130px; /* Reducido 70px para ahorrar espacio */
    text-align: center;
    transition: all 0.3s ease;
    order: 2;
    /* Position 2 on PC */
}

#searchBtn {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    color: var(--accent-primary);
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    order: 3;
    margin-right: 0;
    text-transform: uppercase;
}

.glass-select {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 0.6rem 12px;
    cursor: pointer;
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    outline: none; transition: box-shadow 0.2s ease;
    text-align: center;      /* Center text in dropdown */
    text-align-last: center; /* Center selected option text */
}

.glass-select:hover, .glass-select:focus {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.2);
}

.glass-select option {
    background: var(--bg-deep);
    color: white;
}

#searchBtn:hover {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    transform: translateY(-1px);
    color: #fff;
}

main { margin: 0 auto 1rem;
    padding: 0 2rem;
}

#hero { margin-bottom: 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero h1 {
    font-family: var(--font-header);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Search Panel */
.hero-search-container {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-input-group {
    width: 100%;
    max-width: 380px;
    position: relative;
}

#heroAllyCodeInput {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1.2rem;
    color: white;
    font-family: var(--font-header);
    font-size: 1.6rem;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#heroAllyCodeInput:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.2);
    outline: none; transition: box-shadow 0.2s ease;
    transform: scale(1.02);
}

.hero-cta-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 12px;
    padding: 1.2rem 4rem;
    color: white;
    font-family: var(--font-header);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.hero-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: all 0.6s;
}

.hero-cta-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 242, 255, 0.6);
    filter: brightness(1.2);
}

.hero-cta-btn:hover::before {
    left: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight {
    color: var(--accent-primary);
    font-weight: 700;
}

h2 {
    font-family: var(--font-header);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 1200px) {
    .goals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .goals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .goals-grid {
        grid-template-columns: 1fr;
    }
}

.goal-card {
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid var(--glass-border);
}

.goal-card h3 {
    font-family: var(--font-header);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.goal-card .type {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

#dashboard {
    animation: fadeIn 0.5s ease-out;
    scroll-margin-top: 120px;
}

.selected-gl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 2.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: linear-gradient(90deg, rgba(184, 134, 11, 0.1), transparent);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.selected-gl-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-grow: 1;
    min-width: 0;
}

.selected-gl-portrait {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    margin-right: 0.5rem;
}




.close-dashboard {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    padding-bottom: 4px;
}

.close-dashboard:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
    color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
    transform: rotate(90deg);
}

.selected-gl-thumb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    object-fit: cover;
}




/* Fix for the double ring: Hide default shadow/ring when it's the premium header */
.selected-gl-portrait::before {
    display: none !important;
}

.selected-gl-info h2 {
    font-family: var(--font-header);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    color: #fff;
    margin-bottom: 5px;
    white-space: normal;
    word-break: break-word;
}

.gl-type-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 1px;
}

.progress-circle {
    position: relative;
    width: 100px;
    height: 100px;
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle .progress-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 4;
}

.progress-circle .progress-bar {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 282.7; /* 2 * PI * 45 */
    stroke-dashoffset: 282.7;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 5px var(--accent-primary));
}

.progress-circle .percent-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.progress-circle span {
    font-family: var(--font-header);
    font-size: 1.15rem;
    font-weight: 700;
}

.requirements-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.9rem;
}

@media (max-width: 1300px) {
    .requirements-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .requirements-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 750px) {
    .requirements-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .requirements-list {
        grid-template-columns: 1fr;
    }
}

.char-card {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    position: relative;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    transform: translateZ(0);
    will-change: transform;
    isolation: isolate;
}

/* Global Alignment Themes - Applied to everyone for consistent background/glow */
.char-card.side-light,
.gl-status-card.side-light {
    background: linear-gradient(135deg, rgba(10, 30, 60, 0.98), rgba(5, 15, 30, 0.99)) !important;
    border-color: rgba(0, 255, 255, 0.4) !important;
    box-shadow: inset 0 0 35px rgba(0, 255, 255, 0.1);
}

.char-card.side-dark,
.gl-status-card.side-dark {
    background: linear-gradient(135deg, rgba(50, 10, 10, 0.98), rgba(20, 5, 5, 0.99)) !important;
    border-color: rgba(255, 0, 0, 0.4) !important;
    box-shadow: inset 0 0 35px rgba(255, 0, 0, 0.1);
}

/* Not Owned Style (High Legibility Mode) */
.char-card.not-owned {
    opacity: 1 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    background: rgba(20, 20, 25, 0.95) !important;
    filter: none !important;
}

.char-card.not-owned.side-dark,
.char-card.not-owned.side-light {
    box-shadow: none !important;
    background: rgba(20, 20, 20, 0.95) !important;
}

/* Apagar resplandor de retrato (incluyendo naves) */
.not-owned .portrait-wrapper::before,
.not-owned .portrait-wrapper.ship-portrait::before,
.not-owned .portrait-wrapper.capital-ship::before {
    display: none !important;
}

.not-owned .char-thumb,
.not-owned .gl-status-thumb {
    filter: grayscale(1) brightness(0.8) !important;
    opacity: 1 !important;
}

.not-owned .portrait-wrapper::before,
.not-owned .portrait-wrapper::after,
.not-owned .relic-badge {
    display: none !important;
}

/* El nombre y el progreso NO se atenÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ºan */
.not-owned .char-name,
.not-owned .percent-label,
.not-owned .gl-status-val {
    opacity: 1 !important;
    color: #fff !important;
}

/* La barra de progreso se mantiene legible pero con un brillo mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s sutil */
.not-owned .progress-bar-fill {
    filter: saturate(0.5);
    opacity: 0.8;
}

.char-card.not-owned:hover {
    background: rgba(35, 35, 40, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.not-owned:hover .char-thumb,
.not-owned:hover .gl-status-thumb {
    filter: grayscale(0) brightness(1.1) !important;
    opacity: 1 !important;
}

/* Ensure rings show for not-owned goal cards (Legendaries, Conquest, etc) */
:is(.gl-tracker-grid, .requirements-list) .char-card.not-owned .portrait-wrapper::before,
:is(.gl-tracker-grid, .requirements-list) .gl-status-card.not-owned .portrait-wrapper::before {
    display: block !important;
}

.char-card.g13-style:hover {
    transform: translateY(-4px);
    border-color: #d4af37 !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}

/* Override: Precision Alignment Glow for Roster (Match Legendaries) */
.char-card.side-light:hover {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 35px rgba(59, 130, 246, 0.5), inset 0 0 20px rgba(59, 130, 246, 0.25);
    background: rgba(10, 30, 60, 0.9) !important;
    transform: translateY(-6px);
}

.char-card.side-dark:hover {
    border-color: #ef4444 !important;
    box-shadow: 0 0 35px rgba(239, 68, 68, 0.5), inset 0 0 20px rgba(239, 68, 68, 0.25);
    background: rgba(40, 10, 10, 0.9) !important;
    transform: translateY(-6px);
}

.char-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.char-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.2rem;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-id-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.char-info-text {
    flex: 1;
    min-width: 0;
}

/* Character Portrait Ring System (Universal Notched Triple Ring) */
.portrait-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Base energy colors (inherited by ::before and ::after) */
    --ring-color: #00ffff;
    --ring-glow: rgba(0, 255, 255, 0.7);
}

.portrait-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: none !important;
    z-index: 3;
    pointer-events: none;

    box-shadow: 
        0 0 8px var(--ring-glow),
        0 0 12px var(--ring-glow);
    transition: box-shadow 2.2s ease-out !important; /* Sync with zoom */
}

/* Intensify glow on hover (sync with portrait zoom) */
:is(.char-card, .gl-status-card):hover .portrait-wrapper::before {
    box-shadow: 
        0 0 12px var(--ring-glow),
        0 0 35px var(--ring-glow);
    filter: brightness(1.2); /* Extra pop */
}

.side-dark .portrait-wrapper {
    --ring-color: #ff0000;
    --ring-glow: rgba(255, 0, 0, 0.82);
}

.side-light .portrait-wrapper {
    --ring-color: #00ffff;
    --ring-glow: rgba(0, 255, 255, 0.7);
}

.neutral .portrait-wrapper {
    --ring-color: var(--accent-primary);
    --ring-glow: rgba(255, 215, 0, 0.6);
}

/* Specific Style for Legendaries with notched circles (Conquest style) */
.legendary-notched .portrait-wrapper::before {
    -webkit-mask-image: radial-gradient(circle at 100% 50%, transparent 12px, black 13px),
        radial-gradient(circle at 0% 50%, transparent 12px, black 13px);
    mask-image: radial-gradient(circle at 100% 50%, transparent 14px, black 15px),
        radial-gradient(circle at 0% 50%, transparent 14px, black 15px);
    border: 2px solid var(--ring-color) !important;
    inset: -3px;
    background: none;
}

/* Character Ripple wave Effect (Latido de Poder) - FINAL PREMIUM */
.portrait-wrapper::after {
    content: '';
    display: block !important;
    position: absolute;
    inset: -2px;
    border-radius: 50% !important; /* Force circularity as base */
    border: 1px solid var(--ring-color);
    z-index: 99; 
    pointer-events: none;
    opacity: 0;
}

/* Impact Trigger: Ripple burst on hover (Sync with zoom start) */
:is(.char-card, .gl-status-card, .portrait-wrapper):hover .portrait-wrapper::after {
    animation: rippleWavePremium 0.7s cubic-bezier(0, 0.45, 0.45, 1) forwards !important;
}

@keyframes rippleWavePremium {
    0% {
        transform: scale(1);
        opacity: 0.9;
        box-shadow: 0 0 10px var(--ring-glow);
        background: rgba(255, 255, 255, 0.05);
    }
    100% {
        transform: scale(1.75);
        opacity: 0;
        box-shadow: 0 0 45px var(--ring-glow);
    }
}

/* All Ships get a RECTANGULAR glow (Resplandor cuadrado) */
.portrait-wrapper.ship-portrait,
.portrait-wrapper.capital-ship {
    border-radius: 4px !important;
    overflow: visible;
}

.portrait-wrapper.ship-portrait::before,
.portrait-wrapper.capital-ship::before {
    display: block !important;
    border-radius: 4px !important;
    width: 100%;
    height: 100%;
    inset: -2px;
    /* Ligeramente hacia afuera para mejor resplandor */
    aspect-ratio: 16 / 9;
}

/* Ship Ripple Rectangular Override */
.portrait-wrapper.ship-portrait::after,
.portrait-wrapper.capital-ship::after {
    border-radius: 4px !important;
}

/* Leyendas y Naves Capitales: CLEAN SOLID golden circle (NO alignment rings) */
:is(.gl-card, .capital-card) .portrait-wrapper::before {
    display: block !important;
    border: 2px solid #d4af37 !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4) !important;
    inset: -2px !important;
    background: none !important;
}

/* Hide fallback ring color/glow when premium ring is active */
:is(.gl-card, .capital-card) .portrait-wrapper {
    --ring-glow: transparent !important;
}

/* Relic Badge Styling */
.relic-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 900;
    font-family: var(--font-header);
    color: #fff;
    z-index: 10;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.side-dark .relic-badge {
    border-color: #ff0000;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.4);
}

.side-light .relic-badge {
    border-color: #00ffff;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.4);
}

.relic-badge.has-ultimate {
    background: #7a6200;
    /* Amarillo/Oro aÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ºn mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s oscuro para mejor contraste */
    border-color: #d4af37;
    /* Amarillo claro / Oro brillante */
    color: #fff;
    /* NÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ºmero en blanco */
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Cleaned up redundant blocker */


.char-thumb {
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
    object-fit: cover;
    z-index: 1;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1) !important; /* Cinematic & Sync */
    will-change: transform, clip-path, filter;
    transform-origin: top center;
    clip-path: circle(49%); /* Pre-crop for safety */
}

.char-thumb.ship-thumb,
.capital-ship .char-thumb {
    width: 65px;
    height: auto;
    aspect-ratio: 16/9;
    border-radius: 4px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    background: #000;
    z-index: 1;
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform, clip-path, filter;
    transform-origin: center center; /* Default for normal ships */
    clip-path: inset(1% round 4px); /* Pre-crop for ships */
}

/* Override: Capital Ships Anchor (Sincronizado) */
.capital-ship .char-thumb,
.capital-ship .gl-status-thumb {
    transform-origin: 35% center !important; 
}

/* Portrait Zoom Logic: Scale up while shrinking CLIP to keep it in frame */
/* We crop slightly MORE (35.5% instead of 36.5%) to hide sub-pixel leaks under the ring, specially on bottom-right edges */
:is(.char-card:not(.gl-card), .gl-status-card:not(.gl-card)):hover .char-thumb:not(.ship-thumb) {
    transform: scale(1.35);
    clip-path: circle(35.5% at 49.5% 36%); 
    filter: brightness(1.12) contrast(1.07) saturate(1.12); /* Refined 50% Vibrancy */
}

/* Rectangular Ships: More aggressive crop for bottom/right leaks at 1.35x zoom (Final Right balance: 17%) */
/* Naves Normales del Roster: Zoom central */
:is(.char-card:not(.gl-card), .gl-status-card:not(.gl-card)):hover .char-thumb.ship-thumb:not(.capital-ship .char-thumb) {
    transform: scale(1.35);
    transform-origin: center center;
    clip-path: inset(1% 17% 31% 14% round 2.96px); 
    filter: brightness(1.1) contrast(1.05) saturate(1.1);
}

/* Naves Capitales del Roster: Zoom dirigido al puente (35%) */
:is(.char-card:not(.gl-card), .gl-status-card:not(.gl-card)).capital-ship:hover .char-thumb {
    transform: scale(1.35) !important;
    transform-origin: 35% center !important;
    clip-path: inset(14% 18% 18% 9% round 2.96px) !important; 
    filter: brightness(1.1) contrast(1.05) saturate(1.1) !important;
}

.side-dark .char-thumb.ship-thumb {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8);
}

/* Ensure NO rings apply to GL cards */
.gl-card .portrait-wrapper::after {
    display: none !important;
}

/* Character ID specific overrides if needed */

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
}

/* GL Tracker Grid System */
.gl-tracker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.9rem;
    margin-bottom: 2.5rem;
}

/* 7 columns for Capital Ships on desktop */
.gl-tracker-grid.ships-grid {
    grid-template-columns: repeat(7, 1fr) !important;
}

/* 5 columns for Conquest Ships on desktop for better readability of scores */
.gl-tracker-grid.conquest-ships-grid {
    grid-template-columns: repeat(5, 1fr) !important;
}

@media (max-width: 1100px) {
    .gl-tracker-grid.ships-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .gl-tracker-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 950px) {

    .gl-tracker-grid,
    .gl-tracker-grid.conquest-ships-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gl-tracker-grid.ships-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 700px) {
    .gl-tracker-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gl-tracker-grid.ships-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 450px) {

    .gl-tracker-grid,
    .gl-tracker-grid.ships-grid {
        grid-template-columns: 1fr !important;
    }
}

/* GL / Ship Status Card Styles */
.gl-status-card {
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.gl-status-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
}

.gl-status-card.active {
    background: rgba(0, 242, 255, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
    transform: scale(1.03);
}

/* Goals inherit global alignment but keep their golden hierarchy on hover */
.gl-status-card.goal-style:hover {
    border-color: #d4af37 !important;
}

.gl-status-card.goal-style:hover,
.gl-status-card.goal-style.active {
    border-color: #d4af37 !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}

.goal-style.side-dark:hover {
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.3), inset 0 0 10px rgba(239, 68, 68, 0.2);
    border-color: #ef4444 !important;
}

.goal-style.side-light:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.3), inset 0 0 10px rgba(59, 130, 246, 0.2);
    border-color: #3b82f6 !important;
}

/* Alignment Styling: Dark Side (Red) - Background and Glows */
.gl-status-card.side-dark {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

.gl-status-card.side-dark:hover,
.gl-status-card.side-dark.active {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.gl-status-card.side-dark .gl-status-header h4 {
    color: #ef4444;
}

/* Portrait Adjustment for Tracker: GLs (Clean GOLD, no side colors) */
.gl-card.side-dark .gl-status-thumb,
.gl-card.side-light .gl-status-thumb {
    border: 2px solid #d4af37 !important;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4) !important;
    border-radius: 50% !important;
}



/* Alignment Styling: Light Side (Blue) - Background and Glows */
.gl-status-card.side-light {
    background: rgba(59, 130, 246, 0.05);
    /* Jedi Blue tint */
    border-color: rgba(59, 130, 246, 0.2);
}

.gl-status-card.side-light:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.gl-status-card.side-light.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
}

.gl-status-card.side-light .gl-status-header h4 {
    color: #3b82f6;
}

/* Portrait Alignment: Light Side */
.side-light .gl-status-thumb {
    border: 2px solid #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
    border-radius: 50%;
}



.gl-status-header {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.2rem;
    margin-bottom: 0.1rem;
}

.gl-status-header h4 {
    font-size: 0.95rem;
    color: #fff;
    margin: 0;
    font-family: var(--font-header);
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gl-status-body {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0.2rem 0;
}

.gl-status-thumb-box {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    /* Aligns photo to the right (towards center) */
}

.gl-status-val-box {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    /* Aligns text to the left (towards center) */
    text-align: left;
}

/* Eliminado el centrado forzado para unidades no activadas para permitir ver su porcentaje */

/* Character Portraits in Tracker (GL Row) */
.gl-status-thumb {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 2.2s ease-out !important;
    transform-origin: top center;
    clip-path: circle(49%);
}

/* All Ships in Tracker - Rectangular override */
.ship-portrait .gl-status-thumb,
.capital-ship .gl-status-thumb {
    width: 65px;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 4px !important;
    clip-path: inset(1% round 4px);
}

/* Tracker Zoom Logic sync */
:is(.gl-status-card:not(.gl-card)):hover .gl-status-thumb:not(.ship-portrait .gl-status-thumb):not(.capital-ship .gl-status-thumb) {
    transform: scale(1.35);
    clip-path: circle(35.5% at 49.5% 36%);
    filter: brightness(1.12) contrast(1.07) saturate(1.12);
}
/* Tracker: Naves Normales */
:is(.gl-status-card:not(.gl-card)):hover .ship-portrait .gl-status-thumb:not(.capital-ship .gl-status-thumb) {
    transform: scale(1.35);
    transform-origin: center center;
    clip-path: inset(1% 17% 31% 14% round 2.96px);
    filter: brightness(1.1) contrast(1.05) saturate(1.1);
}

/* Tracker: Naves Capitales con foco izquierdo (35%) */
:is(.gl-status-card:not(.gl-card)).capital-ship:hover .gl-status-thumb {
    transform: scale(1.35) !important;
    transform-origin: 35% center !important;
    clip-path: inset(14% 18% 18% 9% round 2.96px) !important;
    filter: brightness(1.1) contrast(1.05) saturate(1.1) !important;
}



/* GL exclusive gold circle */
/* .gl-card .gl-status-thumb {
    border: 2.5px solid #d4af37;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
} */

/* Legendary exclusive silver border */
/* .legendary-card .gl-status-thumb {
    border: 2px solid var(--text-secondary);
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.3);
} */

.gl-status-val {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: 'Orbitron', var(--font-header);
}

.gl-status-val.owned {
    color: #f8fafc;
    /* Blanco suave por defecto */
    text-shadow: none;
}

/* Alignment-Themed Star Colors */
.side-light .stars-7,
.side-light .stars-low {
    color: #7dd3fc !important;
    text-shadow: 0 0 5px rgba(125, 211, 252, 0.3) !important;
}

.side-dark .stars-7,
.side-dark .stars-low {
    color: #f43f5e !important;
    text-shadow: 0 0 5px rgba(244, 63, 94, 0.2) !important;
}

/* High-visibility stars for Capital and Conquest Ships in Profile (Dashboard) */
.gl-status-card.capital-ship .gl-status-val.owned,
.gl-status-card.premium-ship .gl-status-val.owned {
    color: #fff !important; 
    font-weight: 800 !important;
}

/* --- RESOURCE VAULT STYLES --- */
.resource-vault-trigger {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    color: var(--accent-primary);
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.resource-vault-trigger:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
    transform: scale(1.1);
}

.btn-resource-empty {
    opacity: 0.4;
    filter: grayscale(0.5);
}


.gl-status-card.capital-ship.side-light .gl-status-val.owned,
.gl-status-card.premium-ship.side-light .gl-status-val.owned {
    text-shadow: 0 0 10px var(--accent-primary), 0 0 5px var(--accent-primary) !important;
}

.gl-status-card.capital-ship.side-dark .gl-status-val.owned,
.gl-status-card.premium-ship.side-dark .gl-status-val.owned {
    text-shadow: 0 0 10px #ff4d6d, 0 0 5px #ff4d6d !important;
}

.stars-7 {
    font-weight: 700;
}

/* All Relics (R0-R10): Consistently solid yellow with no glow effects */
.relic-color-0,
.relic-color-1,
.relic-color-2,
.relic-color-3,
.relic-color-4,
.relic-color-5,
.relic-color-6,
.relic-color-7,
.relic-color-8,
.relic-color-9,
.relic-color-10,
.extra-info-container [class*="relic-color-"] {
    color: #ffff00 !important;
    text-shadow: none !important;
    filter: none !important;
    animation: none !important;
    transform: none !important;
    font-weight: 900;
}


.gl-status-val.percent {
    color: #f75e5e !important;
    /* Rojo claro sugerido */
    text-shadow: 0 0 10px rgba(255, 118, 117, 0.3) !important;
}



.gl-status-val.shards-val {
    font-size: 0.95rem;
    /* Ligeramente mÃƒÂ¡s pequeÃƒÂ±o para fragmentos */
}

.shard-total {
    font-size: 0.8em;
    opacity: 0.7;
    font-weight: 500;
}

.char-target {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0px;
}

.progress-info {
    padding-right: 0;
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.progress-bar-bg {
    flex-grow: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #7000ff, #00ffff);
    width: 0%;
    transition: width 1s ease-in-out;
}

.percent-label {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f75e5e !important;
    min-width: 45px;
    text-align: right;
    letter-spacing: 0.5px;
}

.status-badge {
    position: relative;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.status-badge.comp {
    background: rgba(12, 255, 134, 0.15);
    border: 1px solid rgba(12, 255, 134, 0.3);
    color: #00FF00 !important;
}

.status-badge.badge-orange {
    background: rgba(245, 158, 11, 0.25) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.status-badge.badge-dark-green {
    background: rgba(0, 128, 0, 0.15) !important;
    color: #008000 !important;
    border: 1px solid rgba(0, 128, 0, 0.3) !important;
}

.status-badge.badge-red {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #f75e5e !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

/* Specific text colors for requirement comparison */
.req-met {
    color: #00FF00 !important;
}

.req-fail {
    color: #f75e5e !important;
}

footer {
    text-align: center;
    padding: 1rem 0 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mod Analysis Section */
#mod-analysis {
    margin: 0.6rem auto 1rem;
    padding: 0.8rem 1rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mod-stats-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.mod-stat-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 0.2rem;
}

.mod-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border-bottom: 3px solid var(--accent-primary);
    transition: all 0.3s ease;
    text-align: center;
}

.mod-stat-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.05);
}

.mod-stat-icon {
    position: absolute;
    left: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--accent-primary);
    opacity: 0.8;
}

.mod-stat-val {
    font-family: var(--font-header);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.mod-stat-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Responsive Mod Grid */
@media (max-width: 1024px) {
    .mod-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .mod-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .mod-stats-grid {
        grid-template-columns: 1fr;
    }
}


/* Extra Info Container (Zetas, Omicrons, Datacrons) */
.extra-info-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4rem;
    /* SeparaciÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ³n reducida entre items (half distanced) */
    padding-top: 0.4rem;
    margin-top: 0.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    width: 100%;
}

.extra-info-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    /* Menos espacio entre icono y valor */
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.2rem 0.3rem;
    /* Padding mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s compacto */
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.extra-info-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.relic-stat .extra-info-icon {
    font-weight: 900;
    font-size: 0.9rem;
    font-family: var(--font-header);
    letter-spacing: 0.5px;
    text-shadow: none !important;
}

.relic-stat .extra-info-val {
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
}

.extra-info-icon {
    font-size: 1rem;
}

.extra-info-val {
    font-family: var(--font-header);
    font-weight: 700;
    color: #fff;
}

.extra-info-label {
    opacity: 0.6;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-link-btn {
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: var(--accent-primary);
    background: transparent;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-family: var(--font-header);
    font-size: 0.7rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.profile-link-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

@media (max-width: 600px) {
    .extra-info-container {
        gap: 0.5rem;
    }
}

/* Requirements Cards inside GL Detail */
.requirements-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.9rem;
}

@media (max-width: 1300px) {
    .requirements-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .requirements-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 750px) {
    .requirements-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .requirements-list {
        grid-template-columns: 1fr;
    }
}

/* Global Utilities */
.hidden {
    display: none !important;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 10, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    transition: all 0.3s ease;
}

#loader p {
    font-family: var(--font-header);
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent-primary);
    text-transform: uppercase;
    text-align: center;
    margin-top: 2rem;
    animation: none;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(0, 242, 255, 0.1);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.98);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Roster / Collection Section */
#full-roster {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#full-roster h2 {
    margin-bottom: 1rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.8rem;
    font-family: var(--font-header);
    text-align: center;
}

.roster-sub-section {
    margin-bottom: 3rem;
}

.roster-sub-section h3 {
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    padding-left: 0.5rem;
    border-left: 3px solid var(--accent-primary);
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#charsTitle {
    border-left-color: var(--accent-primary);
}


.roster-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.9rem;
}

@media (max-width: 1300px) {
    .roster-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .roster-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 750px) {
    .roster-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .roster-grid {
        grid-template-columns: 1fr;
    }
}

/* --- EXCLUSIVE ROSTER THEME --- */
/* This only applies to the Roster section (#charsGrid and #shipsGrid) */

/* 1. LIGHT SIDE: Cyan for Gear/Relic, Darker Cyan for Stars */
.roster-grid .side-light .char-target,
.gl-tracker-grid .side-light .gl-status-val,
.requirements-list .side-light .char-target {
    color: #00ffff !important;
}

.roster-grid .side-light .stars-7,
.roster-grid .side-light .stars-low,
.gl-tracker-grid .side-light .stars-7,
.gl-tracker-grid .side-light .stars-low,
.requirements-list .side-light .stars-7,
.requirements-list .side-light .stars-low {
    color: #008888 !important;
    text-shadow: none !important;
    font-size: 0.85rem !important;
}

.roster-grid .side-light [class*="relic-color-"],
.gl-tracker-grid .side-light [class*="relic-color-"],
.requirements-list .side-light [class*="relic-color-"] {
    color: #00ffff !important;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.4) !important;
    animation: none !important;
    filter: none !important;
}

/* 2. DARK SIDE: Red for Gear/Relic, Darker Red for Stars */
.roster-grid .side-dark .char-target,
.gl-tracker-grid .side-dark .gl-status-val,
.requirements-list .side-dark .char-target {
    color: #ff0000 !important;
}

.roster-grid .side-dark .stars-7,
.roster-grid .side-dark .stars-low,
.gl-tracker-grid .side-dark .stars-7,
.gl-tracker-grid .side-dark .stars-low,
.requirements-list .side-dark .stars-7,
.requirements-list .side-dark .stars-low {
    color: #aa0000 !important;
    text-shadow: none !important;
    font-size: 0.85rem !important;
}

.roster-grid .side-dark [class*="relic-color-"],
.gl-tracker-grid .side-dark [class*="relic-color-"],
.requirements-list .side-dark [class*="relic-color-"] {
    color: #ff0000 !important;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.4) !important;
    animation: none !important;
    filter: none !important;
}

/* 2.5 BLUE-ISH GLOW FOR G4-G6 */
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-4:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-5:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-6:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-4 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-5 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-6 .portrait-wrapper::before {
    display: block !important;
    --ring-glow: rgb(111, 188, 229);
    box-shadow: 0 0 3px var(--ring-glow), 0 0 3px var(--ring-glow) !important;
}

/* 2.5b SILVER-ISH GLOW FOR G1-G3 */
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-1:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-2:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-3:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-1 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-2 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-3 .portrait-wrapper::before {
    display: block !important;
    --ring-glow: rgb(196, 209, 209);
    box-shadow: 0 0 3px var(--ring-glow), 0 0 3px var(--ring-glow) !important;
}

/* 2.6 VISIBLE YELLOW GLOW FOR G12 (Roster only) */
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-12:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-12 .portrait-wrapper::before {
    display: block !important;
    --ring-glow: rgba(255, 215, 0, 1.0);
    box-shadow: 0 0 4px var(--ring-glow), 0 0 4px var(--ring-glow) !important;
}

/* 2.7 PURPLE GLOW FOR G7-G11 */
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-7:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-8:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-9:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-10:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-11:not(.ship) .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-7 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-8 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-9 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-10 .portrait-wrapper::before,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-11 .portrait-wrapper::before {
    display: block !important;
    --ring-glow: rgba(147, 82, 245, 1.0);
    box-shadow: 0 0 4px var(--ring-glow), 0 0 4px var(--ring-glow) !important;
}

/* 3. NEUTRAL OVERRIDES: Keep Power display as is, and make separator white */
.roster-grid .char-target[style*="opacity: 0.5"] {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* This makes the pipe "|" white in the details line and sets uniform font size for EVERYONE in Roster */
.roster-grid .char-card .char-target:not([style*="opacity: 0.5"]),
.roster-grid .char-card .char-target:not([style*="opacity: 0.5"]) span,
.roster-grid .char-card .char-target:not([style*="opacity: 0.5"]) .gear-level-text,
.roster-grid .char-card .char-target:not([style*="opacity: 0.5"]) [class*="stars-"],
.roster-grid .char-card .char-target:not([style*="opacity: 0.5"]) [class*="relic-color-"] {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    font-family: var(--font-header) !important;
}

.roster-grid .char-card .char-target:not([style*="opacity: 0.5"]) {
    color: #ffffff !important;
}

/* Ensure relic text retains itsfaction color if we ever decide to change it, but keep size fixed */
.roster-grid [class*="relic-color-"] {
    font-size: 0.85rem !important;
}

/* 4. GEAR-SPECIFIC TEXT COLORS */
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-12 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-12 .gear-level-text {
    color: rgb(204, 177, 21) !important;
}

:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-7 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-8 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-9 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-10 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-11 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-7 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-8 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-9 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-10 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-11 .gear-level-text {
    color: rgb(147, 82, 245) !important;
}

:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-4 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-5 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-6 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-4 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-5 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-6 .gear-level-text {
    color: rgb(111, 188, 229) !important;
}

:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-1 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-2 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .char-card.g-3 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-1 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-2 .gear-level-text,
:is(.roster-grid, .gl-tracker-grid, .requirements-list) .gl-status-card.g-3 .gear-level-text {
    color: rgb(196, 209, 209) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Input Magnification Effect */
.search-input-wrapper {
    position: relative;
    overflow: visible;
    /* Permite que la lupa sobresalga sin cortarse */
    display: flex;
    align-items: center;
}

.magnifier-lens {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0);
    left: -50px;
    /* Ajustado 50px mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s a la derecha como pediste */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--accent-primary);
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.6), inset 0 0 15px rgba(0, 242, 255, 0.4);
    overflow: hidden;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    backdrop-filter: blur(4px);
}

.magnifier-mirror {
    position: absolute;
    left: 2rem;
    width: 500px;
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-family: var(--font-header);
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 1.5px;
    transform-origin: center left;
    filter: drop-shadow(0 0 2px var(--accent-primary));
}

.search-input-wrapper:hover .magnifier-lens {
    animation: magnifySweepOnce 2s ease-out forwards;
}

.search-input-wrapper:hover .magnifier-mirror {
    animation: mirrorSyncOnce 2s ease-out forwards;
}

@keyframes magnifySweepOnce {
    0% {
        left: -50px;
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }

    15% {
        transform: translateY(-50%) scale(1.15);
        opacity: 1;
    }

    85% {
        transform: translateY(-50%) scale(1.15);
        opacity: 1;
    }

    100% {
        left: 90%;
        /* Ajuste fino: 1px (o 1%) mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s a la izquierda para precisiÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ³n total */
        transform: translateY(-50%) scale(0);
        opacity: 0;
    }
}

@keyframes mirrorSyncOnce {
    0% {
        transform: translateX(50px);
    }

    100% {
        transform: translateX(-400px);
        /* Reajustado para el nuevo punto final */
    }
}

.gl-search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 1.4rem;
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.8));
    opacity: 0.9;
    pointer-events: none;
    z-index: 2;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: var(--z-dropdown);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-container {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.matrix-scroll {
    display: flex;
    justify-content: center;
}

.matrix-account-name {
    width: 100px;
}

.matrix-header {
    padding: 1rem 1.7rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}
.matrix-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    text-align: center;
}
.close-matrix {
    position: absolute;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #475569;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s;
}

@keyframes modalSlide {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    flex-grow: 1;
    background: var(--bg-dark);
    position: relative;
    overflow-y: auto;
    padding: 2.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: var(--accent-primary);
    border-radius: 10px;
}

/* GL Tracker Search Bar - Premium Design */
.gl-search-container {
    margin-bottom: 1.5rem;
    /* Espacio reducido por abajo */
    position: relative;
    max-width: 500px;
    /* MÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s pequeÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ±o horizontalmente */
    margin-left: auto;
    margin-right: auto;
    padding: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.4), transparent);
    border-radius: 15px;
    transition: all 0.4s ease;
}

.gl-search-container:hover {
    background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.7), transparent);
}

.gl-search-input {
    width: 100%;
    background: rgba(15, 20, 29, 0.95);
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 14px;
    padding: 0.8rem 3rem 0.8rem 3.5rem;
    /* MÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s compacto verticalmente */
    color: #fff;
    font-size: 1.05rem;
    /* Fuente un poco mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s pequeÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ±a */
    font-family: var(--font-header);
    letter-spacing: 1px;
    outline: none; transition: box-shadow 0.2s ease;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7),
        inset 0 0 10px rgba(0, 242, 255, 0.05);
}

.gl-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    letter-spacing: 1px;
}

.gl-search-input:focus {
    background: #161c27;
    border-color: rgba(0, 242, 255, 0.6);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.2),
        0 15px 40px rgba(0, 0, 0, 0.8);
    padding-left: 3.8rem;
}

.gl-search-icon {
    position: absolute;
    left: 1.2rem;
    /* Ajustado al nuevo padding */
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-primary);
    font-size: 1.4rem;
    /* Icono mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s acorde al tamaÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ±o */
    filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.8));
    opacity: 0.9;
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.gl-search-input:focus+.gl-search-icon,
.gl-search-container:focus-within .gl-search-icon {
    transform: translateY(-50%) scale(1.1) rotate(10deg);
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(0, 242, 255, 1));
}

/* Background glow for the search area */
.gl-search-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 130%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.08) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.6s ease;
}

.gl-search-container:focus-within::before {
    opacity: 0.8;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.modal-unit-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    text-align: center;
}

.modal-unit-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.1);
}

.modal-unit-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 2px solid var(--accent-primary);
    background: #000;
}

.modal-unit-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    font-family: var(--font-header);
    line-height: 1.2;
}

.modal-unit-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ability-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
}

.zeta-badge {
    color: #fff;
    background: rgba(97, 97, 97, 0.5);
}

.omicron-badge {
    color: #fff;
    background: rgba(255, 152, 0, 0.5);
}

.datacron-card {
    border-color: rgba(0, 229, 255, 0.3);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(5, 7, 10, 1));
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.modal-details-view {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.3s ease;
}

.back-btn {
    align-self: center;
    padding: 0.7rem 1.5rem;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(0, 242, 255, 0.05); /* Mismo fondo que el Scanner */
    border: 1px solid rgba(0, 242, 255, 0.3);
    color: var(--accent-primary);
    border-radius: 8px; /* Ajustado para coincidir con el Scanner */
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem; /* Reducido para un look mÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡s compacto */
    transition: all 0.3s ease;
    width: fit-content;
}

.back-btn:hover {
    background: rgba(0, 242, 255, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    transform: translateY(-1px);
    color: #fff;
}

.details-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.details-header img {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    border: 3px solid var(--accent-primary);
}

.details-title h3 {
    font-family: var(--font-header);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.details-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.ability-detail-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
}

.ability-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.zeta-border::before {
    background: #fff;
    box-shadow: 0 0 10px #fff;
}

.omicron-border::before {
    background: #ff9800;
    box-shadow: 0 0 10px #ff9800;
}

.ability-type-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}

.ability-name-text {
    font-family: var(--font-header);
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.datacron-bonus-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.datacron-tier {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

.tier-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.3rem;
}

.tier-value {
    font-size: 0.9rem;
    color: #fff;
}

.modal-overlay.hidden {
    display: none;
    opacity: 0;
}

.selected-gl-main {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-grow: 1;
}

.selected-gl-main .progress-circle {
    margin-left: auto;
    margin-right: 2rem;
}

/* --- MOBILE & VERTICAL RESPONSIVENESS OPTIMIZATIONS --- */

/* Align profile button to the right */
.profile-link-btn {
    margin-left: auto;
}

@media (max-width: 850px) {
    header {
        flex-direction: column !important;
        height: auto !important;
        padding: 0.4rem 0.6rem 0.1rem 0.6rem !important;
        gap: 0.1rem !important;
        position: relative !important;
    }

    .header-left {
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.2rem !important;
        justify-content: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding-bottom: 0.2rem !important;
    }

    .social-lang-row {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        width: 100% !important;
        min-height: 32px !important;
        padding: 0 !important;
    }

    /* TRUST CENTER: 2 COLUMNS ON MOBILE (HALF SIZE) (v05) */
    .trust-center-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 0 5px !important;
        margin-top: 5px !important;
    }

    .trust-card {
        padding: 8px 4px !important;
        margin-bottom: 0px !important;
        min-height: auto !important;
        border-radius: 8px !important;
    }

    .trust-card-title {
        font-size: 0.56rem !important;
        margin-bottom: 4px !important;
        gap: 2px !important;
        white-space: nowrap !important;
        line-height: 1 !important;
        text-align: center !important;
        justify-content: center !important;
        letter-spacing: -0.5px !important;
        overflow: visible !important;
    }

    .title-icon {
        font-size: 0.82rem !important;
    }

    /* FORCED HIDE FOR BULLETS ON MOBILE */
    .trust-center-container .trust-card .trust-bullet-list {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .trust-card-btn {
        display: block !important;
        margin-top: 10px !important;
        padding: 6px 4px !important; 
        font-size: 0.45rem !important; /* +10% aprox sobre 0.4rem */
        letter-spacing: 0.5px !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .header-social {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        border-left: none !important;
        padding: 0 !important;
        gap: 12px !important;
        margin: 0 !important;
    }

    .header-social a {
        display: flex !important;
        color: rgba(255, 255, 255, 0.8) !important;
        width: 32px !important;
        height: 32px !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
    }

    .header-social svg {
        width: 22px !important;
        height: 22px !important;
        fill: currentColor !important;
        display: block !important;
    }

    #langDropdownMobile .custom-lang-trigger {
        padding: 0 !important;
        width: auto !important;
    }

    .search-container {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .player-info-display {
        border: none;
        padding: 0;
        margin: 0;
        border-right: none;
        width: 100%;
        justify-content: space-between;
        display: flex;
        flex-direction: row;
        align-items: center;
        max-width: 500px;
        gap: 0.5rem;
    }

    #playerName {
        font-size: 1rem;
        flex: 1;
        text-align: left;
    }

    #playerStats {
        text-align: right;
    }

    .search-inputs-row {
        /* We might need a wrapper or just handle them */
        display: flex;
        width: 100%;
        gap: 10px;
        max-width: 500px;
    }

    #allyCodeInput {
        flex: 1.5;
        min-width: 0;
        order: 1;
        /* Initial position for mobile */
    }

    #langDropdown {
        flex: 0 0 auto;
        min-width: 55px;
        padding: 0.6rem 5px;
        font-size: 0.85rem;
        text-align: center;
        order: 2;
        /* Middle position for mobile */
    }

    #searchBtn {
        flex: 1;
        padding: 0.6rem 0.5rem;
        font-size: 0.9rem;
        order: 3;
        /* Last position for mobile */
    }

    main {
        padding: 10px 1rem 0 1rem !important;
        margin-top: 0 !important;
    }

    #hero { padding: 0 3rem;
    }

    .selected-gl-header {
        flex-direction: row;
        padding: 0.8rem 1rem;
        gap: 0.8rem;
        margin-bottom: 1.2rem;
        min-height: 80px;
        align-items: center;
    }

    .selected-gl-main {
        flex-direction: row;
        gap: 0.8rem;
        width: 100%;
        align-items: center;
        position: relative;
    }

    .selected-gl-info {
        flex: 1;
        min-width: 0;
        margin-right: 50px;
        /* Space for the circle */
    }

    .selected-gl-portrait {
        width: 55px !important;
        height: 55px !important;
        flex-shrink: 0 !important;
    }

    .selected-gl-thumb {
        width: 55px !important;
        height: 55px !important;
    }

    .selected-gl-info h2 {
        font-size: 1rem !important;
        margin-bottom: 0px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .selected-gl-info .gl-type-badge {
        font-size: 0.6rem !important;
        padding: 2px 6px !important;
    }

    .selected-gl-main .progress-circle {
        position: absolute;
        right: 0;
        width: 48px !important;
        height: 48px !important;
        margin: 0 !important;
        transform: scale(1) !important;
        border-width: 3px !important;
    }

    .selected-gl-main .progress-circle span {
        font-size: 0.85rem !important;
    }

    .close-dashboard {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 28px !important;
        height: 28px !important;
        font-size: 18px !important;
        z-index: 200;
        background: rgba(40, 40, 40, 0.95) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }



}


@media (max-width: 500px) {

    /* Grids Optimization for Vertical Mobile: 2 COLUMNS */
    .mod-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem;
    }

    .gl-tracker-grid,
    .roster-grid#charsGrid,
    .requirements-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem;
        align-items: flex-start;
        /* Prevent cards from stretching to match taller neighbor's height */
    }

    .gl-tracker-grid.ships-grid,
    .gl-tracker-grid.conquest-ships-grid,
    .roster-grid#shipsGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem;
        align-items: flex-start;
    }

    .extra-info-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    /* Hide the spacer in extra-info on mobile */
    .extra-info-container>div[style*="flex-grow"] {
        display: none !important;
    }

    .profile-link-btn {
        grid-column: span 2;
        width: 100%;
        text-align: center;
        margin-top: 0.4rem;
    }

    .extra-info-item {
        width: 100%;
        justify-content: flex-start;
        padding: 0.5rem;
    }

    .char-card {
        padding: 0.7rem;
        gap: 4px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        /* Change from space-between to flex-start to keep content grouped */
    }

    .char-name {
        font-size: 0.85rem;
        margin-bottom: 0.2rem;
    }

    .char-thumb {
        width: 45px;
        height: 45px;
    }

    .char-thumb.ship-thumb {
        width: 100%;
        height: auto;
    }

    .relic-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    .percent-label {
        font-size: 0.85rem;
        min-width: 40px;
    }

    .status-badge {
        position: static;
        padding: 2px 6px;
        font-size: 0.65rem;
        margin-bottom: 2px;
    }

    .progress-bar-bg {
        height: 6px;
    }

    .modal-container {
        height: 95vh;
        width: 98%;
    }

    .modal-body {
        padding: 1.2rem;
    }

    .details-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .details-title h3 {
        font-size: 1.4rem;
    }

    /* Ship cards specific optimization for narrow 2-column view */
    .char-card.ship .char-id-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 0px;
    }

    .char-card.ship .char-thumb.ship-thumb {
        width: 100%;
        max-width: 120px;
        height: auto;
    }

    .char-card.ship .portrait-wrapper.ship-portrait,
    .char-card.ship .portrait-wrapper.capital-ship {
        width: 100%;
        max-width: 120px;
        transform: none;
    }

    .char-card.ship .char-info-text {
        width: 100%;
    }

    .char-card.ship .char-name {
        font-size: 0.8rem;
        white-space: normal;
        overflow: visible;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 2px;
    }

    .char-card.ship .char-target {
        font-size: 0.7rem;
        margin-top: -2px;
    }

    .char-card .progress-info {
        margin-top: auto;
    }

    .char-card .progress-info>div:first-child {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 2px;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 1.2rem;
    }

    .gp-number {
        font-size: 1rem;
    }

    .gl-search-input {
        font-size: 0.95rem;
    }

    .gl-search-icon {
        font-size: 1.1rem;
        left: 0.8rem;
    }
}

/* Priority Overrides for Progress Colors */
.gl-status-val.percent.prog-100,
.percent-label.prog-100,
.percent-text.prog-100,
.prog-light-green {
    color: #00FF00 !important; /* Verde claro */
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.4) !important;
}

.gl-status-val.percent.prog-80,
.percent-label.prog-80,
.percent-text.prog-80 {
    color: #008000 !important; /* Verde base */
    text-shadow: 0 0 10px rgba(0, 128, 0, 0.3) !important;
}

.prog-80 .shard-current {
    color: #00b800 !important; /* Levemente mÃƒÂ¡s brillante para destacar progreso actual */
}

.prog-dark-green {
    color: #008000 !important; /* Verde oscuro */
    text-shadow: 0 0 10px rgba(0, 128, 0, 0.3) !important;
}

.progress-bar-fill.fill-dark-green {
    background: #008000 !important;
}

/* Separator for Not Activated Units */
.not-activated-separator {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0 0.5rem 0;
    gap: 15px;
    width: 100%;
}

.not-activated-separator::before,
.not-activated-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to var(--direction, right), transparent, rgba(255, 255, 255, 0.15));
}

.not-activated-separator::after {
    --direction: left;
}

.not-activated-separator h3 {
    font-family: var(--font-header);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
    margin: 0;
}

/* Filter System UI */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.filter-toggle-btn {
    position: absolute;
    right: 0.8rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--accent-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 5px;
}

.clear-search-btn {
    position: absolute;
    right: 3rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 2px;
    line-height: 1;
    transition: color 0.2s;
}

.clear-search-btn:hover {
    color: var(--danger);
}

.clear-search-btn.hidden {
    display: none;
}

.filter-toggle-btn:hover {
    transform: rotate(30deg) scale(1.1);
    color: #fff;
}

.filter-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-secondary);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-panel {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 242, 255, 0.3);
    animation: slideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.filter-panel.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
}

.filter-header h3 {
    font-family: var(--font-header);
    font-size: 1rem;
    color: var(--accent-primary);
    margin: 0;
}

.clear-filters-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

.filter-sections-scrollable {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
}

.filter-sections-scrollable::-webkit-scrollbar {
    width: 4px;
}

.filter-sections-scrollable::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section h4 {
    font-family: var(--font-header);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.filter-chip.active {
    background: rgba(0, 242, 255, 0.2);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

@media (max-width: 500px) {
    .filter-panel {
        width: 110%;
        left: -5%;
    }
.choice-info-note {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02) !important;
}

.choice-info-note b {
    color: var(--accent-primary);
}
}

/* ÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ ¬ÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ ¬ Barra de scroll horizontal flotante SWGOH ÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ ¬ÃƒÆ’Ã†â€™ ¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬ ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ ¬ */
#floatingScrollBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 9000;
    background: rgba(10, 15, 23, 0.95);
    border-top: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

#floatingScrollBar.visible {
    opacity: 1;
    pointer-events: auto;
}

#floatingScrollBar::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

#floatingScrollBar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#floatingScrollBar::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

#floatingScrollBar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 255, 0.7);
}

#floatingScrollInner {
    height: 1px;
}

/* Asegurar que todos los enlaces tengan el cursor de 'mano' */
a {
    cursor: pointer !important;
}

/* Solo el texto del copyright para el modo gestiÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ³n queda con cursor de texto (discreto) */
.copyright-discrete {
    cursor: text !important;
}

.copyright-discrete a {
    cursor: pointer !important;
}
.clickable-ally {
    cursor: pointer !important;
    transition: background-color 0.2s ease;
}

.clickable-ally:hover {
    background-color: rgba(0, 242, 255, 0.1) !important;
}

.clickable-ally:hover .ally-code-text {
    color: var(--accent-primary) !important;
}

.clickable-ally:hover svg {
    opacity: 1 !important;
    transform: translate(2px, -2px);
    transition: transform 0.2s ease;
}

/* TÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ­tulo dinÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡mico para el Dashboard (Solo PC + Horizontal) */
.dashboard-title .name-full {
    display: none;
}

@media (min-width: 1025px) and (orientation: landscape) {
    .dashboard-title .name-short {
        display: none;
    }
    .dashboard-title .name-full {
        display: inline;
    }
}

/* Pricing Bar (Compact Redesign) */
.estimated-value-bar {
    background: rgba(0, 50, 100, 0.4);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-top: 2px solid var(--accent-primary);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.estimated-value-bar:hover {
    background: rgba(0, 50, 100, 0.6);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.15);
}

.pricing-columns {
    display: flex;
    align-items: center;
    gap: 0;
    flex-grow: 1;
}

.price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1.5rem;
    position: relative;
}

.price-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(0, 191, 255, 0.2);
}

.estimated-value-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: rgba(0, 210, 255, 0.6);
    text-transform: uppercase;
    font-weight: 700;
}

.estimated-value-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.estimated-value-amount.suggested {
    color: var(--accent-primary);
}

.estimated-value-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}


@media (max-width: 500px) {
    .filter-panel {
        width: 110%;
        left: -5%;
    }
.choice-info-note {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02) !important;
}

.choice-info-note b {
    color: var(--accent-primary);
}
}

/* ------------------------------------------------------------------------- */
/* --- Barra de scroll horizontal flotante SWGOH --- */
#floatingScrollBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    z-index: 9000;
    background: rgba(10, 15, 23, 0.95);
    border-top: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: none;
}

#floatingScrollBar.visible {
    opacity: 1;
    pointer-events: auto;
}

#floatingScrollBar::-webkit-scrollbar {
    height: 8px;
    background: transparent;
}

#floatingScrollBar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#floatingScrollBar::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 255, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

#floatingScrollBar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 255, 0.7);
}

#floatingScrollInner {
    height: 1px;
}

/* Asegurar que todos los enlaces tengan el cursor de 'mano' */
a {
    cursor: pointer !important;
}

/* Solo el texto del copyright para el modo gestiÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ³n queda con cursor de texto (discreto) */
.copyright-discrete {
    cursor: text !important;
}

.copyright-discrete a {
    cursor: pointer !important;
}
.clickable-ally {
    cursor: pointer !important;
    transition: background-color 0.2s ease;
}

.clickable-ally:hover {
    background-color: rgba(0, 242, 255, 0.1) !important;
}

.clickable-ally:hover .ally-code-text {
    color: var(--accent-primary) !important;
}

.clickable-ally:hover svg {
    opacity: 1 !important;
    transform: translate(2px, -2px);
    transition: transform 0.2s ease;
}

/* TÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ­tulo dinÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡ ¡mico para el Dashboard (Solo PC + Horizontal) */
.dashboard-title .name-full {
    display: none;
}

@media (min-width: 1025px) and (orientation: landscape) {
    .dashboard-title .name-short {
        display: none;
    }
    .dashboard-title .name-full {
        display: inline;
    }
}

/* Pricing Bar (Compact Redesign) */
.estimated-value-bar {
    background: rgba(0, 50, 100, 0.4);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-top: 2px solid var(--accent-primary);
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.estimated-value-bar:hover {
    background: rgba(0, 50, 100, 0.6);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.15);
}

.pricing-columns {
    display: flex;
    align-items: center;
    gap: 0;
    flex-grow: 1;
}

.price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1.5rem;
    position: relative;
}

.price-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(0, 191, 255, 0.2);
}

.estimated-value-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: rgba(0, 210, 255, 0.6);
    text-transform: uppercase;
    font-weight: 700;
}

.estimated-value-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.estimated-value-amount.suggested {
    color: var(--accent-primary);
}

.estimated-value-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Updated Toast for PRICING BREAKDOWN (Wide Modal Style) */
#swgoh-toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: none;
    z-index: 10005;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
    pointer-events: none;
}

#swgoh-toast-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#swgoh-toast.wide-toast {
    background: rgba(10, 15, 25, 0.98) !important;
    color: #fff !important;
    border: 2px solid var(--accent-primary);
    border-radius: 12px !important;
    padding: 1rem !important; /* Reduced padding for cleaner look */
    max-width: 98vw !important;
    width: fit-content !important;
    min-width: min(400px, 95vw) !important;
    max-height: 85vh !important; /* Slightly reduced to leave space for bottom bar */
    overflow-y: auto !important;
    overscroll-behavior: contain !important; /* Block page scroll */
    pointer-events: auto !important; /* Ensure capture */
    box-shadow: 0 10px 50px rgba(0, 0, 0, 1), 0 0 30px rgba(0, 191, 255, 0.3) !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    white-space: normal !important;
    text-align: left !important;
    text-transform: none !important;
    z-index: 20005;
}

#swgoh-toast.wide-toast.visible {
    opacity: 1;
    visibility: visible;
}

body.modal-open {
    overflow: hidden !important; /* Stop body from scrolling */
    height: 100vh !important;
}

.pricing-category-section {
    margin-bottom: 2rem;
    animation: fadeIn 0.4s ease forwards;
}

.pricing-category-section h4 {
    border-left: 3px solid var(--accent-primary);
    background: linear-gradient(90deg, rgba(0, 191, 255, 0.1), transparent);
    padding: 8px 15px !important;
    margin-bottom: 1rem !important;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
}

.pricing-audit-btn {
    background: rgba(0, 191, 255, 0.15);
    border: 1px solid var(--accent-primary);
    border-radius: 30px;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
    animation: none;
    white-space: nowrap;
}

.pricing-audit-btn:hover {
    background: var(--accent-primary);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.4);
}

.pricing-audit-btn .audit-icon {
    font-size: 1.1rem;
}

.pricing-audit-btn .audit-text {
    font-family: 'Orbitron';
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff;
}



.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border-left: 2px solid rgba(0, 191, 255, 0.2);
    transition: all 0.2s ease;
}

.pricing-item:hover {
    background: rgba(0, 191, 255, 0.05);
    border-left-color: var(--accent-primary);
}

.pricing-item-name {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
}

.pricing-item-val {
    font-weight: 700;
    color: var(--accent-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
}

.pricing-total-row {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--accent-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === ACCOUNT SUMMARY CARD (PREMIUM) === */
.summary-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: none;
    -webkit-backdrop-filter: blur(8px);
    z-index: calc(var(--z-panel) - 1);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.summary-backdrop.visible {
    display: block;
    opacity: 1;
}

.account-summary-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: fit-content;
    max-width: 95vw;
    height: auto;
    max-height: 90vh;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 15, 30, 0.99) 100%);
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 210, 255, 0.1);
    border-radius: 20px;
    z-index: var(--z-panel);
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    font-family: 'Outfit', sans-serif;
    color: #f8fafc;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    filter: none !important;
}

.account-summary-card.visible {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.summary-header {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr auto;
    gap: 10px;
    margin-bottom: 8px;
    align-items: stretch;
}

.summary-header-box {
    background: rgba(15, 23, 42, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    min-height: 52px;
    gap: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.summary-header-box .label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.65rem;
    color: #d4af37; 
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.summary-header-box .value {
    font-weight: 700;
    font-size: 0.8rem !important;
    color: var(--accent-primary) !important;
    white-space: nowrap;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(max-content, 1.2fr));
    gap: 10px;
}

.summary-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-table-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

.summary-table-header {
    background: rgba(212, 175, 55, 0.25); 
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.summary-table-header h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    margin: 0;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-table-header span {
    font-size: 0.65rem;
    opacity: 0.6;
}

.summary-table-content {
    display: flex;
    flex-direction: column;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row .name {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

.summary-row .val {
    font-weight: 600;
    color: var(--accent-primary);
    white-space: nowrap;
}

.summary-row.completed .val {
    color: #0cff86;
}

.summary-row.progress-bar-row {
    flex-direction: column;
    padding-bottom: 8px;
}

.mini-progress-bg {
    width: 100%;
    height: 4px; 
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: var(--accent-primary);
}

.section-blue .summary-table-header { background: rgba(0, 210, 255, 0.25); border-color: rgba(0, 210, 255, 0.4); }
.section-blue .summary-table-header h4 { color: #87e0ff; }

.section-orange .summary-table-header { background: rgba(245, 158, 11, 0.25); border-color: rgba(245, 158, 11, 0.4); }
.section-orange .summary-table-header h4 { color: #ffbc4d; }

.section-purple .summary-table-header { background: rgba(168, 85, 247, 0.2); border-color: rgba(168, 85, 247, 0.3); }
.section-purple .summary-table-header h4 { color: #d8b4fe; }

.section-green .summary-table-header { background: rgba(34, 197, 94, 0.2); border-color: rgba(34, 197, 94, 0.3); }
.section-green .summary-table-header h4 { color: #4ade80; }

.section-teal .summary-table-header { background: rgba(20, 184, 166, 0.2); border-color: rgba(20, 184, 166, 0.3); }
.section-teal .summary-table-header h4 { color: #2dd4bf; }

/* Modal Controls */
.summary-controls-inline {
    display: flex;
    gap: 6px;
    margin-left: auto;
    align-items: center; /* Centering vertically relative to header labels */
}

.close-btn-header, .export-btn-header, .copy-btn-header, .link-btn-header {
    background: rgba(0, 210, 255, 0.08) !important;
    border: 1px solid rgba(0, 210, 255, 0.2) !important;
    color: var(--accent-primary);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease !important;
    opacity: 0.9;
}

.copy-btn-header:hover, .export-btn-header:hover, .close-btn-header:hover, .link-btn-header:hover {
    background: rgba(0, 210, 255, 0.2) !important;
    border-color: var(--accent-primary) !important;
    color: #fff !important;
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

/* Export Styles (Hide UI elements during image generation) */
.is-exporting .summary-controls-inline {
    display: none !important;
}

.is-exporting .summary-header {
    grid-template-columns: 1fr 1fr; 
    gap: 4px;
}

.is-exporting .summary-header-box {
    margin-right: 0;
}

/* Unit Grid */
.summary-table-content.grid-4 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2px;
    row-gap: 6px;
    padding: 6px;
}

.summary-unit-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: transform 0.2s ease;
}

.summary-unit-card:hover { transform: translateY(-2px); }

.summary-unit-image {
    width: 68px;
    height: 52px;
    border-radius: 12px;
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-bottom: 3px solid var(--accent-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    background: #000;
}

.unit-image-background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
}

.unit-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.unit-name-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    color: #ffffff !important;
    text-transform: uppercase;
    text-shadow: 0 1px 4px #000, 0 0 4px #000;
    z-index: 5;
    position: relative;
    text-align: center;
    padding: 0 1px;
    line-height: 1.1;
    white-space: pre-wrap;
    width: 100%;
}

.summary-unit-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 800;
    font-size: 0.85rem;
    font-family: 'Orbitron', sans-serif;
}

.summary-unit-level img {
    height: 27px;
    object-fit: contain;
}

.summary-unit-level.relic {
    color: var(--success);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.summary-unit-level.relic-low {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.summary-unit-level.relic-fail {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Layout for export */
.account-summary-card.is-exporting .summary-controls-inline { display: none !important; }
.account-summary-card.is-exporting {
    padding: 20px;
    border: none;
    transform: none;
    box-shadow: none;
    border-radius: 20px;
}

/* Relic/Level Indicator below the card */
.summary-unit-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 800;
    font-size: 0.85rem;
    font-family: 'Orbitron', sans-serif;
}

.summary-unit-level img {
    height: 27px; /* Increased 50% (from 18px to 27px) */
    object-fit: contain;
}

.summary-unit-level.relic {
    color: var(--success);
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.summary-unit-level.relic-medium {
    color: #059669; /* Verde oscuro (Emerald 600) */
    text-shadow: 0 0 10px rgba(5, 150, 105, 0.4);
}

.summary-unit-level.relic-fail {
    color: #ef4444; /* Rojo (Red 500) */
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.summary-unit-level.relic-low {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.summary-unit-level.incomplete {
    color: rgba(255, 255, 255, 0.6);
}

/* Brighten stars (4-7*) ONLY for units in Summary as requested (GLs, Legendaries, TB, Ships) */
.summary-table-content .summary-unit-level.is-star.relic-low,
.summary-table-content .summary-unit-level.is-star.relic {
    color: #e0f2fe !important; 
    text-shadow: 0 0 5px rgba(0, 242, 255, 0.4), 0 0 2px var(--accent-primary) !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
}

.summary-table-content .summary-unit-level.is-star.relic-fail {
    color: #fff1f2 !important; 
    text-shadow: 0 0 5px rgba(255, 77, 109, 0.4), 0 0 2px #ff4d6d !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
}

/* Playtime styling */
#summaryPlaytime {
    font-size: 0.85rem !important;
    color: #fff !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

/* Ajustes responsivos para Summary Card */
@media (max-width: 900px) {
    .account-summary-card {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .summary-table-content.grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 8px;
    }
    .summary-unit-image {
        width: 60px;
        height: 46px;
    }
}

@media (max-width: 480px) {
    .summary-table-content.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Header Social Links */
.header-social {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 0px;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.header-social a {
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transition: none !important;
    text-decoration: none;
}

.header-social a:hover {
    color: var(--accent-primary);
}

/* Mobile social icons visibility handled in the 850px block */

/* Footer Social Icons Adjustment */
.footer-social-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.footer-social-wrapper .header-social {
    border-left: none !important;
    padding: 0 !important;
    display: flex !important; /* Force visible in footer even on mobile */
}

.footer-social-wrapper .header-social a {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.footer-social-wrapper .header-social a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Discord Floating Button */
.discord-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: #5865F2;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(88, 101, 242, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: none;
    text-decoration: none;
}

.discord-float svg {
    width: 26px;
    height: 26px;
}

.discord-float:hover {
    transform: scale(1.15) rotate(5deg);
    background-color: #4752c4;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(88, 101, 242, 0.6);
}



/* Hide during export */
.is-exporting .discord-float {
    display: none !important;
}

@media (max-width: 768px) {
    .discord-float {
        bottom: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
    }
    .discord-float svg {
        width: 22px;
        height: 22px;
    }
}
/* --- TRADING TRUST CENTER --- */
.trust-center-container { 
    padding: 0 !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    display: grid;
    grid-template-columns: 450px 450px;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

@media (max-width: 900px) {
    .trust-center-container { 
        grid-template-columns: 1fr;
    }
}

.trust-card {
    background: rgba(10, 15, 25, 0.7);
    backdrop-filter: none;
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    /* Reducido de 1.5rem */
    transition: none !important;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

@media (max-width: 600px) {
    .trust-card {
        padding: 0.8rem 1rem;
        /* Padding mucho más agresivo en mobile */
    }
}

.trust-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 35px rgba(0, 242, 255, 0.12), inset 0 0 15px rgba(0, 210, 255, 0.08);
}

/* Efecto Escaneo (Scan-line) */
.trust-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(0, 210, 255, 0.08),
            transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}

.trust-card:hover::after {
    animation: card-scanner-beam 0.8s ease-out forwards;
}

@keyframes card-scanner-beam {
    0% {
        left: -100%;
    }

    100% {
        left: 150%;
    }
}

.trust-card-title {
    font-family: var(--font-header);
    /* Fuente dinámica un poco más pequeña: entre 0.85rem y 1.25rem */
    font-size: clamp(0.85rem, 3.8vw, 1.25rem);
    color: var(--accent-primary) !important;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
    /* Reducido para ganar espacio */
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Reducido de 10px */
    white-space: nowrap;
}

.title-icon {
    display: inline-block;
    font-size: 1rem;
    /* Un poco más pequeño */
    transition: none !important;
    flex-shrink: 0;
}

.trust-card:hover .title-icon {
    animation: none;
}



/* Efecto Táctico de Pulsación Fluida para el Texto */
.title-text {
    display: inline-block;
    transition: none !important;
}

.trust-card:hover .title-text {
    animation: none;
}



.trust-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: grid !important;
    grid-template-columns: auto auto !important;
    justify-content: start !important;
    gap: 6px 25px !important;
    font-size: 0.8rem;
}

@media (max-width: 600px) {
    .trust-bullet-list {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
    }
}

.trust-bullet {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.3;
}

.trust-bullet i {
    color: var(--accent-primary);
    font-size: 0.7rem;
    margin-top: 3px;
    transition: none !important;
}

/* Brillo Neón en los checks al hacer hover */
.trust-card:hover .trust-bullet i {
    text-shadow: 0 0 10px var(--accent-primary), 0 0 5px var(--accent-primary);
    filter: brightness(1.4);
}

.trust-card-btn {
    width: 100%;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-header);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    text-align: center;
}

.trust-card:hover .trust-card-btn {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 15px var(--accent-primary);
    transform: scale(1.02);
}

/* Modal for full info */
.trust-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: none;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.trust-modal.active {
    opacity: 1;
    pointer-events: all;
}

.trust-modal-content {
    background: #0a0f19;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    border: 1px solid var(--accent-primary);
    overflow-y: auto;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 2.5rem;
}

.trust-modal.active .trust-modal-content {
    transform: translateY(0);
}

.trust-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    z-index: 10;
}

.trust-modal-close:hover {
    background: #ff4757;
    transform: rotate(90deg);
}

.trust-modal-body h3 {
    font-family: var(--font-header);
    color: var(--accent-primary);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.trust-modal-body p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.trust-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 0 30px rgba(0, 0, 255, 0.2);
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.payment-method-pill {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-method-pill.best {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* --- TRUST CENTER BENTO MODAL STYLES --- */
.trust-bento-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(0, 210, 255, 0.3);
}

.trust-bento-header i {
    font-size: 1.8rem;
    color: var(--accent-primary);
    text-shadow: 0 0 6px rgba(0, 210, 255, 0.4);
}

.trust-bento-header h3 {
    font-family: var(--font-header);
    font-size: 1.1rem;
    color: #fff;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.trust-steps-grid,
.trust-steps-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.trust-step-card {
    display: flex;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.1rem;
    position: relative;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.trust-step-card:hover {
    background: rgba(0, 210, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateX(5px);
}

.trust-step-num {
    position: absolute;
    top: -10px;
    right: -5px;
    font-family: var(--font-header);
    font-size: 3.5rem;
    font-weight: 900;
    color: rgba(0, 210, 255, 0.05);
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.trust-step-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(0, 210, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.trust-step-info h4 {
    font-family: var(--font-header);
    font-size: 0.95rem;
    color: var(--accent-primary);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.trust-step-info p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.trust-highlight {
    color: var(--accent-primary);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 210, 255, 0.3);
}

.trust-card-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    color: #000;
    border-radius: 8px;
    font-family: var(--font-header);
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 210, 255, 0.2);
}

.small-btn-text {
    font-size: 0.7em;
    font-weight: 600;
    opacity: 0.85;
}

.trust-card-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
    filter: brightness(1.1);
}

.payment-intro {
    margin-bottom: 1.5rem;
}

.payment-intro p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.payment-methods-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: none !important; /* Desactivar transición para sincronización total */
    position: relative;
    cursor: pointer;
    user-select: none;
}

.payment-method-card i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.3);
    transition: none !important;
}

.payment-method-card span {
    font-size: 0.8rem;
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    font-weight: 700;
    transition: none !important;
}

.payment-method-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.payment-method-card.active {
    border-color: var(--accent-primary);
    background: rgba(0, 210, 255, 0.06);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.payment-method-card.active i {
    color: var(--accent-primary);
    text-shadow: 0 0 6px rgba(0, 210, 255, 0.4);
}

.payment-method-card.active span {
    color: var(--accent-primary);
}

.payment-note-dynamic {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.1);
    border-left: 3px solid var(--accent-primary);
    padding: 1.25rem;
    border-radius: 4px 12px 12px 4px;
    min-height: 85px;
    display: flex;
    align-items: center;
}

#payment-text-content {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* --- BUNDLES Y PRECIOS RESPONSIVOS --- */
.lsb-header-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.unit-main-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

@media (min-width: 900px) {
    .lsb-header-container {
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
    }
    
    .unit-main-header {
        flex-direction: row !important;
        align-items: center !important;
        gap: 15px !important;
        margin-bottom: 10px !important;
    }
    
    .unit-main-header .render-price-box-wrapper {
        margin-top: 0 !important;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- OPTIMIZACIÓN MODO MÓVIL (VERTICAL) --- */
@media (max-width: 600px) {
    .summary-header {
        display: block !important;
        padding-top: 0;
        margin-top: 4px;
        border-top: none;
    }

    .summary-controls-inline {
        width: 100%;
        justify-content: center;
        margin-top: 0;
        padding: 5px 0;
        border-top: none;
    }

    .summary-controls-inline button {
        flex: 1;
        background: rgba(255, 255, 255, 0.05) !important;
        height: 44px;
        /* Botones más grandes para dedos */
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        /* Stats en 2 columnas */
        gap: 8px !important;
    }

    .summary-grid>.summary-column:first-child {
        grid-column: 1 / -1 !important;
        /* Personajes a ancho completo */
        margin-bottom: 10px;
    }

    .summary-table-content.grid-4 {
        grid-template-columns: repeat(3, 1fr) !important;
        /* Siempre 3 columnas de unidades */
        gap: 4px;
        padding: 4px;
    }

    .summary-unit-image {
        width: 100%;
        max-width: 80px;
        height: 52px;
    }

    .unit-name-label {
        font-size: 0.65rem;
        /* Un poco más pequeño para que quepa en 3 col */
    }

    .summary-unit-level {
        font-size: 0.75rem;
    }

    .summary-unit-level img {
        height: 22px;
    }
}

/* --- OPTIMIZACIÓN MODO HORIZONTAL (LANDSCAPE) --- */
@media (max-width: 1024px) and (orientation: landscape) {
    .account-summary-card {
        padding: 5px !important;
    }

    .summary-header {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
    }

    .summary-controls-inline {
        border-top: none !important;
        margin-top: 0 !important;
        width: auto !important;
        justify-content: flex-end !important;
    }

    .summary-controls-inline button {
        flex: 0 0 38px !important;
        height: 38px !important;
    }

    .summary-grid {
        grid-template-columns: 1.2fr 0.8fr !important; /* Personajes y Naves arriba */
        gap: 15px !important;
        display: grid !important;
    }

    .summary-grid > .summary-column:nth-child(1) { grid-column: 1 !important; }
    .summary-grid > .summary-column:nth-child(2) { grid-column: 2 !important; }

    /* Los apartados de stats en 3 columnas al final */
    .summary-grid > .summary-column:nth-child(3) {
        grid-column: 1 / span 2 !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        margin-top: 10px !important;
        padding-top: 15px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Forzar alineación por filas para que queden uno al lado del otro */
    /* Columna 1: Mods arriba, Gear abajo */
    .summary-grid > .summary-column:nth-child(3) > .summary-table-section:nth-child(1) { grid-column: 1 !important; grid-row: 1 !important; }
    .summary-grid > .summary-column:nth-child(3) > .summary-table-section:nth-child(2) { grid-column: 1 !important; grid-row: 2 !important; }

    /* Columna 2: Habilidades arriba, Detalles abajo */
    .summary-grid > .summary-column:nth-child(3) > .summary-table-section:nth-child(3) { grid-column: 2 !important; grid-row: 1 !important; }
    .summary-grid > .summary-column:nth-child(3) > .summary-table-section:nth-child(5) { grid-column: 2 !important; grid-row: 2 !important; }

    /* Columna 3: Recursos arriba, Playtime abajo */
    .summary-grid > .summary-column:nth-child(3) > .summary-table-section:nth-child(4) { grid-column: 3 !important; grid-row: 1 !important; }
    .summary-grid > .summary-column:nth-child(3) > .summary-table-section:nth-child(6) { grid-column: 3 !important; grid-row: 2 !important; }




    .summary-table-content.grid-4 {
        grid-template-columns: repeat(4, 1fr) !important;
        /* EL PEDIDO: 4 COLUMNAS DE PERSONAJES */
        gap: 6px !important;
    }

    .summary-unit-image {
        max-width: 70px !important;
        height: 48px !important;
    }

    .unit-name-label {
        font-size: 0.65rem !important;
    }

    .summary-close-footer-btn {
        margin-bottom: 10px !important;
    }
}

@media (max-width: 480px) {

    /* Refuerzo para pantallas muy pequeñas */
    .summary-grid {
        grid-template-columns: 1fr;
        /* Si es extremadamente pequeña, volvemos a 1 col para stats */
    }
}

/* --- PROFILE EDITOR MODAL (Refined Symmetry v22) --- */
.editor-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.35s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-modal {
    width: 95%;
    max-width: 900px;
    max-height: 85vh;
    background: #0f172a;
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
                0 0 30px rgba(0, 210, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    font-family: 'Outfit', sans-serif;
}

.editor-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(0, 210, 255, 0.05), transparent);
}

.editor-header h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent-primary);
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.close-editor {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.close-editor:hover {
    color: #fff;
    transform: rotate(90deg);
}

.editor-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
}

.editor-content::-webkit-scrollbar { width: 5px; }
.editor-content::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 10px; }

/* Grid & Layout System */
.editor-section {
    margin-bottom: 2.5rem;
    animation: slideUp 0.4s ease-out backwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.editor-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
}

.editor-section-title i { color: var(--accent-primary); }

.editor-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.editor-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

/* Vault Items */
.vault-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 95px;
}

.vault-item:hover, .vault-item:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.vault-item img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    margin-bottom: 4px;
}

.vault-item label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 2px;
}

.vault-item input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 80%;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    outline: none; transition: box-shadow 0.2s ease;
    padding: 2px 0;
    transition: border-color 0.2s;
}

.vault-item input:focus {
    border-bottom-color: var(--accent-primary);
}

/* Field Controls */
.editor-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editor-field label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.editor-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.2s;
}

.editor-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
    outline: none; transition: box-shadow 0.2s ease;
}

/* Upload Area */
.editor-upload-zone {
    background: rgba(0, 242, 255, 0.03);
    border: 1px dashed rgba(0, 242, 255, 0.25);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.editor-upload-zone:hover {
    background: rgba(0, 242, 255, 0.08);
    border-color: var(--accent-primary);
    transform: scale(1.01);
}

/* Footer Section */
.editor-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.editor-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-transform: uppercase;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, var(--accent-primary), #0088ff);
    color: #000;
    box-shadow: 0 8px 20px rgba(0, 210, 255, 0.25);
    flex: 2;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 210, 255, 0.4);
    filter: brightness(1.1);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--accent-gold);
    font-size: 0.7rem;
    padding: 8px;
    width: 100%;
    margin-top: 10px;
}

.btn-ghost:hover {
    background: rgba(255, 215, 0, 0.05);
    border-color: var(--accent-gold);
}

/* Responsiveness */
@media (max-width: 768px) {
    .editor-grid-3, .editor-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .editor-content { padding: 1.25rem; }
}

@media (max-width: 480px) {
    .editor-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .editor-header h2 { font-size: 0.9rem; }
}

.unit-row img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.unit-row .name {
    flex: 1;
    font-size: 0.95rem;
}

.unit-row input {
    width: 70px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 6px;
    border-radius: 4px;
    color: var(--accent-primary);
    font-weight: bold;
}

.editor-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-editor {
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    border: none;
    transition: all 0.3s;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-save {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

.btn-save:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

.btn-auth {
    background: var(--accent-primary);
    color: #000;
    width: 100%;
    margin-top: 20px;
}

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


/* --- FIX MODAL EDITOR --- */
.info-modal { position: fixed !important; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(10px); display: none; z-index: var(--z-modal) !important; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 0; }
.info-modal.active { display: flex !important; }

/* Background for Hoarded Crystals */
.col-crystals-bg {
    background-image: url('imagenes/crystals.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 32px;
}

/* --- SUMMARY FOOTER ACTIONS (PREMIUM) --- */
.summary-footer-actions-mobile {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 10px;
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-btn i {
    font-size: 0.9rem;
    color: var(--accent-primary);
}

.footer-btn:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.footer-btn:active {
    transform: translateY(0);
}

/* Hide during export */
.is-exporting .summary-footer-actions-mobile {
    display: none !important;
}

@media (max-width: 600px) {
    .summary-footer-actions-mobile {
        flex-direction: row;
        gap: 8px;
        padding: 15px 5px;
    }
    
    .footer-btn {
        padding: 10px 12px;
        font-size: 0.7rem;
        flex: 1;
        justify-content: center;
    }

    .footer-btn span {
        display: block;
    }
}

th.col-crystals-bg .header-cap {
    position: relative;
    background-image: url('images/crystals.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-credits-bg .header-cap {
    position: relative;
    background-image: url('images/credits.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-fleet-bg .header-cap {
    position: relative;
    background-image: url('images/fleet_credits.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-kyro7-bg .header-cap {
    position: relative;
    background-image: url('images/kyro_mk7.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-kyro9-bg .header-cap {
    position: relative;
    background-image: url('images/kyro_mk9.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-cantina-bg .header-cap {
    position: relative;
    background-image: url('images/cantina.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-guild-bg .header-cap {
    position: relative;
    background-image: url('images/guild.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-aeros-bg .header-cap {
    position: relative;
    background-image: url('images/aeros.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-gyrda-bg .header-cap {
    position: relative;
    background-image: url('images/gyrda.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

th.col-brains-bg .header-cap {
    position: relative;
    background-image: url('images/brains.png') !important;
    background-repeat: no-repeat !important;
    background-position: center 6px !important;
    background-size: 38px !important;
    color: #fff !important;
    text-shadow: 0 0 6px #000, 0 0 3px #000;
}

/* --- SCROLL TO TOP BUTTON (SWGOH PREMIUM STYLE) --- */
#scrollToTopBtn {
    position: fixed;
    bottom: 85px; /* Encima del botón de Discord (25px + 50px + 10px) */
    right: 25px;
    width: 50px;
    height: 50px;
    background: rgba(10, 15, 23, 0.7);
    backdrop-filter: none;
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 50%;
    color: var(--accent-primary, var(--accent-primary));
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

#scrollToTopBtn.show {
    opacity: 0.5;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTopBtn:hover {
    opacity: 1;
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--accent-primary, var(--accent-primary));
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.4);
    transform: scale(1.1);
}

#scrollToTopBtn i {
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.6);
}

@media (max-width: 768px) {
    #scrollToTopBtn {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* --- LOW END DEVICE PERFORMANCE OPTIMIZATIONS --- */
@media (max-width: 900px) {
    .glass-effect, .modal-content, .trust-card {
        backdrop-filter: none !important; /* Backdrop filter is very expensive on low-end Androids */
        background: rgba(15, 23, 42, 0.95) !important;
    }
    
    * {
        box-shadow: none !important; /* Box shadows tax low-end GPUs during scroll */
    }
    
    .header-unit-bg span {
        text-shadow: none !important;
    }
}

/* --- ADVANCED MOBILE PERFORMANCE OPTIMIZATIONS --- */
@media (max-width: 850px) {
    /* Virtual table rows helper */
    .accounts-table tr {
        content-visibility: auto;
        contain-intrinsic-size: 1px 60px;
        contain: layout style paint;
        transition: none !important;
        will-change: auto;
    }

    /* Simplify 'Must Have' for mobile */
    .must-have-modal {
        backdrop-filter: none !important;
        background: #0a0f1d !important;
        border: 2px solid #1e293b !important;
    }

    .must-have-modal * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .unit-checkbox-label {
        padding: 4px 8px !important;
        border-radius: 4px !important;
    }
}

.marketplace-container {
    contain: content;
}

/* ==========================================
   VALUE SCAN & COMPARISON UI
   ========================================== */

/* Badges de Valor */
.v-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1.1rem;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: help;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.col-value-scout, .col-compare-scout {
    width: 60px !important;
    max-width: 60px !important;
    min-width: 60px !important;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    cursor: pointer;
}

.tr-scanned .v-badge:hover {
    transform: scale(1.3) rotate(5deg);
}

.val-best { 
    background: radial-gradient(circle at center, rgba(0, 242, 255, 0.2), transparent);
    border-color: rgba(0, 242, 255, 0.5) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
}

.val-good { 
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3) !important;
}

.val-avg { opacity: 0.4; }

.val-bad { 
    background: rgba(255, 82, 82, 0.1);
    border-color: rgba(255, 82, 82, 0.3) !important;
}

/* Checkbox de Comparación Estilizado */
.comp-checkbox-container {
    display: inline-block;
    position: relative;
    width: 20px;
    height: 20px;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}

.comp-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: opacity 0.2s, transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.comp-checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--accent-primary);
}

.comp-checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.comp-checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.comp-checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkmark.has-number {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    color: #000;
    font-family: 'Orbitron', sans-serif;
}
.checkmark.has-number:after {
    display: none !important;
}

/* Comparison Drawer (Bottom Bar) */
#comparison-drawer {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: rgba(13, 20, 31, 0.9);
    backdrop-filter: none !important;
    background: rgba(10, 12, 16, 0.95);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    z-index: 9990; /* Lower than modal and overlay */
    padding: 15px 25px;
    transition: bottom 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}

#comparison-drawer.active {
    bottom: 0;
}

.drawer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-info {
    font-family: 'Orbitron', sans-serif;
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.drawer-count {
    color: var(--accent-primary);
    font-weight: 900;
}

.drawer-actions {
    display: flex;
    gap: 10px;
}

.btn-clear-comp {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.6);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-compare-now {
    background: var(--accent-primary);
    border: none;
    color: #000;
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

/* Value Report Modal */
/* .value-report-container merged below */

.report-header {
    border-bottom: 2px solid rgba(0, 242, 255, 0.2);
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.report-header h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-primary);
    letter-spacing: 2px;
    font-size: 1.5rem;
    text-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

.shimmer-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    /* Animación suavizada y menos frecuente para ahorrar GPU */
    animation: none;
    opacity: 0.4;
}



/* --- Market Analysis Premium Styling --- */
.value-report-container {
    padding: 15px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 12px;
    color: #f8fafc;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    width: 100%;
}


.report-body {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: none;
}

.v-status-box {
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.v-status-info {
    flex: 1;
}

.v-status-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    margin: 0 0 8px 0;
    letter-spacing: 1px;
    color: #fff;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-status-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    color: #cbd5e1;
    font-weight: 400; /* Asegurar peso normal */
}

.v-status-icon { display: none; }

.status-best { 
    background: rgba(0, 242, 255, 0.08); 
    border-left: 4px solid var(--accent-primary);
}
.status-good { 
    background: rgba(76, 175, 80, 0.08); 
    border-left: 4px solid #4CAF50;
}
.status-bad { 
    background: rgba(255, 82, 82, 0.08); 
    border-left: 4px solid #ff5252;
}
.status-avg { 
    background: rgba(148, 163, 184, 0.08); 
    border-left: 4px solid var(--text-secondary);
}
.status-seller {
    background: rgba(255, 215, 0, 0.05);
    border-left: 4px solid #ffd700;
    margin-top: 30px;
}
.status-seller .v-status-title {
    color: #ffd700;
    display: block;
    font-size: 0.95rem;
}
.status-seller .v-status-desc {
    font-size: 0.75rem;
    opacity: 0.9;
}

.v-status-box strong {
    color: #fff;
    font-weight: 700;
}

.v-highlights h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.v-highlights ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr; /* Cambiado de auto-fit para forzar 1 línea */
    gap: 8px;
}

.v-highlights li {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    font-size: 0.9rem; /* Aumentado */
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v-h-content {
    display: inline-block;
    line-height: 1.2;
}

.v-highlights li strong {
    color: #fff;
}

.v-highlights li::before {
    content: '\26A1';
    font-size: 0.9rem;
}

.report-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
}

.report-footer .btn-primary {
    padding: 12px 30px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-primary));
    color: #000;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.report-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.5);
}

/* Comparison Matrix */
.comparison-matrix-container {
    width: 100%;
    min-width: fit-content;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
}

.matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.matrix-header h2 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--accent-primary);
}

.matrix-scroll {
    overflow-x: auto;
    padding: 15px;
    display: block; /* Volvemos a block para que el scroll sea estándar y no fuerce centrado */
}

.comparison-table {
    width: 100%;
    min-width: 450px;
    border-collapse: separate;
    border-spacing: 0 4px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
}

/* Filas de Sección */
.cmp-section-row td {
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.08), transparent);
    color: var(--accent-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 12px 10px 4px !important;
    border: none !important;
    text-align: left !important;
}

/* Cabecera de cuenta */
.cmp-acc-header {
    position: relative; /* For trash icon positioning */
    padding: 25px 4px 10px !important;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: none;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: 2px solid var(--accent-primary);
    text-align: center;
    width: 100px;
    max-width: 100px;
}

.btn-remove-acc {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(50%);
    background: transparent;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s, background-color 0.2s, border-color 0.2s;
}
.btn-remove-acc:hover {
    opacity: 1;
    transform: translateX(50%) scale(1.2);
}
.cmp-acc-player {
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    color: #fff;
    font-weight: 700;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    width: 100px;
    max-width: 100px;
    margin-bottom: 2px;
}
.cmp-acc-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: var(--accent-primary);
    font-weight: 900;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    width: 100%;
    opacity: 0.8;
}

/* Filas de Datos */
.cmp-data-row td {
    padding: 8px 4px;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    text-align: center;
    font-weight: 600;
    width: 100px;
    transition: all 0.2s ease;
}

.cmp-metric-col { 
    width: 140px; 
    min-width: 140px;
    text-align: left !important;
    padding-left: 12px !important;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.4) !important;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.cmp-row-content {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.cmp-row-icon {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Ganadores y Perdedores */
.cmp-best {
    background: rgba(74, 222, 128, 0.05) !important;
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}
.cmp-best .cmp-value-wrap {
    border-bottom: 1px solid rgba(74, 222, 128, 0.4);
}

.cmp-worst {
    background: rgba(248, 113, 113, 0.03) !important;
    color: #f87171;
    opacity: 0.8;
}

/* Columna de Diferencia */
.cmp-diff-header {
    padding: 12px 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border: none !important;
}

.cmp-diff-col {
    background: transparent !important;
    border: none !important;
    padding-left: 10px !important;
}

.cmp-diff-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    background: rgba(255,255,255,0.08);
}

.cmp-diff-pos { color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.cmp-diff-neg { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.cmp-diff-eq  { color: #475569; }

.cmp-data-row:hover td { 
    background: rgba(255,255,255,0.05) !important;
}
.cmp-data-row:hover .cmp-metric-label {
    color: #fff;
}


/* --- OFFER BOX --- */
.v-offer-box {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.07);
    border: 1px solid rgba(251, 191, 36, 0.25);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: #e2c97e;
    line-height: 1.5;
}
.v-offer-box strong {
    color: #fbbf24;
}

/* --- VALUE SCAN RIVALS --- */
.v-rivals-section {
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.v-rivals-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.v-rivals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Celda Best? con ratio integrado */
.v-badge-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    line-height: 1;
    width: 100%;
    height: 100%;
}

/* Badge más pequeño dentro de la celda Ratio */
.v-badge-cell .v-badge {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
}

.v-badge-sm {
    font-size: 0.75rem !important;
    line-height: 1;
}

.v-badge-ratio {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0.9;
    line-height: 1;
}
/* Hereda color del estado: val-best, val-good, val-bad, val-avg */
.v-badge-ratio.val-best { color: var(--accent-primary); }
.v-badge-ratio.val-good { color: var(--success); }
.v-badge-ratio.val-bad  { color: var(--danger); }
.v-badge-ratio.val-avg  { color: #64748b; }

/* Badge de ratio en tarjetas de rivales */
.v-ratio-badge {
    margin-left: 6px;
    font-size: 0.65rem !important;
    padding: 1px 5px !important;
    white-space: nowrap;
}

.v-rival-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.v-rival-item.v-rival-hidden {
    display: none;
}

.v-rivals-section.show-all .v-rival-item.v-rival-hidden {
    display: flex;
    animation: rivalFadeIn 0.3s ease forwards;
}

@keyframes rivalFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.v-rival-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.v-rival-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.v-rival-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.v-rival-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.v-rival-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 5px;
}

.v-stat {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
}
.v-stat b { font-weight: 700; margin-left: 2px; }
.v-stat-delta { opacity: 0.75; font-size: 0.65rem; margin-left: 1px; }

.v-stat-eq { color: #64748b; border-color: rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); }
.v-stat-up { color: #4ade80; border-color: rgba(74,222,128,0.25); background: rgba(74,222,128,0.08); }
.v-stat-dn { color: #f87171; border-color: rgba(248,113,113,0.25); background: rgba(248,113,113,0.08); }

.v-rival-extra, .v-rival-missing {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    line-height: 1.4;
    margin-top: 3px;
    color: var(--text-secondary);
    white-space: normal;
}

.v-diff-label {
    font-weight: 700;
    margin-right: 3px;
}
.v-rival-extra .v-diff-label  { color: #4ade80; }
.v-rival-missing .v-diff-label { color: #f87171; }

.v-rival-prices {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
}

.v-p-price { color: var(--text-secondary); text-decoration: line-through; opacity: 0.7; }
.v-p-arrow { color: var(--accent-primary); font-size: 0.7rem; }
.v-p-sugg { color: var(--success); font-weight: bold; }

.v-rival-btn {
    background: var(--accent-primary);
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.v-rival-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
    color: #000;
}

.v-rival-btn-sm {
    background: rgba(0, 210, 255, 0.12);
    color: var(--accent-primary);
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 1px solid rgba(0, 210, 255, 0.25);
    flex-shrink: 0;
    text-decoration: none;
}

.v-rival-btn-sm:hover {
    background: var(--accent-primary);
    color: #000;
}

.v-rivals-more {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 15px auto 5px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    width: fit-content;
    display: block;
    user-select: none;
}

.v-rivals-more:hover {
    background: rgba(0, 210, 255, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.15);
}

.v-rivals-more:active {
    transform: translateY(0);
}

.close-matrix {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Estilo Hoard: Paridad Nativa con Reset/Edit (Soporte Dual) */
.col-vault-pill, .col-hoard-bg {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    padding: 0 !important;
}

.col-vault-pill .header-cap, .col-hoard-bg .header-cap {
    width: 74px !important;
    height: 52px !important;
    background: linear-gradient(180deg, rgba(0, 210, 255, 0.1) 0%, rgba(15, 20, 30, 0.95) 100%) !important;
    border: 1px solid rgba(0, 210, 255, 0.2) !important;
    border-bottom: 3px solid var(--accent-primary) !important;
    background-image: url('images/vault_icon.png') !important;
    background-size: 32px !important;
    background-position: center 2px !important;
    background-repeat: no-repeat !important;
    position: relative !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 0 0.33rem 0 !important; /* Volvemos al padding base */
    margin: 0 auto !important;
    border-radius: 10px !important;
}

/* SELECTOR ATÓMICO: Gana a la regla global de la línea 552 por especificidad */
th.col-std-unit.col-vault-pill .header-cap span, 
th.col-std-unit.col-hoard-bg .header-cap span {
    display: inline-block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 0.65rem !important;
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: normal !important;
    
    transform: translateY(-7px) !important;
}

.btn-resource-vault {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.vault-active {
    background: rgba(0, 210, 255, 0.25) !important;
    border: 1.5px solid rgba(0, 210, 255, 0.6) !important;
    color: var(--accent-primary) !important;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
    /* El pulso infinito se elimina para evitar sobrecarga de GPU en listas largas */
    animation: none;
}

.vault-empty {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.2) !important;
    animation: none !important;
}

.vault-active:hover {
    background: rgba(0, 242, 255, 0.4) !important;
    border-color: var(--accent-primary) !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.4),
                inset 0 0 15px rgba(255, 255, 255, 0.4) !important;
    z-index: 10;
}

.vault-empty:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.btn-resource-vault i {
    font-size: 1.05rem;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-resource-vault .opened-icon {
    display: none;
    transform: translateY(2.5px);
}

.vault-active:hover .closed-icon {
    display: none;
}

.vault-active:hover .opened-icon {
    display: inline-block;
    color: #fff !important;
    animation: vault-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.vault-empty .opened-icon, .vault-empty:hover .opened-icon {
    display: none !important;
}

.vault-empty .closed-icon, .vault-empty:hover .closed-icon {
    display: inline-block !important;
}



@keyframes vault-pop {
    0% { transform: scale(1) translateY(2.5px); }
    50% { transform: scale(1.25) translateY(-1px);    text-shadow: 0 0 10px rgba(0, 242, 255, 0.6);
 }
    100% { transform: scale(1.15) translateY(1px);    text-shadow: 0 0 5px rgba(0, 242, 255, 0.4);
 }
}

.btn-resource-vault:active {
    transform: translateY(0) scale(0.95) !important;
    transition: all 0.1s !important;
}

/* Vault Modal (Popup) */
.vault-modal-content {
    background: rgba(13, 18, 29, 0.98);
    backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 
                inset 0 0 30px rgba(0, 210, 255, 0.05);
    width: 480px;
    max-width: 95vw;
}

.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vault-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--accent-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.vault-ally {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.vault-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

.vault-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.vault-label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.5px;
    text-align: center;
}

.vault-value {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.vault-footer {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

.vault-edit-btn {
    background: linear-gradient(135deg, var(--accent-primary), #0082ad);
    color: #000;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
    transition: opacity 0.3s, transform 0.3s, background-color 0.3s, border-color 0.3s;
    box-shadow: 0 4px 8px rgba(0, 210, 255, 0.2);
}

.vault-edit-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

.vault-extra-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.vault-extra-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: var(--accent-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.vault-notes {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.04);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.vault-image-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.vault-image-gallery img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.vault-image-gallery img:hover {
    transform: scale(1.02);
}

/* Button States for New Info Column */
.btn-account-info {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1.5px solid transparent;
    margin: 0 auto;
}

.info-empty {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.info-empty:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.info-active {
    background: rgba(0, 210, 255, 0.25) !important;
    color: var(--accent-primary) !important;
    border-color: rgba(0, 210, 255, 0.6) !important;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
    animation: none;
}

.info-active:hover {
    background: rgba(0, 242, 255, 0.4) !important;
    border-color: var(--accent-primary) !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.4);
}



/* Modal Content for Info */
.info-modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px); /* Desenfoque optimizado de 20px a 10px para aliviar GPU */
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 20px;
    padding: 24px;
    width: 450px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9),
                inset 0 0 40px rgba(0, 210, 255, 0.02);
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.info-header h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-header .close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.info-header .close-modal:hover {
    color: #fff;
}

.info-body {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.info-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.7;
    white-space: pre-wrap;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
}

.info-body::-webkit-scrollbar {
    width: 5px;
}

.info-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.info-body::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.3);
    border-radius: 10px;
}

/* --- SELLER BOX (RECUA DRO PREMIUM + OUTFIT MIX) --- */
.v-seller-box {
    margin-top: 25px;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(0, 242, 255, 0.08); 
    border-left: 4px solid var(--accent-primary);
}
.v-seller-header {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}
.v-seller-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 2px;
    display: block;
    text-transform: none;
    font-weight: 400;
}
.v-seller-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.v-seller-row {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.4;
}
.v-seller-price {
    display: block;
    padding-left: 14px;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 4px;
    font-family: 'Orbitron', sans-serif;
}
.v-seller-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.v-seller-now   .v-seller-dot { background: #f87171; }
.v-seller-wait1 .v-seller-dot { background: #fb923c; }
.v-seller-wait2 .v-seller-dot { background: #4ade80; }

.summary-trigger-icon.has-vault-h { 
    color: #fff176; 
    opacity: 1 !important; 
    text-shadow: 0 0 4px rgba(255, 241, 118, 0.4);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Animación activa solo en Escritorio para ahorrar RAM en móviles */
@media (min-width: 1024px) {
    .summary-trigger-icon.has-vault-h {
        /* Pulso infinito eliminado: la GPU ahora respira. Solo se activará al hacer hover. */
        animation: none;
    }
}



.summary-trigger-icon.has-vault-h:hover { 
    color: var(--accent-gold) !important; 
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.9)); 
    transform: scale(1.2);
    animation-play-state: paused;
}

/* --- SISTEMA DE FAVORITOS (v12.0) --- */
.favorites-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 242, 255, 0.06);
    border: 1px solid rgba(0, 242, 255, 0.25);
    border-radius: 8px;
    color: var(--accent-primary);
    width: 40px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.favorites-filter-btn:hover,
.favorites-filter-btn.active {
    background: rgba(255, 82, 120, 0.15);
    border-color: #ff5278;
    color: #ff5278;
    box-shadow: 0 0 15px rgba(255, 82, 120, 0.2);
}
.favorites-filter-btn.active svg {
    fill: currentColor;
}
.favorite-trigger {
    color: rgba(255, 255, 255, 0.3);
}
.favorite-trigger:hover {
    color: #ff5278;
    transform: scale(1.2);
}
.favorite-trigger.is-favorite {
    color: #ff5278;
    text-shadow: 0 0 10px rgba(255, 82, 120, 0.6);
}

/* UPDATE BANNER (v2026.04.19.02) */
.update-banner {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 20, 30, 0.85);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(0, 242, 255, 0.3);
    padding: 12px 24px;
    border-radius: 50px;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 255, 0.1);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}
.update-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.update-banner .message {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    font-size: 0.95rem;
    white-space: nowrap;
}
.update-banner .btn-refresh {
    background: linear-gradient(135deg, var(--accent-primary), #00d4ff);
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}
.update-banner .btn-refresh:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
    filter: brightness(1.1);
}
.update-banner-icon {
    color: var(--accent-primary);
    font-size: 1.2rem;
    animation: pulse-update 2s infinite;
}
@keyframes pulse-update {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}



/* Tooltip Global Refinement: Single Line Absolute (v3) */
[data-tooltip]::before, [data-tooltip]::after, .tooltip-content, .custom-tooltip {
    white-space: nowrap !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: inline-block !important;
}

/* ============================================================
   FORCED MOBILE FILTERS ACCORDION & 2-ROW LAYOUT (v10)
   ============================================================ */
@media (max-width: 850px) {
    .mobile-filters-toggle {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        background: rgba(0, 242, 255, 0.1) !important;
        border: 1px solid rgba(0, 242, 255, 0.3) !important;
        border-radius: 10px;
        cursor: pointer;
        margin-bottom: 10px;
        font-family: 'Orbitron', sans-serif;
        font-size: 0.85rem;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .mobile-filters-content {
        display: none; 
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-filters-content.active {
        display: block !important;
        background: rgba(0, 0, 0, 0.2);
        padding: 10px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 20px;
    }

    .marketplace-filters-row {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        padding: 0 !important;
        align-items: end !important;
    }

    .filter-item {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .filter-item label {
        font-size: 0.65rem !important;
        margin-bottom: 2px !important;
        white-space: nowrap !important;
        text-align: center;
    }

    .filter-item input, .filter-item select, .filter-item button {
        width: 100% !important;
        height: 32px !important;
        font-size: 0.7rem !important;
        padding: 2px 4px !important;
        text-align: center;
    }

    /* Row distribution logic */
    .filter-item:nth-child(1), .filter-item:nth-child(2), .filter-item:nth-child(3), .filter-item:nth-child(4) {
        grid-column: span 1;
    }

    #sortByFilter {
        grid-column: span 2 !important;
    }
    
    .filter-item.must-have-trigger-item,
    .filter-item.favorites-filter-item,
    .filter-item.clear-all-item {
        grid-column: span 1 !important;
    }

    /* Hide redundant labels to save space */
    .favorites-filter-item label, .clear-all-item label {
        display: none !important;
    }
}

/* ============================================================
   ULTRA-COMPACT MOBILE FILTERS (v12)
   ============================================================ */
@media (max-width: 850px) {
    .mobile-filters-toggle {
        padding: 8px 12px !important;
        font-size: 0.65rem !important; /* 25% smaller as requested */
        margin-bottom: 5px !important;
    }

    .mobile-filters-content.active {
        padding: 5px 8px !important; /* Less padding to remove empty space */
        margin-bottom: 10px !important;
    }

    .marketplace-filters-row {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }

    /* Redefine item spans to fit everything in 2-3 very tight lines */
    .filter-item {
        margin: 0 !important;
    }

    /* Row 1: 4 items (AllyCode, Price, GP, GL) */
    .filter-item:nth-child(1) { grid-column: span 1; }
    .filter-item:nth-child(2) { grid-column: span 1; }
    .filter-item:nth-child(3) { grid-column: span 1; }
    .filter-item:nth-child(4) { grid-column: span 1; }

    /* Row 2: Mods, Sort(span 2), MustHave */
    .filter-item:nth-child(5) { grid-column: span 1; } /* Mods */
    #sortByFilter { grid-column: span 2 !important; } /* Sort */
    .filter-item.must-have-trigger-item { grid-column: span 1 !important; }

    /* Row 3: Heart and X Centered together */
    .filter-item.favorites-filter-item { 
        grid-column: 2 / span 1 !important; /* Positioned in middle of row 3 */
    }
    .filter-item.clear-all-item { 
        grid-column: 3 / span 1 !important; /* Positioned next to Heart */
    }

    /* Ensure labels don't waste space */
    .filter-item label {
        font-size: 0.65rem !important;
        opacity: 0.8;
    }

    /* Remove empty spaces below button */
    .filter-item button, .filter-item select, .filter-item input {
        height: 30px !important;
        margin-bottom: 0 !important;
    }
}


/* ============================================================ 
   PROFILE EDITOR STYLES (PREMIUM V2) 
   ============================================================ */
.editor-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.editor-modal-card {
    position: relative;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    background: linear-gradient(145deg, #151921, #0a0c10);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 1);
    z-index: var(--z-modal);
}

.editor-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-x {
    background: none;
    border: none;
    color: var(--accent-gold);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.editor-modal-body {
    padding: 20px 30px;
    overflow-y: auto;
    flex: 1;
}

.editor-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-section.no-border { border-bottom: none; }

.section-title {
    font-family: 'Orbitron';
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.field-item { display: flex; flex-direction: column; gap: 8px; }
.field-item label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Outfit';
}

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input, .field-item input, .field-item select, .field-item textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-family: 'Outfit';
    outline: none; transition: box-shadow 0.2s ease;
    transition: all 0.3s;
}

.input-wrapper input:focus, .field-item input:focus, .field-item select:focus, .field-item textarea:focus {
    border-color: var(--accent-gold);
    background: rgba(255, 215, 0, 0.05);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.input-suffix {
    position: absolute;
    right: 15px;
    color: var(--accent-gold);
    font-size: 0.7rem;
    font-family: 'Orbitron';
    pointer-events: none;
}

.editor-resource-grid, .editor-shard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.res-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.res-item label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
}

.res-input-wrap { display: flex; align-items: center; gap: 5px; }

.res-item input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--accent-primary);
    width: 100%;
    font-family: 'Orbitron';
    font-weight: 800;
    text-align: center;
    padding: 2px 0;
    outline: none; transition: box-shadow 0.2s ease;
    font-size: 0.9rem;
}

.res-suffix { font-size: 0.65rem; color: rgba(0, 210, 255, 0.5); font-weight: bold; }

.preview-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.preview-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(0, 242, 255, 0.3);
}

.upload-zone {
    border: 1px dashed rgba(0, 242, 255, 0.4);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 242, 255, 0.02);
}

.upload-zone:hover { background: rgba(0, 242, 255, 0.08); border-color: var(--accent-primary); }
.upload-zone i { font-size: 1.5rem; color: var(--accent-primary); margin-bottom: 5px; display: block; }

.editor-modal-footer {
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
}

.anim-slide-up { animation: editorSlideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
@keyframes editorSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 215, 0, 0.2); border-radius: 10px; }

/* --- NOTE MODAL PREMIUM (VISTA VERTICAL 70/30) --- */
.note-modal-card {
    background: rgba(10, 15, 25, 0.98);
    border: 1px solid rgba(0, 242, 255, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 450px;
    max-width: 90vw;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
    font-family: 'Outfit', sans-serif;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch; /* CAMBIADO DE CENTER A STRETCH PARA ALINEACIÓN LATERAL FORZADA */
}

.note-modal-header h3 {
    margin: 0 0 20px 0;
    color: var(--accent-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.note-textarea {
    width: 100%;
    height: 180px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: border 0.3s;
    margin-bottom: 25px;
    box-sizing: border-box;
    line-height: 1.6;
}

.note-textarea:focus {
    border-color: rgba(0, 242, 255, 0.6);
}

.note-modal-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    justify-content: space-between;
}

.note-save-btn {
    flex: 7; /* 70% PROYECTADO */
    background: var(--accent-primary);
    border: none;
    color: #000;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.note-save-btn:active {
    transform: scale(0.98);
}

.note-cancel-btn {
    flex: 3; /* 30% PROYECTADO */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    padding: 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-align: center;
}

.note-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Link de borrado discreto absoluto */
.note-delete-link {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: rgba(255, 68, 68, 0.6);
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.note-delete-link:hover {
    color: #ff4444;
}

/* --- MOBILE v75: Filtros 3x3 --- */
@media (max-width: 768px) {
    .market-filter-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
}

/* PARCHE SOLICITADO V14 - FINAL MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    /* EDIT NOTE MODAL: Ajuste de tamaño para que no sea pantalla completa */
    .note-modal-card {
        width: 92vw !important;
        max-width: 450px !important;
        height: auto !important;
        max-height: 85vh !important;
        border-radius: 12px !important;
        padding: 20px 15px !important;
        display: flex !important;
        flex-direction: column !important;
        margin: auto !important;
        box-sizing: border-box !important;
        transform: translateY(0) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    .note-textarea {
        flex: none !important;
        width: 100% !important;
        height: 180px !important;
        min-height: 150px !important;
        margin-bottom: 15px !important;
        font-size: 0.9rem !important;
        box-sizing: border-box !important;
    }
    .note-modal-footer {
        display: grid !important;
        grid-template-columns: 3fr 7fr !important; /* 30% vs 70% */
        gap: 10px !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* El primer hijo (botón de borrar o div vacío) siempre ocupa toda la fila superior */
    .note-modal-footer > *:nth-child(1) {
        grid-column: 1 / 3 !important;
        width: 100% !important;
        margin-bottom: 5px;
    }
    /* Forzar que Cancelar sea el de la izquierda (30%) y Guardar el de la derecha (70%) */
    .note-modal-footer .note-cancel-btn {
        grid-column: 1 / 2 !important;
        width: 100% !important;
        margin: 0 !important;
    }
    .note-modal-footer .note-save-btn {
        grid-column: 2 / 3 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    
    /* ENCUADRE SIMÉTRICO DEL HEADER Y FILTROS */
    .marketplace-header {
        padding: 12px 10px !important; /* Más padding para encuadrar simétricamente */
        border-radius: 12px !important;
        margin-bottom: 10px !important;
        background: rgba(15, 23, 42, 0.4) !important;
        border-bottom: 1px solid var(--glass-border) !important;
    }
    .mobile-filters-toggle {
        margin: 0 auto !important; /* Centrado y sin espacio abajo por defecto */
        padding: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        transition: margin 0.2s ease;
    }
    .mobile-filters-toggle.active {
        margin-bottom: 12px !important; /* Solo dar espacio cuando hay contenido debajo */
    }

    .mobile-filters-content.active {
        padding: 15px 10px !important;
        margin: 0 !important; /* Eliminar márgenes externos para que el padding del padre mande */
        background: rgba(0, 0, 0, 0.3) !important;
        border: 1px solid rgba(0, 242, 255, 0.15) !important;
        border-radius: 12px !important;
    }

    .marketplace-filters-row {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px 6px !important; /* Más gap vertical para simetría */
        justify-items: center !important;
    }
    .filter-item {
        min-width: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .filter-item label {
        font-size: 10px !important;
        height: 14px !important;
        display: block !important;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        margin-bottom: 4px !important;
    }


    /* FIX TRUST CENTER: Forzar una sola línea, ajustar tamaño y reducir espacio superior */
    .trust-center-container {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 10px !important;
        gap: 8px !important;
        margin-top: 10px !important; /* Reducido a la mitad para vista móvil */
    }
    .trust-card {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 4px !important;
    }
    .trust-card-title, .trust-card h3 {
        font-size: 0.56rem !important; /* Reducido para caber en una línea */
        white-space: nowrap !important; /* FORZAR UNA SOLA LÍNEA */
        letter-spacing: -0.5px !important;
        text-align: center !important;
        line-height: 1 !important;
        height: auto !important;
        overflow: visible !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 8px !important;
    }
    .title-icon {
        font-size: 0.75rem !important;
        margin-right: 4px !important;
    }

    /* FIX SUMMARY MODAL: Espaciado superior en móviles (V23) */
    .account-summary-card {
        padding-top: 30px !important; /* Más margen superior solicitado */
        padding-bottom: 30px !important;
    }
    
    @media (orientation: landscape) {
        .account-summary-card {
            padding-top: 45px !important; /* Aún más margen en horizontal para evitar barra de direcciones */
        }
    }
}

/* PADDING EN CELDAS PARA TODA VISTA MÓVIL/TABLET */
@media (max-width: 1024px) {
    .table-container table tbody td, #accountsTable tbody td {
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
    }
    .trust-center-container {
        margin-top: 10px !important;
    }
}





/* --- PROOF CARDS (SELLER MODE) --- */
.proof-cards-container {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Aumentado de 15 a 20 */
    margin-top: 15px;
}
.proof-card-wrapper {
    background: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.03);
    margin-bottom: 5px;
}
.proof-card-wrapper .v-rival-card {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.v-rival-card {
    margin-bottom: 20px; /* Espacio entre tarjetas */
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px;
}
.v-rivals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.v-rival-hidden {
    display: none !important;
}
.v-rival-hidden.show {
    display: block !important;
}
.proof-card-wrapper .v-rival-card:hover {
    transform: none !important;
}
