body {
    background-color: #f8f9fa; /* Light gray background */
}

.chart-section {
    background-color: #ffffff; /* White background for sections */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.data-input {
    font-family: monospace;
    font-size: 0.9em;
    min-height: 150px; /* Ensure textareas have some height */
}

.chart-container {
    width: 100%;
    height: 350px; /* Default height for chart containers */
    background-color: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 4px;
    position: relative; /* Needed for potential absolute positioning inside (e.g., tooltips) */
    overflow: hidden; /* Hide overflow from SVG */
}

/* Make SVGs responsive within their container */
.chart-container svg {
    display: block; /* Removes bottom space */
    width: 100%;
    height: 100%;
}

.error-message {
    font-size: 0.85em;
    min-height: 1.2em; /* Reserve space even when empty */
}

/* Basic Legend Styling */
.legend-container span {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.legend-color-box {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    display: inline-block;
    border: 1px solid #ccc;
}

/* Simple Tooltip styling (if you add div-based tooltips later) */
.d3-tooltip {
    position: absolute;
    text-align: center;
    padding: 8px;
    font: 12px sans-serif;
    background: lightsteelblue;
    border: 0px;
    border-radius: 8px;
    pointer-events: none; /* Don't block mouse events */
    opacity: 0;
    transition: opacity 0.2s;
}

/* Axis styles */
.axis path,
.axis line {
  fill: none;
  stroke: #6c757d; /* Bootstrap secondary color */
  shape-rendering: crispEdges;
}

.axis text {
  font-size: 11px;
   fill: #495057; /* Bootstrap dark gray */
}

.grid line {
  stroke: #e9ecef; /* Bootstrap light gray */
  stroke-opacity: 0.7;
  shape-rendering: crispEdges;
}

.grid path {
  stroke-width: 0;
}