* {
    margin: 0;
    padding: 0;
  
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1000;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    flex-shrink: 0; /* Prevent sidebar from shrinking */
    /* Force hardware acceleration and proper rendering in EdgeHTML */
    transform: translateZ(0);
    will-change: transform;
    isolation: isolate; /* Create new stacking context */
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: #00d4ff;
}

.logo-image {
    /* Add your logo image styles here */
}

.menu-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 120, 215, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(0, 120, 215, 0.2);
    border-left-color: #00d4ff;
    transform: translateX(8px);
}

.nav-item.active {
    color: #00d4ff;
    background: rgba(0, 120, 215, 0.3);
    border-left-color: #00d4ff;
}

/* Main Content Styles - FIXED */
.main-content {
    flex: 1;
    min-width: 0; /* Allow content to shrink properly */
    position: relative;
    overflow: hidden;
    /* REMOVED: margin-left and transition - these were causing the double spacing */
}

.content-header {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(20px);
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2500; /* Higher than sidebar */
    display: flex !important;
    background: rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.5);
    color: #00d4ff;
    font-size: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Make it circular */
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

/* Arrow states for sidebar toggle */
.hamburger::before {
    content: "👻"; /* Right arrow when sidebar is hidden */
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* When sidebar is visible, show left arrow */
.hamburger.sidebar-visible::before {
    content: "🫣"; /* Left arrow when sidebar is visible */
}

/* Alternative: Eye icons (commented out - remove comments to use instead) */
/*
.hamburger::before {
    content: "👁️"; 
    font-size: 18px;
    transition: all 0.3s ease;
}

.hamburger.sidebar-visible::before {
    content: "👁️‍🗨️";
}
*/

.hamburger:hover {
    background: rgba(0, 212, 255, 0.4);
    border-color: #00d4ff;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
}

.page-title {
    font-size: 28px;
    font-weight: 300;
    color: #ffffff;
}

.content-area {
    padding: 30px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
}

/* Page Content Styles */
.page-content {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.page-content h2 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-weight: 300;
}

.page-content p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

/* Card Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 120, 215, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 120, 215, 0.6);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 120, 215, 0.8);
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 212, 255, 0.3);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* FIXED: Desktop sidebar toggle functionality */
@media (min-width: 769px) {
    /* When sidebar is hidden, make it take no space in flex layout */
    .sidebar.hidden {
        width: 0;
        min-width: 0;
        overflow: hidden;
        transform: translateX(-100%);
    }
    
    /* Remove the expanded class styles as they're not needed with proper flex layout */
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* UWP WebView / EdgeHTML Compatibility Fixes */
/* Fix for sidebar background not rendering properly in Xbox UWP app */

/* Feature detection fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
    .sidebar {
        background: rgb(20, 20, 20) !important; /* Solid background instead of semi-transparent */
        backdrop-filter: none !important;
    }

    .content-header {
        background: rgb(30, 30, 30) !important;
        backdrop-filter: none !important;
    }

    .page-content {
        background: rgba(20, 20, 20, 0.95) !important; /* Higher opacity for better visibility */
        backdrop-filter: none !important;
    }

    .card {
        background: rgba(30, 30, 30, 0.95) !important;
        backdrop-filter: none !important;
    }
}

/* EdgeHTML-specific fixes for UWP WebView (Xbox and Windows 10/11 UWP apps) */
/* EdgeHTML is detected using -ms-high-contrast media query */
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
    .sidebar {
        background: rgb(20, 20, 20) !important;
        background-color: rgb(20, 20, 20) !important;
        filter: none !important;
        backdrop-filter: none !important;
        /* Force proper layer rendering in EdgeHTML */
        transform: translateZ(0) !important;
        position: relative !important;
        z-index: 1000 !important;
    }

    /* Ensure sidebar header has proper background */
    .sidebar-header {
        background: rgba(25, 25, 25, 0.95) !important;
        position: relative !important;
        z-index: 1 !important;
    }

    /* Ensure nav menu has proper background */
    .nav-menu {
        background: transparent !important;
        position: relative !important;
        z-index: 1 !important;
    }

    /* Ensure nav items are properly layered */
    .nav-item {
        position: relative !important;
        z-index: 2 !important;
        background-color: transparent !important;
    }

    .nav-item:hover {
        background-color: rgba(0, 120, 215, 0.3) !important;
    }

    .nav-item.active {
        background-color: rgba(0, 120, 215, 0.4) !important;
    }

    .sidebar::before {
        display: none; /* Remove any pseudo-element effects that might not render */
    }

    .content-header {
        background: rgb(30, 30, 30) !important;
        background-color: rgb(30, 30, 30) !important;
    }

    .page-content {
        background: rgba(20, 20, 20, 0.95) !important;
        background-color: rgba(20, 20, 20, 0.95) !important;
    }

    .card {
        background: rgba(30, 30, 30, 0.95) !important;
        background-color: rgba(30, 30, 30, 0.95) !important;
    }

    /* Fix for nav-item hover effects in EdgeHTML */
    .nav-item::before {
        display: none; /* Disable gradient animation that may not render properly */
    }
}

/* Additional fallback for older Edge (pre-Chromium) */
_:-ms-lang(x), .sidebar {
    background: rgb(20, 20, 20) !important;
}

_:-ms-lang(x), .content-header {
    background: rgb(30, 30, 30) !important;
}

/* JavaScript-detected UWP WebView / EdgeHTML - Most reliable method */
/* This class is added by JavaScript when UWP WebView is detected */
.uwp-webview .sidebar,
.edgehtml .sidebar {
    background: rgb(20, 20, 20) !important;
    background-color: rgb(20, 20, 20) !important;
    backdrop-filter: none !important;
    filter: none !important;
    /* Create a proper stacking context */
    position: relative !important;
    z-index: 1000 !important;
    isolation: isolate !important;
}

.uwp-webview .sidebar-header,
.edgehtml .sidebar-header {
    background: rgba(15, 15, 15, 0.98) !important;
    background-color: rgba(15, 15, 15, 0.98) !important;
}

.uwp-webview .nav-menu,
.edgehtml .nav-menu {
    background: transparent !important;
}

.uwp-webview .nav-item,
.edgehtml .nav-item {
    background-color: transparent !important;
}

.uwp-webview .nav-item:hover,
.edgehtml .nav-item:hover {
    background: rgba(0, 120, 215, 0.25) !important;
    background-color: rgba(0, 120, 215, 0.25) !important;
}

.uwp-webview .nav-item.active,
.edgehtml .nav-item.active {
    background: rgba(0, 120, 215, 0.35) !important;
    background-color: rgba(0, 120, 215, 0.35) !important;
}

.uwp-webview .nav-item::before,
.edgehtml .nav-item::before {
    display: none !important;
}

.uwp-webview .content-header,
.edgehtml .content-header {
    background: rgb(30, 30, 30) !important;
    background-color: rgb(30, 30, 30) !important;
    backdrop-filter: none !important;
}

.uwp-webview .page-content,
.edgehtml .page-content {
    background: rgba(20, 20, 20, 0.98) !important;
    background-color: rgba(20, 20, 20, 0.98) !important;
    backdrop-filter: none !important;
}

.uwp-webview .card,
.edgehtml .card {
    background: rgba(30, 30, 30, 0.98) !important;
    background-color: rgba(30, 30, 30, 0.98) !important;
    backdrop-filter: none !important;
}

/* Xbox Console Specific Fixes - Highest Priority */
/* Xbox has the most limited EdgeHTML implementation */
.xbox-console .sidebar {
    background: #141414 !important;
    background-color: #141414 !important;
    backdrop-filter: none !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Remove all transforms that might interfere */
    transform: none !important;
    -webkit-transform: none !important;
    /* Force simple rendering */
    position: relative !important;
    z-index: 1000 !important;
    /* Remove any effects */
    box-shadow: none !important;
    border-right: 1px solid #333 !important;
}

.xbox-console .sidebar.hidden {
    /* Only apply translateX when hiding */
    transform: translateX(-100%) !important;
    -webkit-transform: translateX(-100%) !important;
}

.xbox-console .sidebar-header {
    background: #0f0f0f !important;
    background-color: #0f0f0f !important;
}

.xbox-console .nav-menu {
    background: transparent !important;
    background-color: transparent !important;
}

.xbox-console .nav-item {
    background: transparent !important;
    background-color: transparent !important;
}

.xbox-console .nav-item:hover {
    background: #1a3a5a !important;
    background-color: #1a3a5a !important;
}

.xbox-console .nav-item.active {
    background: #1f4470 !important;
    background-color: #1f4470 !important;
}

.xbox-console .nav-item::before {
    display: none !important;
}

.xbox-console .content-header {
    background: #1e1e1e !important;
    background-color: #1e1e1e !important;
    backdrop-filter: none !important;
}

.xbox-console .page-content {
    background: #141414 !important;
    background-color: #141414 !important;
    backdrop-filter: none !important;
}

.xbox-console .card {
    background: #1e1e1e !important;
    background-color: #1e1e1e !important;
    backdrop-filter: none !important;
}

/* Ensure hamburger button works on Xbox */
.xbox-console .hamburger {
    z-index: 2500 !important;
    background: rgba(0, 120, 215, 0.8) !important;
    background-color: rgba(0, 120, 215, 0.8) !important;
}

/* FIXED: Mobile responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 2000;
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        width: 100%;
        /* Remove any margin on mobile */
    }
    
    .hamburger {
        display: flex;
        /* Keep button visible and accessible on mobile */
        bottom: 20px;
        left: 20px;
    }
}