:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-color: #ecf0f1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    width: 80%;
    min-width: 1530px;
}

section {
    padding: 15px;
    width: 80%;
    padding-bottom: 0px;
}

svg {
    border: solid #28537b;
}
footer {
    margin-top: auto;  /* Push footer to bottom */
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.sidebar {
    width: 280px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    border-radius: 8px;
    margin-top: 5px;
    margin-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 1rem;  /* Add consistent spacing between elements */
}

.sidebar h3 {
    margin-top: 0;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    overflow-y: auto;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.select-menu {
    width: 100%;
}

/* Add styles for the filter settings header */
.select-menu p {
    font-size: 1.2em;
    font-weight: bold;
    color: #28537b;
    margin: 0 0 15px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #86a2a4;
    text-transform: capitalize;
}

.select-container {
    margin-bottom: 1rem;
}

.select-container label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.select-container select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.select-container select:hover {
    border-color: #999;
}

.select-container select:focus {
    outline: none;
    border-color: #86a2a4;
    box-shadow: 0 0 3px rgba(134, 162, 164, 0.5);
}

.link {
  stroke: #999;
  stroke-opacity: 0.6;
  stroke-width: 1.5px;
}

.labels {
    pointer-events: none;
    font-size: 1rem;
}

.visualization-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    height: auto;
    overflow: visible;
    margin-bottom: 2rem;
}

#correlation-plot {
    width: 100%;
    height: auto;
    overflow: visible;
}

.legend-item {
    cursor: default;
    user-select: none;
}

.legend-item text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Update media query for mobile responsiveness */
@media (max-width: 768px) {
    .content-wrapper {
        flex-wrap: wrap;
    }

    .sidebar {
        top: 100px;
        width: 240px;
        left: -240px;
    }

    .main-content {
        width: 100%;
        padding: 1rem;
        margin-left: 20px;
    }
}

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a.current {
    color: #10dfff;
    font-weight: bold;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.content-wrapper {
    display: flex;
    flex: 1;  /* Take up remaining space */
    margin-bottom: 2rem; /* Add space above footer */
    min-height: 0;  /* Allow content to determine size */
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.main-content {
    width: 80%;
    display: flex;
    flex-direction: column;
}

#network-visualization {
    position: relative;
    width: 100%;
    height: auto;  /* Allow height to adjust based on content */
    min-height: 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 5px;
    margin-bottom: 2rem; /* Add space before footer */
    overflow: visible;
}

#network-visualization section {
    margin: 0 auto;
}

.correlation-plot .ci {
    stroke-linecap: round;
}

.correlation-plot text {
    font-size: 12px;
}

.correlation-plot .grid line {
    stroke-opacity: 0.2;
}

.stats-panel {
    margin-top: auto;  /* Push stats panel to bottom */
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

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

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}