/* Estilos de la barra lateral - Diseño Moderno 3D */

.sidebar {
    position: fixed;
    left: 0;
    top: 60px; /* Espacio para el banner */
    width: var(--sidebar-width);
    height: calc(100vh - 60px); /* Ajustar altura cuando hay banner */
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.98) 0%, rgba(26, 31, 58, 0.98) 50%, rgba(15, 20, 25, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    transition: top 0.3s ease, height 0.3s ease;
}

/* Cuando el banner está oculto */
body.banner-hidden .sidebar {
    top: 0;
    height: 100vh;
}

/* Scrollbar personalizado para sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7289DA 0%, #667eea 100%);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    position: relative;
    z-index: 1;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    position: relative;
    z-index: 1;
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    margin: 0.25rem 0.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.nav-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.nav-item:hover::after {
    width: 200px;
    height: 200px;
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    transition: transform 0.3s;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-item:hover .nav-icon {
    transform: scale(1.2) rotate(5deg);
}

.nav-text {
    font-weight: 600;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.user-info:hover::before {
    left: 100%;
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border-color: rgba(102, 126, 234, 0.5);
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.user-info:hover .user-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.6);
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-discriminator {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background: var(--gradient-danger);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.logout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.logout-btn:hover::before {
    width: 300px;
    height: 300px;
}

.logout-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(237, 66, 69, 0.4);
}

/* Main Content with Sidebar */
.main-content.with-sidebar {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content.with-sidebar {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}
