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

body {
    font-family: 'Inter', Arial, sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #1a1f2e;
}

/* Sidebar - Dark theme for Electrical */
.sidebar {
    width: 300px;
    background: #2d3349;
    border-right: 1px solid #404660;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    color: #e8eaf2;
}

.sidebar.collapsed {
    width: 50px;
}

.sidebar-header {
    padding: 15px;
    background: #252b3d;
    border-bottom: 1px solid #404660;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

.sidebar.collapsed .sidebar-header {
    padding: 15px 10px;
}

.sidebar-title {
    font-size: 16px;
    color: #ffd966;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
}

.sidebar-toggle {
    width: 30px;
    height: 30px;
    background: #404660;
    border: 1px solid #5a6077;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffd966;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #5a6077;
    transform: scale(1.05);
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    pointer-events: none;
}

.section {
    margin-bottom: 20px;
}

.section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #ffd966;
    border-bottom: 1px solid #404660;
    padding-bottom: 8px;
}

.nav-link {
    display: inline-block;
    padding: 8px 15px;
    background: #404660;
    color: #ffd966;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
    border: 1px solid #5a6077;
}

.nav-link:hover {
    background: #5a6077;
    transform: translateY(-2px);
}

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

.instructions {
    font-size: 13px;
    line-height: 1.6;
    color: #cbd0e0;
}

.content-info {
    font-size: 13px;
    line-height: 1.6;
    color: #cbd0e0;
    background: #252b3d;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #404660;
}

.footer {
    font-size: 11px;
    color: #8f97b3;
    text-align: center;
    border-top: 1px solid #404660;
    padding-top: 15px;
    margin-top: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header-controls {
    position: absolute;
    top: 15px;
    left: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.page-title {
    background: rgba(45, 51, 73, 0.95);
    color: #ffd966;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid #ffd966;
    backdrop-filter: blur(5px);
}

.badge {
    background: rgba(45, 51, 73, 0.95);
    color: #ffd966;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border: 1px solid #5a6077;
    backdrop-filter: blur(5px);
}

#container {
    flex: 1;
    overflow: auto;
    position: relative;
    background: #1a1f2e;
    padding: 20px;
}

canvas {
    display: block;
    border: 1px solid #404660;
    background: #2d3349;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #252b3d;
}

::-webkit-scrollbar-thumb {
    background: #5a6077;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6f77a0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar:not(.collapsed) {
        width: 250px;
    }
    
    .page-title {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .badge {
        padding: 6px 12px;
        font-size: 12px;
    }
}
