/* ================================================================
   DmApp — Fixed Left & Right Sidebars Navigation
   ================================================================ */

/* Left Sidebar */
.left-sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 260px;
    height: calc(100vh - 60px);
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(20px) !important;
    border-right: 2px solid #00FF00 !important;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3) !important;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 900;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.left-sidebar.active {
    transform: translateX(0);
}

/* Right Sidebar */
.right-sidebar {
    position: fixed;
    right: 0;
    top: 60px;
    width: 260px;
    height: calc(100vh - 60px);
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(20px) !important;
    border-left: 2px solid #00FF00 !important;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3) !important;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 900;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.right-sidebar.active {
    transform: translateX(0);
}

/* Sidebar Header */
.sidebar-header {
    padding: 24px 20px;
    background: transparent !important;
    border-bottom: 1px solid #00FF00 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.sidebar-profile-pic {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #00FF00 !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6) !important;
}

.sidebar-user-info {
    text-align: center;
}

.sidebar-username {
    font-size: 16px;
    font-weight: 700;
    color: #00FF00 !important;
    margin: 0 0 4px 0;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8) !important;
}

.sidebar-user-status {
    font-size: 12px;
    color: #00FF00 !important;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sidebar-user-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00FF00 !important;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.8) !important;
    animation: pulse-status 2s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Right Sidebar Header */
.right-sidebar .sidebar-header {
    flex-direction: column;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.5));
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #00FF00 !important;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8) !important;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 12px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    color: #00FF00 !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.15), transparent);
    transition: width 0.3s ease;
}

.sidebar-item:hover {
    color: #00FF00 !important;
    background: transparent !important;
    border-left-color: #00FF00 !important;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8) !important;
}

.sidebar-item:hover::before {
    width: 100%;
}

.sidebar-item.active {
    color: #00FF00 !important;
    background: transparent !important;
    border-left-color: #00FF00 !important;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(0, 255, 0, 1) !important;
}

.sidebar-item.active .sidebar-icon {
    transform: scale(1.15);
}

.sidebar-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.sidebar-divider {
    height: 1px;
    background: #00FF00 !important;
    margin: 12px 20px;
    box-shadow: 0 0 5px rgba(0, 255, 0, 0.5) !important;
}

/* Danger Item (Logout) */
.sidebar-item-danger {
    color: rgba(255, 100, 100, 0.8);
}

.sidebar-item-danger:hover {
    color: #ff6b6b;
    background: rgba(255, 100, 100, 0.1);
    border-left-color: #ff6b6b;
}

/* Scrollbar Styling */
.left-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
    width: 6px;
}

.left-sidebar::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.left-sidebar::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3) !important;
    border-radius: 3px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover,
.right-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.6) !important;
}

/* Main Content - No adjustments needed since sidebars are hidden by default */
body {
    margin-left: 0;
    margin-right: 0;
}

.activities-section,
main {
    margin-left: 0;
    margin-right: 0;
}

/* Top Nav - Full width since sidebars are overlays */
.top-nav {
    left: 0;
    right: 0;
    width: 100%;
}

/* Submenu Styles */
.sidebar-item-wrapper {
    position: relative;
}

.sidebar-submenu {
    position: fixed;
    left: calc(260px + 10px);
    top: auto;
    min-width: 220px;
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 2px solid #00FF00 !important;
    border-radius: 8px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5) !important;
    max-height: 500px;
    overflow-y: auto;
}

.sidebar-item-wrapper:hover .sidebar-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(0);
}

.sidebar-subitem {
    display: block;
    padding: 10px 20px;
    color: #00FF00 !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-subitem:hover {
    background: rgba(0, 255, 0, 0.1) !important;
    border-left-color: #00FF00 !important;
    padding-left: 25px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8) !important;
}

.sidebar-submenu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-submenu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.sidebar-submenu::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.4) !important;
    border-radius: 2px;
}

.sidebar-submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.7) !important;
}

/* Hide old dropdown menus */
.dropdown-menu.user-menu,
.dropdown-menu.app-menu {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .left-sidebar,
    .right-sidebar {
        width: 240px;
    }
}

@media (max-width: 1200px) {
    .left-sidebar,
    .right-sidebar {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .left-sidebar,
    .right-sidebar {
        width: 280px;
        max-width: 85vw;
    }
    
    .sidebar-header {
        padding: 20px 16px;
    }
    
    .sidebar-item {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .sidebar-icon {
        font-size: 18px;
        width: 20px;
        height: 20px;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent !important;
    z-index: 899;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Animation for sidebar items */
.sidebar-item {
    animation: slideInSidebar 0.3s ease backwards;
}

.sidebar-item:nth-child(1) { animation-delay: 0.05s; }
.sidebar-item:nth-child(2) { animation-delay: 0.1s; }
.sidebar-item:nth-child(3) { animation-delay: 0.15s; }
.sidebar-item:nth-child(4) { animation-delay: 0.2s; }
.sidebar-item:nth-child(5) { animation-delay: 0.25s; }
.sidebar-item:nth-child(6) { animation-delay: 0.3s; }
.sidebar-item:nth-child(7) { animation-delay: 0.35s; }
.sidebar-item:nth-child(8) { animation-delay: 0.4s; }
.sidebar-item:nth-child(9) { animation-delay: 0.45s; }
.sidebar-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes slideInSidebar {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Right sidebar animation */
.right-sidebar .sidebar-item {
    animation: slideInSidebarRight 0.3s ease backwards;
}

@keyframes slideInSidebarRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
