.connections-visualization {
    width: 100%;
    min-height: 600px;
}

.visualization-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--ps-bg);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--ps-shadow-sm);
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ps-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--ps-text-secondary);
    margin-top: 0.5rem;
}

.controls {
    display: flex;
    gap: 0.5rem;
}

.btn-control {
    padding: 0.5rem 1rem;
    background: var(--ps-accent-subtle);
    color: var(--ps-accent);
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-control:hover:not(:disabled) {
    background: var(--ps-accent);
    color: #fff;
    transform: translateY(-2px);
}

.btn-control:disabled {
    background: var(--ps-accent);
    color: #fff;
    cursor: default;
    border-color: var(--ps-accent);
}

.graph-container {
    width: 100%;
    height: 600px;
    background: var(--ps-bg);
    border-radius: 12px;
    box-shadow: var(--ps-shadow-sm);
    overflow: hidden;
}

.graph-container svg {
    cursor: grab;
}

.graph-container svg:active {
    cursor: grabbing;
}

.loading-state,
.error-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
    padding: 3rem;
}

.loading-spinner,
.error-icon,
.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.loading-state p,
.error-state p,
.empty-state p {
    color: var(--ps-text-secondary);
    font-size: 1rem;
    margin-top: 0.75rem;
}

.error-state h4,
.empty-state h4 {
    color: var(--ps-text-primary);
    font-size: 1.25rem;
    margin: 0;
}

.btn-retry {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--ps-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-retry:hover {
    background: var(--ps-accent-hover);
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .visualization-header {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .graph-container {
        height: 400px;
    }
}
