/**
 * WikiSoftnyx - Sistema de Estilos Maestro
 * Reglas de Diseño:
 * - CERO RESPLANDORES (Cero glow, cero sombras de neón en botones, tarjetas o inputs)
 * - Bordes limpios de 1px solid neutros
 * - Tablas y tarjetas perfectamente alineadas, simétricas y estructuradas
 * - Modo Oscuro y Modo Claro de alta legibilidad
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --transition-fast: 0.18s ease-in-out;
    --radius-xs: 3px;
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

/* =========================================================
   TEMA BLANCO OFICIAL - ESTILO SOFTNYX FORO (GAMINGJAM SMF)
   ========================================================= */
:root, [data-theme="light"], [data-theme="white"], [data-theme="dark"] {
    --font-sans: "Segoe UI", "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --font-heading: "Segoe UI", "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --transition-fast: 0.15s ease-in-out;
    --radius-xs: 3px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-full: 9999px;

    /* Superficies Tema Blanco Softnyx SMF */
    --bg-page: #f4f6f9;               /* Fondo exterior limpio */
    --bg-surface: #ffffff;            /* Fondo blanco puro para tarjetas y tablas */
    --bg-surface-elevated: #fafafa;   /* Filas secundarias y hover */
    --bg-subtle: #f8fafc;             /* Hover suave y sub-bloques */
    --bg-input: #ffffff;
    --card-media-bg: #f8fafc;

    /* Bordes Suaves y Limpios MapleStory */
    --border-color: #cbd6e2;          /* Borde visible y nítido */
    --border-subtle: #e2e8f0;         /* Divisores internos suaves */
    --border-focus: #910048;          /* Maple Crimson */
    --border-hover: #94a3b8;

    /* Textos de Alto Contraste */
    --text-main: #1e2329;             /* Texto oscuro de alta legibilidad */
    --text-secondary: #4a5568;        /* Subtítulos y metadatos */
    --text-muted: #6c757d;
    --text-inverse: #ffffff;

    /* Paleta Oficial MapleStory (Slate #363c45, Crimson #910048, Orange #ea6500) */
    --primary: #910048;
    --primary-hover: #7a0044;
    --primary-text: #ffffff;
    --primary-subtle: #fdf2f7;

    --brand-blue-dark: #24282f;
    --brand-blue-base: #363c45;
    --brand-blue-mid: #4a5068;
    --brand-blue-grad: none;
    --accent-electric: #ff8a2b;
    --accent-navy: #363c45;
    --accent-orange: #ea6500;         /* Acento naranja de recompensas Nexon */
    --link-color: #910048;            /* Enlaces en Crimson Maple */
    --link-hover: #7a0044;

    /* Sub-barras y Botones Carbón / Slate Metálico Plano */
    --dark-bar-grad: none;
    --dark-bar-border: #272b33;

    /* Acentos secundarios */
    --accent-red: #910048;
    --accent-red-hover: #7a0044;
    --accent-gold: #ffd54f;
    --accent-gold-light: #ffea79;

    --secondary: #363c45;
    --secondary-hover: #24282f;

    /* Estados */
    --success: #16a34a;
    --success-subtle: #dcfce7;
    --danger: #dc2626;
    --danger-subtle: #fee2e2;
    --warning: #ea6500;
    --warning-subtle: #fef3c7;

    --badge-bg: #f3f4f6;
    --badge-text: #363c45;
    --tag-bg: #e2e8f0;
}

/* RESET GENERAL Y BASE */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

html, body {
    min-height: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    position: relative;
}

/* Fondo plano y limpio */
body::before {
    display: none;
}

[data-theme="light"] body::before {
    display: none;
}

h1, h2, h3, h4, .brand-title-text, .section-label {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* TÍTULOS CON COLOR PLANO */
.gradient-text {
    color: var(--accent-orange);
    font-weight: 800;
}

/* =========================================================
   ESTILOS MULTIWORLD & ACENTOS DUAL-TONE
   ========================================================= */
.mw-accent-red {
    color: var(--primary) !important;
}

.mw-accent-gold {
    color: var(--accent-gold) !important;
}

/* 1. TOP AVALON ANNOUNCEMENT STRIP */
.mw-top-strip {
    background: #363c45;
    border-bottom: 1px solid #272b33;
    color: #ffffff;
    font-size: 0.78rem;
    padding: 0.45rem 1rem;
    position: relative;
    z-index: 101;
}

.mw-top-strip-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mw-top-strip-content {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.mw-top-marquee {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.mw-top-marquee-inner {
    display: inline-block;
    padding-left: 100%;
    animation: mwMarquee 22s linear infinite;
}

@keyframes mwMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.mw-top-tag {
    background-color: #e52e2e;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.mw-top-text strong {
    color: #f59e0b;
}

.mw-top-strip-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mw-top-btn {
    background-color: #f59e0b;
    color: #08080c;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.mw-top-btn:hover {
    background-color: #fbbf24;
    transform: translateY(-1px);
}

/* =========================================================
   HEADER DE APLICACIÓN BLANCO CON ALTO CONTRASTE
   ========================================================= */
.app-header {
    background-color: #ffffff !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0 !important;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.mw-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.mw-brand-emblem {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.emblem-char-w {
    color: #0f172a !important;
}

.emblem-char-s {
    color: #e52e2e !important;
}

.mw-brand-text {
    display: flex;
    flex-direction: column;
}

.mw-brand-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a !important;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.mw-brand-title strong {
    color: #e52e2e !important;
}

.mw-brand-sub {
    font-size: 0.62rem;
    color: #64748b !important;
    letter-spacing: 0.08em;
    font-weight: 700;
}

/* MENÚ DE NAVEGACIÓN HEADER BLANCO */
.mw-nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.mw-nav-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    padding: 0.35rem 0.45rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mw-nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #cbd5e1 !important;
    background-color: #f1f5f9 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569 !important;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.mw-nav-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.mw-nav-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 800;
    color: #1e293b !important;
    line-height: 1.1;
    letter-spacing: 0.04em;
}

.mw-nav-subtitle {
    font-size: 0.65rem;
    color: #64748b !important;
    line-height: 1.1;
}

.mw-nav-item:hover .mw-nav-icon,
.mw-nav-item.active .mw-nav-icon {
    border-color: #e52e2e !important;
    color: #ffffff !important;
    background-color: #e52e2e !important;
}

.mw-nav-item:hover .mw-nav-title,
.mw-nav-item.active .mw-nav-title {
    color: #e52e2e !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.mw-region-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a !important;
}

.mw-theme-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1 !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   HERO SHOWCASE SECTION (PORTADA 380PX MAPLESTORY CLEAN)
   ========================================================= */
.mw-hero-section {
    background-color: #24282f;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    border-bottom: 1px solid var(--border-color);
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
    padding: 1rem 1.5rem !important;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
}

.mw-hero-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.mw-hero-content {
    max-width: 780px;
    margin: 0 auto 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mw-hero-emblem-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.emblem-big-w {
    color: #ffffff;
}

.emblem-big-s {
    color: #e52e2e;
}

.mw-hero-title {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 0.85rem;
    letter-spacing: -0.02em;
}

.mw-hero-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.75rem;
    max-width: 650px;
}

.mw-hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-mw-primary {
    background-color: #e52e2e;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-mw-primary:hover {
    background-color: #c51f1f;
    transform: translateY(-1px);
}

.btn-mw-ghost {
    background-color: rgba(19, 20, 31, 0.8);
    color: #f8fafc;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #33364a;
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.btn-mw-ghost:hover {
    border-color: #e52e2e;
    background-color: rgba(229, 46, 46, 0.1);
}

/* SERVER STATUS METERS STRIP (MATCHING IMAGE PHOENIX & DRAGON METERS) */
.mw-server-status-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    width: 100%;
    max-width: 950px;
    background-color: rgba(14, 14, 21, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-md);
    padding: 1.15rem 1.5rem;
}

.mw-server-node {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mw-server-node-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.mw-server-icon {
    font-size: 1.25rem;
}

.mw-server-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.mw-server-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
}

.mw-server-online {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.mw-server-online strong {
    color: #f59e0b;
}

.mw-meter-track {
    width: 100%;
    height: 4px;
    background-color: #191a26;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.mw-meter-fill {
    height: 100%;
    background: #ea6500;
    border-radius: var(--radius-full);
}

/* =========================================================
   2-COLUMN MAIN PORTAL LAYOUT - SOFTNYX FORUM WRAPPER
   ========================================================= */
.mw-portal-container {
    max-width: 1180px;
    margin: 1.5rem auto 3rem;
    padding: 0 1rem;
}

.wiki-portal-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

/* =========================================================
   CAT_BAR: ENCABEZADO PLANO OFICIAL
   ========================================================= */
.cat_bar {
    background: #363c45 !important;
    border: 1px solid #272b33;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    box-shadow: none !important;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
}

.cat_bar h3.catbg,
.catbg {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: none !important;
    margin: 0;
    letter-spacing: 0.02em;
}

.cat-icon {
    font-size: 17px;
    color: #d6e8ff;
}

.cat-counter-pill {
    background: rgba(0, 0, 0, 0.28);
    color: #d6e8ff;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-shadow: 0 1px #000;
}

/* =========================================================
   TCAT_BAR / SUB_BAR: SUB-CABECERA CARBÓN METÁLICO
   ========================================================= */
.sub_bar {
    background: #070707 var(--dark-bar-grad);
    border: 1px solid var(--dark-bar-border);
    border-top: 0;
    border-bottom: 1px solid #0a0a0a;
}

.sub_bar_grid {
    display: grid;
    grid-template-columns: 2fr 1fr 150px;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #d4d4d4;
    text-shadow: 0 1px #000;
    padding: 7px 14px;
}

/* =========================================================
   BARRA DE CONTROLES Y FILTROS (ESTILO BREADCRUMB LIMPIO)
   ========================================================= */
.wiki-controls-wrapper {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 10px 14px;
    margin-bottom: 0;
}

.wiki-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.control-item-game {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.control-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.select-wrapper {
    position: relative;
    min-width: 170px;
}

.form-select-game {
    width: 100%;
    padding: 0.42rem 2rem 0.42rem 0.65rem;
    background-color: var(--bg-surface);
    border: 1px solid #bbbbbb;
    border-radius: var(--radius-xs);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066a2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 0.85rem;
}

.form-select-game:focus {
    border-color: var(--brand-blue-mid);
    box-shadow: 0 0 0 2px rgba(0, 102, 162, 0.15);
}

.control-item-search {
    flex: 1;
    min-width: 200px;
    max-width: 440px;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-box .search-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input-box input {
    width: 100%;
    padding: 0.42rem 2rem 0.42rem 2.2rem;
    background-color: var(--bg-surface);
    border: 1px solid #bbbbbb;
    border-radius: var(--radius-xs);
    color: var(--text-main);
    font-size: 0.84rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input-box input:focus {
    border-color: var(--brand-blue-mid);
    box-shadow: 0 0 0 2px rgba(0, 102, 162, 0.15);
}

.clear-search-btn {
    position: absolute;
    right: 0.65rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    line-height: 1;
}

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

.control-item-counter {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.control-item-counter span {
    color: var(--brand-blue-mid);
    font-weight: 700;
}

/* NAVEGACIÓN DINÁMICA DE CATEGORÍAS */
.category-nav {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
    overflow-x: auto;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav-inner {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.cat-filter-btn {
    background: var(--bg-surface);
    border: 1px solid #cbd5e1;
    color: var(--link-color);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.cat-filter-btn:hover {
    border-color: #94a3b8;
    color: var(--link-hover);
    background: #f1f5f9;
}

.cat-filter-btn.active {
    background: var(--brand-blue-base) var(--brand-blue-grad);
    border-color: var(--brand-blue-dark);
    color: #ffffff;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* =========================================================
   GRID DE ÍTEMS: DISEÑO PLANO, PROFESIONAL Y DE ALTA VISIBILIDAD
   ========================================================= */
.items-grid-compact,
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    background: transparent;
    margin-top: 1rem;
}

/* Tarjeta de Ítem Profesional en Colores Planos */
.catalog-item-card,
.item-card,
.ms-reward-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
}

.catalog-item-card:hover,
.item-card:hover,
.ms-reward-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

/* Cabecera plana de la tarjeta */
.catalog-card-header,
.ms-card-top-bar {
    padding: 10px 14px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.catalog-game-tag {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.catalog-badge-new,
.ms-card-badge-new {
    background-color: #ea6500 !important;
    color: #ffffff !important;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Vista de Imagen Destacada (Fondo claro plano, centrada, alta visibilidad) */
.catalog-card-media {
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    margin: 0 12px;
    border-radius: 6px;
    border: 1px solid #edf2f7;
    padding: 8px;
}

.catalog-card-media img {
    max-height: 105px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.15s ease;
}

.catalog-item-card:hover .catalog-card-media img,
.item-card:hover .catalog-card-media img {
    transform: scale(1.05);
}

/* Información del Ítem */
.catalog-card-info {
    padding: 12px 14px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.catalog-card-title,
.ms-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b !important;
    margin: 0 0 6px 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
    text-shadow: none !important;
}

.catalog-item-card:hover .catalog-card-title,
.item-card:hover .catalog-card-title {
    color: #910048 !important;
}

.catalog-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.catalog-cat-pill {
    font-size: 0.74rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 7px;
    border-radius: 4px;
}

.catalog-ability-pill {
    font-size: 0.72rem;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 2px 7px;
    border-radius: 4px;
}

.catalog-card-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
    margin: 0;
}

/* Botones de Acción Planos y Profesionales */
.catalog-card-actions,
.ms-card-actions {
    display: flex;
    gap: 8px;
    padding: 10px 14px 14px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

.btn-catalog-primary,
.btn-ms-action.btn-view-info {
    flex: 1;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff !important;
    background: #910048 !important;
    border: 1px solid #7a0044 !important;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background 0.15s ease;
}

.btn-catalog-primary:hover,
.btn-ms-action.btn-view-info:hover {
    background: #7a0044 !important;
}

.btn-catalog-secondary,
.btn-ms-action.btn-ms-compare {
    flex: 1;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155 !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-decoration: none;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-catalog-secondary:hover,
.btn-ms-action.btn-ms-compare:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

@media (max-width: 768px) {
    .items-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   TABLAS MAESTRAS (SISTEMA FLAT ROBUSTO Y SIN DESCUADRES)
   ========================================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    margin-bottom: 1rem;
}

/* =========================================================
   TABLAS: PADDING UNIFORME, COLORES PLANOS Y ALTA VISIBILIDAD
   ========================================================= */
table,
.flat-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

table thead,
.flat-table thead,
.data-table thead {
    background-color: #f8fafc !important;
}

table th,
.flat-table th,
.data-table th,
table.flat-table th,
table.data-table th {
    padding: 0.75rem 1rem !important; /* Padding uniforme */
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #475569 !important;
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    white-space: nowrap;
    vertical-align: middle !important;
}

table td,
.flat-table td,
.data-table td,
table.flat-table td,
table.data-table td {
    padding: 0.75rem 1rem !important; /* Padding uniforme */
    border-bottom: 1px solid #f1f5f9 !important;
    color: #1e293b !important;
    font-size: 0.86rem !important;
    vertical-align: middle !important;
}

table tbody tr,
.flat-table tbody tr,
.data-table tbody tr {
    transition: background-color var(--transition-fast);
}

table tbody tr:hover,
.flat-table tbody tr:hover,
.data-table tbody tr:hover {
    background-color: #f8fafc !important;
}

table tbody tr:last-child td,
.flat-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Utilidades para celdas */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.font-mono   { font-family: var(--font-mono); }

/* Diferencias en tablas */
.diff-positive {
    color: var(--success);
    font-weight: 700;
    font-family: var(--font-mono);
}

.diff-negative {
    color: var(--danger);
    font-weight: 700;
    font-family: var(--font-mono);
}

.diff-neutral {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* =========================================================
   BOTONES PLANOS Y FORMULARIOS (SIN RESPLANDOR)
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    font-size: 0.86rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff !important;
}

.btn-secondary {
    background-color: var(--bg-surface-elevated);
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-subtle);
    border-color: var(--border-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-subtle);
    border-color: var(--primary);
}

.btn-danger {
    background-color: transparent;
    border-color: var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background-color: var(--bg-subtle);
    border-color: var(--border-hover);
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Form Inputs */
.form-group {
    margin-bottom: 1.15rem;
}

.form-label, label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control, .form-select, .form-input, select, 
input[type="text"], input[type="password"], input[type="email"], input[type="number"], 
input[type="datetime-local"], input[type="search"], textarea {
    width: 100%;
    padding: 0.65rem 0.95rem;
    background-color: var(--bg-surface-elevated, #090d16);
    border: 1px solid var(--border-color, #334155);
    border-radius: var(--radius-sm, 6px);
    color: var(--text-main, #f8fafc);
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
    font-family: inherit;
}

.form-control:focus, .form-select:focus, select:focus, 
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, 
input[type="number"]:focus, input[type="datetime-local"]:focus, input[type="search"]:focus, 
textarea:focus {
    border-color: var(--primary, #ff7800) !important;
    background-color: var(--bg-surface-elevated, #0e1422);
    box-shadow: none !important;
}

textarea, .form-control[rows], textarea.form-control {
    min-height: 85px;
    line-height: 1.55;
    resize: vertical;
}

/* ESTILO MODERNO PARA BOTÓN EXAMINAR ARCHIVO (FILE INPUT) */
input[type="file"] {
    color: var(--text-secondary);
    font-size: 0.84rem;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
}

input[type="file"]::file-selector-button {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    border: 1px solid var(--border-color, #334155);
    background: var(--bg-subtle, #1e293b);
    color: var(--text-main, #f1f5f9);
    padding: 0.45rem 0.95rem;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary, #ff7800);
    border-color: var(--primary, #ff7800);
    color: #ffffff;
}

/* BADGES */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
}

.badge-primary {
    background-color: var(--primary-subtle);
    border-color: rgba(255, 120, 0, 0.3);
    color: var(--primary);
}

.badge-category {
    background-color: rgba(131, 84, 239, 0.15);
    border-color: rgba(131, 84, 239, 0.3);
    color: #a78bfa;
}

.badge-success {
    background-color: var(--success-subtle);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.badge-danger {
    background-color: var(--danger-subtle);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.badge-neutral {
    background-color: var(--bg-subtle);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* CONTENEDOR PRINCIPAL */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: calc(100vh - 160px);
}

/* EMPTY STATE */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.empty-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.empty-state h3 {
    font-size: 1.15rem;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* =========================================================
   MODAL Y DETALLE DEL ÍTEM (PLANO, SIN RESPLANDOR)
   ========================================================= */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 999999 !important;
}

.modal-backdrop.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.modal-dialog {
    background-color: #ffffff;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.modal-dialog.modal-lg {
    max-width: 960px;
}

.modal-header {
    padding: 12px 18px;
    border-bottom: 1px solid #272b33;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #363c45 !important;
    box-shadow: none !important;
}

.modal-title-context {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: var(--font-heading);
    text-shadow: none !important;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #ffffff !important;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.modal-close-btn:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    background-color: #ffffff;
    color: var(--text-main);
}

/* DETALLE EN 2 COLUMNAS (ESPACIOSO Y ELEGANTE) */
.item-detail-view {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 2.25rem;
    align-items: start;
}

.detail-col-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.detail-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* SELECTOR DE COMPARACIÓN BAJO LA IMAGEN */
.detail-compare-under-box {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.compare-under-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--brand-blue-mid);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.compare-under-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.compare-under-select {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-xs);
    color: var(--text-main);
    outline: none;
}

.compare-under-select:focus {
    border-color: var(--brand-blue-mid);
}

.btn-compare-under {
    background: #181818 var(--dark-bar-grad);
    border: 1px solid #000000;
    color: #ffffff;
    padding: 0.45rem 0.85rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-shadow: 0 1px #000;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    white-space: nowrap;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-compare-under:hover {
    background: var(--brand-blue-mid) var(--brand-blue-grad);
    border-color: var(--brand-blue-dark);
    box-shadow: none;
}

/* HABILIDAD ESCONDIDA */
.detail-hidden-ability-card {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-blue-mid);
    border-radius: 4px;
    padding: 0.85rem 1.15rem;
}

.detail-hidden-ability-text {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.6;
}

.hidden-ability-label i {
    color: var(--brand-blue-mid);
}

/* DÓNDE CONSEGUIR EL ÍTEM */
.detail-obtain-card {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-orange);
    border-radius: 4px;
    padding: 0.85rem 1.15rem;
}

.obtain-label i {
    color: var(--accent-orange);
}

.obtain-both-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.obtain-thumb {
    width: 48px;
    height: 48px;
    background-color: #ffffff;
    border: 1px solid #cbd6e2;
    border-radius: var(--radius-xs);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.obtain-thumb img, .obtain-thumb-only img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.obtain-text, .obtain-text-only {
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.5;
}

.detail-col-right {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-header-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.detail-item-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-navy) !important;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.detail-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.detail-section {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: #edf2f8;
    border: 1px solid #cbd6e2;
    border-radius: 8px;
    padding: 1rem 1.15rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.section-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-navy) !important;
    margin: 0;
}

.detail-description-card {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem 1.2rem;
}

.detail-description {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.65;
    margin: 0;
}

/* =========================================================
   ESTADÍSTICAS EN 2 COLUMNAS (Nombre - Valor)
   ========================================================= */
.stats-2col-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-row-2col {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-name-col {
    font-size: 0.84rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0.5rem;
}

.stat-value-col {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* =========================================================
   COMPARADOR VISUAL MEJORADO (Arma 1 | Arma 2)
   Barras de medición + Flechas indicadoras ▲/▼ + Diferencias
   ========================================================= */
.item-compare-view {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.compare-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.compare-visual-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: start;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.25rem;
}

.compare-actor {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.85rem;
    width: 100%;
}

.compare-actor-b {
    flex-direction: column;
    text-align: center;
}

.compare-actor-thumb-large,
.compare-actor-thumb {
    width: 130px;
    height: 130px;
    background-color: #ffffff;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.compare-actor-thumb-large img,
.compare-actor-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.compare-actor-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.compare-actor-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-navy) !important;
    margin: 0;
    line-height: 1.3;
}

.compare-actor-ability {
    margin-top: 0.5rem;
    background: #edf2f8;
    border: 1px solid #cbd6e2;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    max-width: 260px;
    text-align: center;
}

.compare-ability-badge {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-blue-mid);
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.compare-ability-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.compare-actor-separator {
    background-color: #edf2f8;
    border: 1px solid #cbd6e2;
    color: var(--brand-blue-mid);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filas métricas del comparador */
.compare-meter-rows {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.compare-meter-row {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    padding: 0.75rem 0.95rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.meter-col-a {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.meter-col-b {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: right;
}

.meter-stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.meter-col-b .meter-stat-header {
    flex-direction: row-reverse;
}

.meter-stat-value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.88rem;
}

/* Barras de medición planas */
.meter-track {
    width: 100%;
    height: 7px;
    background-color: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid #cbd6e2;
}

.meter-fill-a {
    height: 100%;
    background: #910048;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.meter-fill-b {
    height: 100%;
    background: #ea6500;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-left: auto;
}

.stat-arrow {
    display: inline-block;
    font-weight: 900;
    font-size: 0.92rem;
    margin: 0 0.25rem;
}

.stat-arrow.arrow-up {
    color: #10b981;
}

.stat-arrow.arrow-down {
    color: #e52e2e;
}

.stat-arrow.arrow-equal {
    color: var(--text-muted);
}

.compare-diff-col {
    min-width: 90px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.diff-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
}

.diff-badge.better-a {
    background-color: var(--primary-subtle);
    border: 1px solid rgba(255, 120, 0, 0.4);
    color: var(--primary);
}

.diff-badge.better-b {
    background-color: rgba(131, 84, 239, 0.15);
    border: 1px solid rgba(131, 84, 239, 0.4);
    color: #a78bfa;
}

.diff-badge.equal {
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* GAVETA SELECTORA DEL COMPARADOR (ESPACIADA Y MODERNA) */
.compare-trigger-box {
    margin-top: 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.btn-compare-toggle {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    display: block;
    transition: all var(--transition-fast);
}

.compare-selector-drawer {
    margin-top: 1.15rem;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.compare-action-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.compare-action-row select {
    flex: 1;
}

.compare-action-row button {
    white-space: nowrap;
    padding: 0.65rem 1.25rem;
}

/* =========================================================
   LOGIN / ACCESO ADMINISTRATIVO (ESTRUCTURA PLANA)
   ========================================================= */
.install-body {
    background-color: var(--bg-page);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.install-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.install-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.install-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.install-header {
    margin-bottom: 1.5rem;
}

.install-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.install-header .subtitle {
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.install-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Alertas planas */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: var(--danger-subtle);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.alert-success {
    background-color: var(--success-subtle);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* =========================================================
   SIDEBAR WIDGETS (ESTILO MULTIWORLD / FORUM / STREAMING)
   ========================================================= */
.wiki-sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mw-widget-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px 6px 4px 4px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mw-widget-header,
.cat_bar_mini {
    padding: 8px 12px;
    background: var(--brand-blue-base) var(--brand-blue-grad) !important;
    border-bottom: 1px solid var(--brand-blue-dark) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.mw-widget-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff !important;
    text-shadow: 0 1px rgba(0, 0, 0, 0.45);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mw-widget-body {
    padding: 0;
    background: #ffffff;
}

/* WIDGET 1: SERVIDORES EN VIVO */
.mw-live-server-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.mw-live-server-item:last-child {
    border-bottom: none;
    padding-bottom: 0.25rem;
}

.mw-live-server-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    flex-shrink: 0;
}

.mw-live-server-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.mw-live-server-details .server-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mw-live-server-details .server-status {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.server-badge-pct {
    font-size: 0.72rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-xs);
    margin-left: auto;
    font-family: var(--font-mono);
}

/* WIDGET 2: TOP ÍTEMS MÁS VOTADOS (ESTILO 'ПОСЛЕДНЕЕ С ФОРУМА') */
.mw-forum-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem !important;
}

.mw-forum-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

.mw-forum-row:hover {
    background-color: var(--bg-surface-elevated);
    border-color: var(--border-hover);
}

.mw-forum-topic {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--link-color) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mw-forum-row:hover .mw-forum-topic {
    color: var(--link-hover) !important;
    text-decoration: underline;
}

.mw-forum-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-xs);
    background-color: #08080c;
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
}

.mw-forum-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mw-forum-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.mw-forum-topic {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.mw-forum-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mw-forum-arrow {
    color: #e52e2e;
    font-size: 0.95rem;
    flex-shrink: 0;
    display: flex;
    letter-spacing: -4px;
    font-weight: 900;
    transition: transform var(--transition-fast);
}

.mw-forum-row:hover .mw-forum-arrow {
    transform: translateX(3px);
}

/* WIDGET 3: BANNER COMUNIDAD & DISCORD */
.mw-promo-banner {
    background: #363c45;
    border: 1px solid #272b33;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.mw-promo-badge {
    display: inline-block;
    background-color: #e52e2e;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
    letter-spacing: 0.06em;
    margin-bottom: 0.45rem;
}

.mw-promo-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.35rem;
}

.mw-promo-desc {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.mw-discord-card {
    background-color: #0d0e18;
    border: 1px solid #1c1e30;
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.mw-discord-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.mw-discord-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #5865F2;
    font-size: 0.84rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: 0.04em;
}

.mw-discord-brand i {
    font-size: 1.15rem;
}

.mw-discord-pill {
    background-color: rgba(16, 185, 129, 0.12);
    color: #10b981;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
}

.mw-discord-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.85rem;
}

.btn-discord-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    background-color: #5865F2;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.55rem;
    border-radius: var(--radius-xs);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: background-color var(--transition-fast);
}

.btn-discord-join:hover {
    background-color: #4752c4;
}

/* =========================================================
   FOOTER ESTILO MULTIWORLD (SIEMPRE FONDO OSCURO)
   ========================================================= */
.mw-footer,
[data-theme="light"] .mw-footer,
[data-theme="dark"] .mw-footer {
    background-color: #08080c !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 3rem 1.5rem 2rem;
    color: #94a3b8 !important;
    font-size: 0.82rem;
}

.mw-footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mw-footer-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 280px;
    gap: 2rem;
}

.mw-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.mw-footer .mw-footer-col-title,
[data-theme="light"] .mw-footer .mw-footer-col-title {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.mw-footer .mw-footer-link,
[data-theme="light"] .mw-footer .mw-footer-link {
    color: #94a3b8 !important;
    text-decoration: none;
    font-size: 0.78rem;
    transition: color var(--transition-fast);
}

.mw-footer .mw-footer-link:hover,
[data-theme="light"] .mw-footer .mw-footer-link:hover {
    color: #e52e2e !important;
}

.mw-footer-vote-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.45rem;
}

.mw-vote-badge,
[data-theme="light"] .mw-vote-badge {
    background-color: #0e0e15 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    padding: 0.45rem;
    border-radius: var(--radius-xs);
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mw-vote-badge strong,
[data-theme="light"] .mw-vote-badge strong {
    display: block;
    color: #ffffff !important;
    font-size: 0.72rem;
}

.mw-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    gap: 1.5rem;
    flex-wrap: wrap;
}

.mw-footer-brand-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mw-footer-emblem {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.mw-footer-disclaimer {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* FOOTER GENERAL LEGACY */
.app-footer {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 1.75rem 1.5rem;
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .wiki-portal-grid {
        grid-template-columns: 1fr;
    }

    .mw-server-status-bar {
        grid-template-columns: 1fr;
    }

    .mw-nav-menu {
        display: none;
    }

    .mw-footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .items-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 0.65rem;
    }

    .mw-top-strip-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .mw-hero-section {
        padding: 2rem 1rem 1.5rem;
    }

    .mw-hero-title {
        font-size: 1.65rem;
    }

    .mw-footer-top {
        grid-template-columns: 1fr;
    }

    .item-detail-view {
        grid-template-columns: 1fr;
    }

    .detail-col-left {
        max-width: 220px;
        margin: 0 auto;
    }

    .stats-2col-container {
        grid-template-columns: 1fr;
    }

    .compare-visual-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .compare-actor-b {
        flex-direction: row;
        text-align: left;
    }

    .compare-actor-separator {
        margin: 0 auto;
    }
}

/* ========================================================
   ESTRUCTURA DE STATS NORADIN (DOS COLUMNAS: BASE + REFINAMIENTO)
   ======================================================== */
.stats-noradin-box {
    background: #ffffff;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.stats-noradin-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd6e2;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
}

.stats-noradin-header > span:nth-child(2) {
    text-align: center;
}

.stats-noradin-header > span:nth-child(3) {
    text-align: right;
}

.stats-noradin-list {
    display: flex;
    flex-direction: column;
}

.stats-noradin-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
    transition: background-color 0.15s ease;
}

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

.stats-noradin-row:hover {
    background: #f8fafc;
}

.stat-noradin-name {
    color: #1e293b;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-noradin-base {
    color: #0f172a !important;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.88rem;
    text-align: center;
    letter-spacing: 0.3px;
}

.stat-noradin-refine {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.88rem;
    text-align: right;
    letter-spacing: 0.3px;
}

.stat-noradin-refine.refine-green {
    color: #16a34a !important;
}

.stat-noradin-refine.refine-red {
    color: #dc2626 !important;
}

.stat-noradin-refine.refine-white {
    color: #475569 !important;
}

/* Matriz Dinámica de Permisos */
.perm-card-item {
    background: #ffffff;
    border: 1px solid #cbd6e2;
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.perm-card-item:hover {
    border-color: #910048;
    background: #fdf2f7;
}

.perm-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.perm-icon {
    font-size: 1.25rem;
}

.perm-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
}

.perm-desc {
    font-size: 0.73rem;
    color: #64748b;
    margin-top: 1px;
}

.perm-toggle-input {
    width: 18px;
    height: 18px;
    accent-color: #910048;
    cursor: pointer;
}

/* =========================================================
   BANNERS DE TAMAÑO COMPLETO & CARRUSEL SLIDER
   ========================================================= */
.mw-full-banner-section {
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: none !important;
}

.mw-full-banner-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 2;
}

.mw-full-banner-content {
    max-width: 800px;
}

.mw-full-banner-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.mw-full-banner-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Carrusel de Slides */
.mw-slide-banners-section {
    width: 100%;
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    position: relative;
}

.mw-slide-banners-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    min-height: 260px;
}

.slide-banners-track {
    position: relative;
    width: 100%;
    min-height: 260px;
}

.slide-banner-item {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
    display: flex;
    align-items: center;
    padding: 2.5rem 3rem;
    box-sizing: border-box;
}

.slide-banner-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.slide-banner-content {
    max-width: 650px;
    position: relative;
    z-index: 2;
}

.slide-banner-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: #e52e2e;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.slide-banner-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.65rem;
    line-height: 1.2;
}

.slide-banner-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(11, 14, 19, 0.75);
    border: 1px solid var(--border-color);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 5;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.slide-nav-btn:hover {
    background: #e52e2e;
    border-color: #e52e2e;
    transform: translateY(-50%) scale(1.08);
}

.slide-nav-btn.prev { left: 1rem; }
.slide-nav-btn.next { right: 1rem; }

.slide-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
}

.slide-dot.active {
    background: #e52e2e;
    width: 26px;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .slide-banner-item { padding: 1.5rem; }
    .slide-banner-title { font-size: 1.4rem; }
    .mw-full-banner-title { font-size: 1.4rem; }
    .slide-nav-btn { display: none; }
}
