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

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

/* Sidebar */
.sidebar {
    width: 320px;
    background: #f6f8fa;
    border-right: 1px solid #d0d7de;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: 50px;
}

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

.sidebar.collapsed .sidebar-header {
    padding: 16px 8px;
}

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

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

.sidebar-toggle {
    width: 32px;
    height: 32px;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #24292f;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
    border-color: #6e7781;
}

.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;
}

.nav-link {
    display: inline-block;
    padding: 8px 16px;
    background: #0969da;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.2s;
    border: 1px solid #0a58ca;
}

.nav-link:hover {
    background: #0a58ca;
    transform: translateY(-1px);
}

.section {
    margin-bottom: 24px;
}

.section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #24292f;
    border-bottom: 1px solid #d0d7de;
    padding-bottom: 8px;
}

.radio-group {
    margin-bottom: 12px;
}

.radio-label {
    display: block;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #24292f;
}

.radio-label input {
    margin-right: 8px;
}

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

.instructions {
    font-size: 13px;
    line-height: 1.6;
    color: #57606a;
    background: #ffffff;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #d0d7de;
}

.content-info {
    font-size: 13px;
    line-height: 1.6;
    color: #57606a;
    background: #ffffff;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #d0d7de;
}

.footer {
    font-size: 11px;
    color: #6e7781;
    text-align: center;
    border-top: 1px solid #d0d7de;
    padding-top: 16px;
    margin-top: 24px;
}

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

.tabs {
    position: absolute;
    top: 16px;
    left: 24px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 6px 16px;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #24292f;
    transition: all 0.2s;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.tab-btn:hover {
    background: #f3f4f6;
    border-color: #6e7781;
}

.tab-btn.active {
    background: #0969da;
    color: #ffffff;
    border-color: #0969da;
}

.tab-btn.active:hover {
    background: #0a58ca;
}

.language-badge {
    position: absolute;
    top: 16px;
    right: 24px;
    background: #f6f8fa;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 1000;
    border: 1px solid #d0d7de;
    color: #24292f;
}

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

svg {
    display: block;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Node styling */
.node rect {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: filter 0.2s ease;
    cursor: pointer;
}

.node:hover rect {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.node text {
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    pointer-events: none;
}

.connection path {
    stroke: #57606a;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    opacity: 0.8;
    transition: stroke 0.2s ease;
    pointer-events: none;
}

.connection:hover path {
    stroke: #0969da;
}

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

::-webkit-scrollbar-track {
    background: #f6f8fa;
}

::-webkit-scrollbar-thumb {
    background: #c0c7cf;
    border-radius: 6px;
    border: 3px solid #f6f8fa;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a9b3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar:not(.collapsed) {
        width: 280px;
    }
    
    .tabs {
        left: 16px;
    }
    
    .tab-btn {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .language-badge {
        top: 16px;
        right: 16px;
        padding: 4px 12px;
        font-size: 12px;
    }
}
