
:root { 
    --cp-verde: #198754; 
    --cp-verde-neon: #28a745;
    --cp-verde-glow: rgba(25, 135, 84, 0.6); 
    --cp-dark-card: #1a1a1a;
    --cp-gold: #ffc107;
}

/* --- ESTRUCTURA SIDEBAR Y MENÚ --- */
.sidebar .navbar-nav .nav-link { 
    font-weight: 600 !important; /* Peso visual más limpio para textos largos */
    color: #ffffff !important; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    font-size: 0.88rem; /* Tamaño optimizado */
    padding: 10px 15px !important;
    white-space: nowrap; /* Evita que el texto se rompa en dos líneas */
    overflow: hidden;
    text-overflow: ellipsis; /* Añade "..." si el nombre es demasiado largo */
    transition: all 0.2s ease;
}

.sidebar .navbar-nav .nav-link:hover {
    background: rgba(40, 167, 69, 0.1);
    color: var(--cp-verde-neon) !important;
}

/* Indicador de flecha (Dropdown) más minimalista */
.has-arrow-indicator::after {
    content: "\f107"; 
    font-family: "Font Awesome 5 Free"; 
    font-weight: 700;
    background-color: rgba(255,255,255,0.1); 
    color: #ccc; 
    width: 18px; 
    height: 18px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; /* Circular para un look más moderno */
    font-size: 7px; 
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.nav-link:not(.collapsed).has-arrow-indicator::after { 
    transform: rotate(180deg); 
    background-color: var(--cp-verde-neon);
    color: white;
}

/* Badges */
.badge-counter {
    position: absolute; top: 5px; right: 0; padding: 2px 5px; font-size: 0.65rem;
    font-weight: bold; border-radius: 3px; background-color: var(--cp-verde);
    color: white; border: 1px solid rgba(255,255,255,0.2);
}

/* --- NIVELES DE MENÚ (JERARQUÍA) --- */
.menu-nivel-3 {
    padding-left: 10px !important; 
    font-size: 0.8rem; 
    border-left: 1px solid rgba(255,255,255,0.05); 
    margin-left: 15px;
}

.menu-nivel-3 img, .menu-nivel-3 i {
    display: none !important; /* Maximiza espacio ocultando iconos en nivel profundo */
}

/* --- ZONA CARRERAS STYLE --- */
.zona-carreras-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3) !important;
    border-color: var(--cp-gold) !important;
}
.animate-pulse-gold { animation: pulse-gold 2s infinite; }
@keyframes pulse-gold {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* --- ESTILOS CASINO WIZARD --- */
.modal-ads-container { width: 100%; height: 100px; overflow: hidden; position: relative; background: #000; cursor: pointer; }
.ad-badge { 
    position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.8); 
    color: var(--cp-gold); font-size: 9px; font-weight: bold; padding: 2px 6px; 
    border-radius: 3px; border: 1px solid var(--cp-gold); z-index: 10; text-transform: uppercase; 
}
.modal-ads-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.modal-ads-container:hover img { transform: scale(1.05); }
.modal-ads-container::after { 
    content: ""; position: absolute; top: 0; left: -150%; width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); 
    transform: skewX(-20deg); transition: 0.7s; z-index: 5; 
}
.modal-ads-container:hover::after { left: 150%; }

.modal-nav-header { display: flex; align-items: center; gap: 15px; padding: 15px 20px; background: #1a1a1a; border-bottom: 1px solid rgba(255,255,255,0.1); }
#btnBackWizard { background: rgba(255,255,255,0.05); border: 1px solid var(--cp-verde); color: var(--cp-verde-neon); border-radius: 8px; padding: 5px 12px; font-weight: bold; }

.wizard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; padding: 20px; }
.wizard-item { 
    cursor: pointer; position: relative; background: var(--cp-dark-card); border-radius: 12px; 
    overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: 0.4s; 
}
.wizard-item:hover { transform: translateY(-5px); border-color: var(--cp-verde-neon); box-shadow: 0 0 15px var(--cp-verde-glow); }

.img-square-wrapper { position: relative; width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #0a0c10; }

.img-square-wrapper::after {
    content: ""; position: absolute; top: 0; left: -150%; width: 80%; height: 100%; 
    background: linear-gradient(to right, transparent, var(--cp-verde-neon), #fff, var(--cp-verde-neon), transparent);
    transform: skewX(-25deg); filter: blur(25px); z-index: 2;
    animation: wizardScan 2.5s infinite cubic-bezier(0.42, 0, 0.58, 1); opacity: 0.5;
}
.img-square-wrapper.loaded::after { display: none; }
@keyframes wizardScan { 0% { left: -120%; } 100% { left: 120%; } }

.wizard-item img { 
    width: 100%; height: 100%; object-fit: cover; opacity: 0; 
    transition: opacity 1.8s ease-in-out, transform 0.8s ease-out; z-index: 1;
}
.wizard-item img.loaded { opacity: 1; }
.wizard-item:hover img { transform: scale(1.12); }

.wizard-item .info { padding: 10px 5px; background: linear-gradient(to top, #000 80%, transparent); position: absolute; bottom: 0; width: 100%; text-align: center; }
.wizard-item span { font-size: 0.75rem; font-weight: 800; color: #fff; text-transform: uppercase; }

/* --- COMPONENTES DE INTERFAZ --- */
.img-msg-preview, .img-not-preview, .img-user-square {
    width: 40px; height: 40px; object-fit: cover; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1); flex-shrink: 0;
}

.dropdown-item { padding: 10px 15px; display: flex; align-items: center; }

/* Saldo y Rangos */
.balance-img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; background: rgba(255,255,255,0.1); padding: 2px; }
.balance-main-display {
    background: rgba(0, 0, 0, 0.2); border-radius: 50px; padding: 5px 15px;
    border: 1px solid rgba(25, 135, 84, 0.3); transition: 0.3s;
}
.balance-main-display:hover { background: rgba(25, 135, 84, 0.1); border-color: var(--cp-verde-neon); }
.dropdown-balances { min-width: 220px; border: 1px solid rgba(255,255,255,0.1) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important; }

.rank-container {
    background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 4px 8px; margin-top: 5px;
    border-left: 3px solid var(--cp-verde); display: inline-flex; align-items: center; gap: 8px;
}
.rank-icon-mini { width: 18px; height: 18px; object-fit: contain; }
.trend-up { color: #28a745; font-size: 0.7rem; }
.trend-down { color: #dc3545; font-size: 0.7rem; }
.trend-neutral { color: #ffc107; font-size: 0.7rem; }

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar { margin-left: -280px !important; }
    .sidebar.open { margin-left: 0 !important; }
    .content { margin-left: 0 !important; }
}
@media (max-width: 768px) { .wizard-grid { grid-template-columns: repeat(2, 1fr); } }
