/* Network Graph Styles */
.network-graph {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 10px;
}

.network-graph .nodes circle {
    cursor: pointer;
    transition: r 0.3s ease, stroke-width 0.3s ease;
}

.network-graph .nodes circle:hover {
    r: 25;
    stroke-width: 4;
}

.network-graph .links line {
    transition: stroke-opacity 0.3s ease;
}

.network-graph .links line:hover {
    stroke-opacity: 1;
    stroke: #3498db;
}

.network-graph .labels text {
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    margin: 50px 0;
}

/* Chart Header Styles */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px; /* Reduced from 20px */
    flex-shrink: 0;
    min-height: auto !important; /* Override parent container rules */
    height: auto !important; /* Override parent container rules */
    flex: none !important; /* Don't grow to fill space */
}

/* Override chart-container styles specifically for network graph */
.network-chart-container {
    min-height: auto !important;
    height: auto !important;
}

/* Exclude chart-header from the generic chart-container > div rules */
.network-chart-container > div:not(.chart-header) {
    flex: 1;
    min-height: 500px;
    max-height: 500px;
    overflow: visible;
    width: 100%;
}

.network-chart-container #nodeGraph {
    flex: 1;
    min-height: 500px; /* Set specific height for the graph content */
    max-height: 500px; /* Prevent it from expanding too much */
    overflow: visible;
    width: 100%;
}

.fullscreen-btn {
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: #3498db;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Fullscreen Modal Styles */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.fullscreen-modal.active {
    display: flex;
    flex-direction: column;
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.fullscreen-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
}

.close-fullscreen-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.fullscreen-content {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fullscreen Network Graph Adjustments */
.fullscreen-content .network-graph {
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.fullscreen-content .labels text {
    fill: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.fullscreen-content .legend text {
    fill: #ffffff;
}

.fullscreen-content .links line {
    stroke: #cccccc;
}

/* Keyboard shortcut info */
.fullscreen-modal::before {
    content: "Press ESC to exit fullscreen";
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    z-index: 10001;
}