:root {
            --primary: #6e48aa;
            --secondary: #4776E6;
            --accent: #9d50bb;
            --text: #e0e0e0;
            --bg: #121218;
            --card-bg: rgba(30, 30, 40, 0.7);
            --glass-border: rgba(255, 255, 255, 0.1);
            --button-bg: linear-gradient(45deg, var(--primary), var(--accent));
            --button-hover: linear-gradient(45deg, var(--accent), var(--secondary));
            --scrollbar-thumb: rgba(110, 72, 170, 0.5);
            --scrollbar-track: rgba(30, 30, 40, 0.3);
            --sidebar-width: 250px;
            --sidebar-collapsed-width: 70px;
            --sidebar-bg: rgba(20, 20, 30, 0.9);
            --sidebar-active: rgba(110, 72, 170, 0.3);
            --sidebar-hover: rgba(110, 72, 170, 0.2);
            --transition-speed: 0.3s;
        }

        .light-mode {
            --text: #333;
            --bg: #f5f7fa;
            --card-bg: rgba(255, 255, 255, 0.8);
            --glass-border: rgba(0, 0, 0, 0.1);
            --scrollbar-thumb: rgba(110, 72, 170, 0.3);
            --scrollbar-track: rgba(240, 240, 240, 0.5);
            --sidebar-bg: rgba(255, 255, 255, 0.9);
            --sidebar-active: rgba(110, 72, 170, 0.15);
            --sidebar-hover: rgba(110, 72, 170, 0.1);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', sans-serif;
            transition: all var(--transition-speed) ease;
        }

        body {
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            background-image: 
                radial-gradient(circle at 10% 20%, rgba(110, 72, 170, 0.1) 0%, transparent 20%),
                radial-gradient(circle at 90% 80%, rgba(71, 118, 230, 0.1) 0%, transparent 20%);
            padding-left: var(--sidebar-width);
            overflow-x: hidden;
        }

        body.sidebar-collapsed {
            padding-left: var(--sidebar-collapsed-width);
        }

        /* Scrollbar styling */
        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--scrollbar-track);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--scrollbar-thumb);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary);
        }

        /* Sidebar styles */
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: var(--sidebar-bg);
            backdrop-filter: blur(10px);
            border-right: 1px solid var(--glass-border);
            z-index: 100;
            transition: width var(--transition-speed);
            overflow: hidden;
        }

        body.sidebar-collapsed .sidebar {
            width: var(--sidebar-collapsed-width);
        }

        .sidebar-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.5rem 1.5rem 1rem;
            border-bottom: 1px solid var(--glass-border);
            height: 70px;
        }

        .sidebar-title {
            font-size: 1.2rem;
            font-weight: 600;
            white-space: nowrap;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .sidebar-toggle {
            background: none;
            border: none;
            color: var(--text);
            font-size: 1.3rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .sidebar-toggle:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .sidebar-menu {
            padding: 1rem 0;
            height: calc(100vh - 70px);
            overflow-y: auto;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 0.8rem 1.5rem;
            margin: 0.2rem 0.5rem;
            border-radius: 8px;
            color: var(--text);
            text-decoration: none;
            white-space: nowrap;
            transition: all 0.2s;
        }

        .menu-item:hover {
            background: var(--sidebar-hover);
        }

        .menu-item.active {
            background: var(--sidebar-active);
            border-left: 3px solid var(--primary);
        }

        .menu-icon {
            font-size: 1.2rem;
            margin-right: 1rem;
            min-width: 20px;
        }

        .menu-text {
            font-size: 0.95rem;
        }

        body.sidebar-collapsed .menu-text {
            display: none;
        }

        body.sidebar-collapsed .sidebar-title {
            display: none;
        }

        body.sidebar-collapsed .menu-item {
            justify-content: center;
            padding: 0.8rem 0;
        }

        body.sidebar-collapsed .menu-icon {
            margin-right: 0;
        }

        /* Main content */
        .main-content {
            padding: 2rem;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2.5rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--glass-border);
        }

        h1 {
            font-size: 2.2rem;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            font-weight: 700;
        }

        .theme-toggle {
            background: var(--button-bg);
            color: white;
            border: none;
            padding: 0.6rem 1.2rem;
            border-radius: 50px;
            cursor: pointer;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 4px 15px rgba(110, 72, 170, 0.3);
        }

        .theme-toggle:hover {
            background: var(--button-hover);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(157, 80, 187, 0.4);
        }

        .dashboard {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 1.5rem;
        }

        .card {
            background: var(--card-bg);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border: 1px solid var(--glass-border);
            transition: transform 0.3s, box-shadow 0.3s;
            display: flex;
            flex-direction: column;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 40px rgba(110, 72, 170, 0.2);
        }

        .card h2 {
            font-size: 1.3rem;
            margin-bottom: 1.2rem;
            display: flex;
            align-items: center;
            gap: 0.8rem;
            color: var(--primary);
        }

        .card-icon {
            font-size: 1.4rem;
        }

        .input-group {
            margin-bottom: 1rem;
        }

        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            font-size: 0.9rem;
            opacity: 0.9;
        }

        input, textarea, select {
            width: 100%;
            padding: 0.8rem;
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text);
            font-size: 0.95rem;
        }

        textarea {
            min-height: 100px;
            resize: vertical;
        }

        select {
            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='currentColor' stroke-width='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.7rem center;
            background-size: 1rem;
        }

        .btn {
            background: var(--button-bg);
            color: white;
            border: none;
            padding: 0.8rem 1.5rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            margin-right: 0.8rem;
            margin-top: 0.5rem;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 4px 15px rgba(110, 72, 170, 0.3);
        }

        .btn:hover {
            background: var(--button-hover);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(157, 80, 187, 0.4);
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid var(--glass-border);
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .output-container {
            margin-top: 1.5rem;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }

        .output-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .output-title {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        .output-actions {
            display: flex;
            gap: 0.5rem;
        }

        .output-action {
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: var(--text);
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .output-action:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .output {
            background: rgba(110, 72, 170, 0.1);
            border-radius: 8px;
            border-left: 4px solid var(--primary);
            white-space: pre-wrap;
            font-size: 0.95rem;
            line-height: 1.6;
            padding: 1.2rem;
            flex-grow: 1;
            overflow-y: auto;
            max-height: 300px;
        }

        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255,255,255,.3);
            border-radius: 50%;
            border-top-color: var(--primary);
            animation: spin 1s ease-in-out infinite;
            margin-right: 0.5rem;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        footer {
            margin-top: 3rem;
            text-align: center;
            padding-top: 2rem;
            border-top: 1px solid var(--glass-border);
            font-size: 0.9rem;
            opacity: 0.7;
        }

        /* Tooltip styles */
        .tooltip {
            position: relative;
            display: inline-block;
        }

        .tooltip .tooltiptext {
            visibility: hidden;
            width: 120px;
            background-color: var(--text);
            color: var(--bg);
            text-align: center;
            border-radius: 6px;
            padding: 5px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 0.8rem;
        }

        .tooltip:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
        }

        /* Section highlighting */
        .section-highlight {
            animation: highlight 2s ease;
        }

        @keyframes highlight {
            0% { box-shadow: 0 0 0 0 rgba(110, 72, 170, 0.7); }
            70% { box-shadow: 0 0 0 10px rgba(110, 72, 170, 0); }
            100% { box-shadow: 0 0 0 0 rgba(110, 72, 170, 0); }
        }

        @media (max-width: 768px) {
            body {
                padding-left: 0;
            }

            body.sidebar-collapsed {
                padding-left: 0;
            }

            .sidebar {
                width: 100%;
                height: auto;
                bottom: 0;
                top: auto;
                border-right: none;
                border-top: 1px solid var(--glass-border);
            }

            body.sidebar-collapsed .sidebar {
                width: 100%;
            }

            .sidebar-header {
                display: none;
            }

            .sidebar-menu {
                display: flex;
                overflow-x: auto;
                height: auto;
                padding: 0.5rem;
            }

            .menu-item {
                flex-direction: column;
                padding: 0.5rem;
                font-size: 0.8rem;
                min-width: 60px;
            }

            .menu-icon {
                margin-right: 0;
                margin-bottom: 0.3rem;
                font-size: 1rem;
            }

            .menu-text {
                font-size: 0.7rem;
            }

            .dashboard {
                grid-template-columns: 1fr;
            }
            
            .main-content {
                padding: 1.5rem;
            }
            
            h1 {
                font-size: 1.8rem;
            }
        }