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

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

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

header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    position: relative;
    display: flex;
    height: 600px;
}

#network {
    flex: 1;
    background: #f8fafc;
    border-bottom: 3px solid #e2e8f0;
}

.info-panel {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 350px;
    max-height: 560px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 25px;
    overflow-y: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.info-panel.hidden {
    transform: translateX(400px);
    opacity: 0;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #94a3b8;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

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

#concept-title {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 10px;
    margin-right: 30px;
}

.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#concept-description {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}

.examples-section h3,
.related-section h3 {
    font-size: 1rem;
    color: #334155;
    margin-bottom: 10px;
    margin-top: 20px;
}

.examples-section ul,
.related-section ul {
    list-style: none;
    padding: 0;
}

.examples-section li {
    background: #f1f5f9;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    color: #475569;
    line-height: 1.5;
}

.related-section li {
    background: #dbeafe;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    color: #1d4ed8;
    font-weight: 500;
}

.controls {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

button {
    padding: 10px 20px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

button:active {
    transform: translateY(0);
}

.legend {
    margin-left: auto;
}

.legend h3 {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    font-size: 0.85rem;
    color: #475569;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

@media (max-width: 768px) {
    .main-content {
        height: 500px;
    }

    .info-panel {
        width: calc(100% - 40px);
        max-height: 400px;
    }

    .controls {
        flex-wrap: wrap;
    }

    .legend {
        width: 100%;
        margin-left: 0;
        margin-top: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }
}
