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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    min-height: 100vh;
    padding: 20px;
    color: #1e293b;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-text {
    flex: 1;
}

h1 {
    color: #1e293b;
    font-size: 2em;
    margin-bottom: 8px;
}

.subtitle {
    color: #64748b;
    font-size: 1.1em;
}

.educational-notes {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.note {
    margin: 8px 0;
    color: #166534;
    font-size: 0.95em;
    line-height: 1.6;
}

.controls {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 8px;
    min-width: 280px;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.95em;
}

#searchInput:focus {
    outline: none;
    border-color: #3b82f6;
}

#searchBtn {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

#searchBtn:hover {
    background: #2563eb;
}

.filter-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-box h3 {
    font-size: 0.85em;
    color: #475569;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.filter-checkboxes {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    flex: 1;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.filter-action-btn {
    padding: 6px 12px;
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-action-btn:hover {
    background: #cbd5e1;
    border-color: #94a3b8;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.filter-checkbox label {
    cursor: pointer;
    font-size: 0.9em;
    color: #334155;
    user-select: none;
}

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

.canvas-container {
    flex: 1;
    position: relative;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    height: 600px;
}

#network {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.legend {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 220px;
}

.legend h4 {
    font-size: 0.9em;
    color: #475569;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-size: 0.85em;
}

.legend-color,
.legend-shape {
    width: 20px;
    height: 20px;
    border: 2px solid #334155;
    flex-shrink: 0;
}

.legend-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.legend-label {
    color: #334155;
    font-weight: 500;
}

.callouts {
    position: absolute;
    bottom: 15px;
    left: 15px;
    max-width: 350px;
}

.callout {
    background: rgba(59, 130, 246, 0.95);
    color: white;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 6px;
    font-size: 0.85em;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.callout-text {
    flex: 1;
}

.callout-ok-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #3b82f6;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.callout-ok-btn:hover {
    background: white;
    transform: scale(1.05);
}

.sidebar {
    width: 280px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    height: 600px;
    overflow-y: auto;
}

.sidebar h3 {
    font-size: 1.1em;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

#nodeDetails {
    font-size: 0.9em;
}

.placeholder {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.node-detail-header {
    background: #3b82f6;
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.node-detail-header h4 {
    font-size: 1.1em;
    margin-bottom: 4px;
}

.node-detail-header .node-type {
    font-size: 0.85em;
    opacity: 0.9;
}

.properties-list {
    margin-top: 10px;
}

.property-item {
    background: white;
    padding: 10px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 3px solid #3b82f6;
}

.property-key {
    font-weight: 600;
    color: #475569;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.property-value {
    color: #1e293b;
    font-size: 0.95em;
    word-break: break-word;
}

.property-count {
    margin-top: 15px;
    padding: 10px;
    background: #dbeafe;
    border-radius: 4px;
    text-align: center;
    font-size: 0.85em;
    color: #1e40af;
    font-weight: 600;
}
