        :root {
            --primary-color: #2c7da0;
            --secondary-color: #a9d6e5;
            --accent-color: #01497c;
            --light-gray: #f8f9fa;
            --border-color: #eaeaea;
            --text-color: #333;
            --text-muted: #6c757d;
            --success-color: #28a745;
            --warning-color: #ffc107;
            --danger-color: #dc3545;
            --circuit-blue: #0d6efd;
            --circuit-green: #198754;
            --circuit-purple: #6f42c1;
        }
         
        /* Circuit Canvas */
        .circuit-container {
            border: 1px solid var(--border-color);
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 1.5rem;
            position: relative;
            background: #f5f7fa;
            min-height: 400px;
        }
        
        .circuit-canvas {
            width: 100%;
            height: 400px;
            position: relative;
            overflow: auto;
        }
        
        .circuit-element {
            position: absolute;
            cursor: pointer;
            user-select: none;
            z-index: 10;
        }
        
        .circuit-wire {
            position: absolute;
            background-color: #333;
            z-index: 5;
        }
        
        /* Component Styles */
        .resistor-element {
            width: 80px;
            height: 20px;
            background-color: #ffc107;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #333;
            font-weight: bold;
            border: 2px solid #333;
        }
        
        .capacitor-element {
            width: 40px;
            height: 40px;
            background-color: #198754;
            border-radius: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            border: 2px solid #333;
        }
        
        .voltage-element {
            width: 60px;
            height: 60px;
            background-color: #0d6efd;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            border: 2px solid #333;
        }
        
        .ground-element {
            width: 60px;
            height: 30px;
            background-color: #6c757d;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            border: 2px solid #333;
        }
        
        .diode-element {
            width: 60px;
            height: 20px;
            background-color: #6f42c1;
            clip-path: polygon(0% 0%, 70% 0%, 100% 50%, 70% 100%, 0% 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            border: 2px solid #333;
        }
         
        /* Component Palette */
        .component-palette {
            background-color: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .component-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 1rem;
        }
        
        .component-item {
            background-color: var(--light-gray);
            border-radius: 6px;
            padding: 1rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            border: 1px solid transparent;
        }
        
        .component-item:hover {
            background-color: rgba(44, 125, 160, 0.1);
            border-color: var(--primary-color);
        }
        
        .component-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            color: var(--circuit-blue);
        }
        
        /* Advanced Controls */
        .advanced-controls {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            border: 1px solid var(--border-color);
        }
        
        .analysis-type-selector {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .analysis-btn {
            padding: 0.5rem 1rem;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background-color: white;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .analysis-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        /* Waveform Display */
        .waveform-container {
            background-color: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .waveform-canvas-container {
            position: relative;
            height: 300px;
            width: 100%;
            margin: 1rem 0;
        }
        
        /* Tab Interface */
        .tab-container {
            background-color: white;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            margin-bottom: 1.5rem;
        }
        
        .tab-header {
            display: flex;
            border-bottom: 1px solid var(--border-color);
            overflow-x: auto;
        }
        
        .tab-btn {
            padding: 1rem 1.5rem;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            white-space: nowrap;
            font-weight: 500;
        }
        
        .tab-btn.active {
            border-bottom-color: var(--primary-color);
            color: var(--primary-color);
        }
        
        .tab-content {
            padding: 1.5rem;
        }
        
        .tab-pane {
            display: none;
        }
        
        .tab-pane.active {
            display: block;
        }
        
        /* Results Grid */
        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin: 1.5rem 0;
        }
        
        .result-card {
            background-color: white;
            border-radius: 8px;
            padding: 1rem;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .result-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
            margin-bottom: 0.25rem;
        }
        
        .result-unit {
            font-size: 0.875rem;
            color: var(--text-muted);
        }
        
        /* Performance Indicators */
        .performance-indicator {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
            font-size: 0.875rem;
            margin-left: 1rem;
        }
        
        .performance-good {
            background-color: rgba(40, 167, 69, 0.1);
            color: var(--success-color);
        }
        
        .performance-warning {
            background-color: rgba(255, 193, 7, 0.1);
            color: var(--warning-color);
        }
        
        .performance-critical {
            background-color: rgba(220, 53, 69, 0.1);
            color: var(--danger-color);
        }
        
        /* Progress Bar */
        .simulation-progress {
            margin: 1rem 0;
        }
        
        /* Node Voltage List */
        .node-voltage-list {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            padding: 1rem;
        }
        
        .node-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0;
            border-bottom: 1px solid var(--border-color);
        }
        
        .node-item:last-child {
            border-bottom: none;
        }
      
        /* Responsive Adjustments */
        @media (max-width: 768px) { 
            .component-grid {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            }
            
            .results-grid {
                grid-template-columns: 1fr;
            }
            
            .tab-header {
                flex-wrap: wrap;
            }
            
            .tab-btn {
                flex: 1;
                min-width: 100px;
                text-align: center;
            }
        }
        
        /* Wire Drawing */
        .wire-drawing {
            cursor: crosshair;
        }
        
        /* Component Selection */
        .selected-element {
            box-shadow: 0 0 0 3px var(--primary-color);
        }
        
        /* Toast Notifications */
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1050;
        }
    