/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #1e293b;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.header-content h1 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 5px;
}

.subtitle {
    color: #64748b;
    font-size: 1rem;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
}

.search-box button {
    padding: 8px 16px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.search-box button:hover {
    background-color: #2563eb;
}

/* Filter Box */
.filter-box {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 6px 12px;
    background-color: #e2e8f0;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: #cbd5e1;
}

.filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

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

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

/* Main Content Area */
.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    position: relative;
}

#network {
    width: 100%;
    height: 600px;
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

/* Legend Overlay */
.legend {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 200px;
}

.legend h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #0f172a;
}

#legendContent {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-indicator {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Callouts Overlay */
.callouts {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #3b82f6;
    color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 350px;
}

.callout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.close-btn {
    background-color: white;
    color: #3b82f6;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.close-btn:hover {
    background-color: #f8fafc;
}

.callout-message {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.callout-message:last-child {
    margin-bottom: 0;
}

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

.sidebar h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #0f172a;
}

.node-type {
    display: inline-block;
    background-color: #3b82f6;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.node-label {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 15px;
}

.properties-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.property-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.property-key {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-value {
    font-size: 14px;
    color: #1e293b;
}

.property-count {
    text-align: center;
    padding: 8px;
    background-color: #f8fafc;
    border-radius: 4px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Educational Notes */
.educational-notes {
    background-color: #f0fdf4;
    border-left: 4px solid #22c55e;
    border-radius: 8px;
    padding: 20px;
}

.educational-notes h3 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 15px;
}

.note-item {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.6;
}

.note-item:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        flex: 1;
    }

    .legend, .callouts {
        position: static;
        margin-top: 10px;
        max-width: 100%;
    }
}
