        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #1e3c72, #2a5298);
            overflow: hidden;
        }

        .lab-container {
            display: flex;
            height: 100vh;
            background: linear-gradient(180deg, #f0f4f8 0%, #d6e8f5 100%);
        }

        .component-panel {
            width: 200px;
            background: linear-gradient(180deg, #34495e 0%, #2c3e50 100%);
            padding: 20px;
            box-shadow: 2px 0 10px rgba(0,0,0,0.3);
            overflow-y: auto;
        }

        .panel-title {
            color: #ecf0f1;
            font-size: 18px;
            margin-bottom: 20px;
            text-align: center;
            border-bottom: 2px solid #3498db;
            padding-bottom: 10px;
        }

        .component-category {
            margin-bottom: 25px;
        }

        .category-title {
            color: #bdc3c7;
            font-size: 14px;
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .component {
            width: 60px;
            height: 60px;
            margin: 5px;
            border: 2px solid #3498db;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: grab;
            font-size: 24px;
            transition: all 0.3s ease;
            background: linear-gradient(145deg, #ecf0f1, #bdc3c7);
            box-shadow: 3px 3px 6px #95a5a6, -3px -3px 6px #ffffff;
        }

        .component:hover {
            transform: scale(1.1);
            box-shadow: 0 8px 16px rgba(52, 152, 219, 0.4);
        }

        .component:active {
            cursor: grabbing;
            transform: scale(0.95);
        }

        .workspace {
            flex: 1;
            position: relative;
            background: 
                radial-gradient(circle at 20px 20px, #34495e 1px, transparent 1px),
                linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
            background-size: 40px 40px, 100% 100%;
            margin: 20px;
            border-radius: 15px;
            box-shadow: inset 0 4px 8px rgba(0,0,0,0.3);
            overflow: hidden;
        }

        .workspace-title {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(52, 152, 219, 0.9);
            color: white;
            padding: 10px 20px;
            border-radius: 25px;
            font-weight: bold;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .control-panel {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 10px;
        }

        .control-btn {
            padding: 12px 24px;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .test-btn {
            background: linear-gradient(145deg, #27ae60, #2ecc71);
            color: white;
        }

        .test-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
        }

        .reset-btn {
            background: linear-gradient(145deg, #e74c3c, #c0392b);
            color: white;
        }

        .reset-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
        }

        .circuit-element {
            position: absolute;
            width: 80px;
            height: 80px;
            border: 2px solid #ecf0f1;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: move;
            background: linear-gradient(145deg, #ffffff, #f8f9fa);
            box-shadow: 0 6px 12px rgba(0,0,0,0.4);
            transition: all 0.2s ease;
            color: #2c3e50;
        }

        .circuit-element:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 16px rgba(0,0,0,0.5);
            border-color: #3498db;
        }

        .circuit-element.connected {
            border-color: #27ae60;
            background: linear-gradient(145deg, #d5f4e6, #a8e6cf);
        }

        .circuit-element.error {
            border-color: #e74c3c;
            background: linear-gradient(145deg, #fdf2f2, #fadbd8);
            animation: shake 0.5s ease-in-out;
        }

        .circuit-element.powered {
            background: linear-gradient(145deg, #fff3cd, #ffeaa7);
            border-color: #ffc107;
            box-shadow: 0 0 25px rgba(255, 193, 7, 0.8), 0 6px 12px rgba(0,0,0,0.4);
        }

        .circuit-element.bulb-lit {
            background: linear-gradient(145deg, #fff9c4, #fdcb6e);
            border-color: #f39c12;
            box-shadow: 0 0 30px rgba(255, 235, 59, 1), 0 0 60px rgba(255, 193, 7, 0.6);
            animation: bulb-glow 1s ease-in-out infinite alternate;
        }

        @keyframes bulb-glow {
            0% { 
                box-shadow: 0 0 25px rgba(255, 235, 59, 0.8), 0 0 50px rgba(255, 193, 7, 0.4);
            }
            100% { 
                box-shadow: 0 0 35px rgba(255, 235, 59, 1), 0 0 70px rgba(255, 193, 7, 0.8);
            }
        }

        .element-symbol {
            font-size: 24px;
            margin-bottom: 2px;
        }

        .element-params {
            font-size: 9px;
            color: #34495e;
            text-align: center;
            line-height: 1.1;
            font-weight: bold;
        }

        .wire {
            position: absolute;
            height: 8px;
            background: linear-gradient(90deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
            border-radius: 4px;
            border: 2px solid #e9ecef;
            transition: all 0.3s ease;
            box-shadow: 0 3px 8px rgba(0,0,0,0.4), inset 0 1px 2px rgba(255,255,255,0.8);
            z-index: 10;
        }

        .wire.active {
            background: linear-gradient(90deg, #ff6b6b 0%, #feca57 50%, #ff6b6b 100%);
            border-color: #ff3838;
            box-shadow: 
                0 0 20px rgba(255, 107, 107, 0.8), 
                0 0 40px rgba(254, 202, 87, 0.6),
                0 3px 8px rgba(0,0,0,0.4);
            animation: current-flow 0.8s ease-in-out infinite;
        }

        @keyframes current-flow {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-5px); }
            75% { transform: translateX(5px); }
        }

        .status-panel {
            position: absolute;
            bottom: 20px;
            left: 20px;
            background: rgba(255, 255, 255, 0.95);
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            min-width: 300px;
        }

        .status-title {
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 10px;
        }

        .status-item {
            display: flex;
            justify-content: space-between;
            margin: 5px 0;
            color: #34495e;
        }

        .task-panel {
            position: absolute;
            bottom: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.95);
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            max-width: 300px;
        }

        .tutorial-panel {
            position: absolute;
            top: 80px;
            left: 20px;
            background: rgba(52, 152, 219, 0.95);
            color: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 6px 12px rgba(0,0,0,0.3);
            max-width: 280px;
            backdrop-filter: blur(10px);
        }

        .tutorial-title {
            font-weight: bold;
            font-size: 16px;
            margin-bottom: 12px;
            color: #ffffff;
            text-align: center;
            border-bottom: 2px solid rgba(255,255,255,0.3);
            padding-bottom: 8px;
        }

        .tutorial-step {
            display: flex;
            align-items: center;
            margin: 8px 0;
            font-size: 13px;
            line-height: 1.3;
        }

        .tutorial-step .step-number {
            background: rgba(255,255,255,0.2);
            color: white;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 11px;
            margin-right: 10px;
            flex-shrink: 0;
        }

        .tutorial-step .step-text {
            flex: 1;
        }

        .task-title {
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 10px;
        }

        .task-description {
            color: #34495e;
            line-height: 1.4;
        }

        .success-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(145deg, #27ae60, #2ecc71);
            color: white;
            padding: 30px;
            border-radius: 15px;
            font-size: 20px;
            font-weight: bold;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
            z-index: 1000;
            animation: success-popup 0.5s ease-out;
            display: none;
        }

        .parameter-editor {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.4);
            z-index: 1001;
            display: none;
            min-width: 300px;
        }

        .parameter-editor h3 {
            margin: 0 0 20px 0;
            color: #2c3e50;
            text-align: center;
        }

        .parameter-group {
            margin-bottom: 15px;
        }

        .parameter-group label {
            display: block;
            margin-bottom: 5px;
            color: #34495e;
            font-weight: bold;
        }

        .parameter-group input {
            width: 100%;
            padding: 8px 12px;
            border: 2px solid #bdc3c7;
            border-radius: 5px;
            font-size: 14px;
        }

        .parameter-group input:focus {
            border-color: #3498db;
            outline: none;
        }

        .parameter-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
        }

        .parameter-btn {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
        }

        .parameter-btn.save {
            background: #27ae60;
            color: white;
        }

        .parameter-btn.cancel {
            background: #95a5a6;
            color: white;
        }

        @keyframes success-popup {
            0% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.5);
            }
            100% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        .connection-point {
            position: absolute;
            width: 20px;
            height: 20px;
            background: #3498db;
            border: 4px solid #ffffff;
            border-radius: 50%;
            cursor: crosshair;
            opacity: 0.9;
            transition: all 0.3s ease;
            box-shadow: 
                0 3px 12px rgba(52, 152, 219, 0.8),
                0 0 0 2px rgba(52, 152, 219, 0.3);
            z-index: 20;
        }

        .circuit-element:hover .connection-point {
            opacity: 1;
            animation: pulse-connection 1.2s ease-in-out infinite;
            transform: scale(1.1);
        }

        .connection-point:hover {
            background: #27ae60;
            border-color: #ffffff;
            transform: scale(1.4) !important;
            box-shadow: 
                0 0 20px rgba(39, 174, 96, 1),
                0 3px 15px rgba(39, 174, 96, 0.6),
                0 0 0 3px rgba(39, 174, 96, 0.4);
            z-index: 30;
        }

        .connection-point.connected {
            opacity: 1;
            background: #27ae60;
            border-color: #ffffff;
            box-shadow: 
                0 0 12px rgba(39, 174, 96, 0.8),
                0 0 0 2px rgba(39, 174, 96, 0.4);
        }

        .connection-point.connecting {
            background: #f39c12;
            border-color: #ffffff;
            animation: connecting-pulse 0.6s ease-in-out infinite;
            box-shadow: 
                0 0 15px rgba(243, 156, 18, 1),
                0 0 0 3px rgba(243, 156, 18, 0.5);
        }

        @keyframes pulse-connection {
            0%, 100% { 
                box-shadow: 
                    0 3px 12px rgba(52, 152, 219, 0.8),
                    0 0 0 2px rgba(52, 152, 219, 0.3);
            }
            50% { 
                box-shadow: 
                    0 0 20px rgba(52, 152, 219, 1),
                    0 0 0 4px rgba(52, 152, 219, 0.6);
            }
        }

        @keyframes connecting-pulse {
            0%, 100% { 
                transform: scale(1);
                box-shadow: 
                    0 0 15px rgba(243, 156, 18, 1),
                    0 0 0 3px rgba(243, 156, 18, 0.5);
            }
            50% { 
                transform: scale(1.2);
                box-shadow: 
                    0 0 25px rgba(243, 156, 18, 1),
                    0 0 0 5px rgba(243, 156, 18, 0.8);
            }
        }