* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.instructions {
    margin-top: 15px;
    font-size: 0.95em;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 8px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.instructions strong {
    display: inline-block;
    margin-right: 5px;
}

.main-content {
    display: flex;
    gap: 20px;
}

.toolbar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 200px;
    max-width: 200px;
}

.toolbar h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1em;
}

.toolbar hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #ddd;
}

.component-btn, #clearBtn, #deleteMode, #labelMode {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.component-btn:hover, #clearBtn:hover, #deleteMode:hover, #labelMode:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.component-btn:active, #clearBtn:active, #deleteMode:active, #labelMode:active {
    transform: translateY(0);
}

#clearBtn {
    border-color: #e74c3c;
    color: #e74c3c;
}

#clearBtn:hover {
    background: #e74c3c;
    color: white;
}

#deleteMode.active, #labelMode.active {
    background: #667eea;
    color: white;
}

#modeIndicator {
    padding: 10px;
    background: #f0f0f0;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.canvas-container {
    flex: 1;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

#circuitCanvas {
    display: block;
    cursor: crosshair;
    background: #fafafa;
}
