.chart-container {
    margin: 10px auto;
    padding: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    width: fit-content; /* Key change */
    min-width: 600px;
    max-width: 95vw; /* Responsive to viewport */
}

.chart-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2e2e2e;   /* black text */
    /* Remove gradient-related properties */
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
}

.chart-subtitle {
    text-align: center;
    font-size: 10px;
    color: #3d3d40;
    margin-bottom: 30px;
}

.axis {
    font-size: 10px;
    color: #475569;
}

.axis path,
.axis line {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 1;
}

.grid line {
    stroke: #e2e8f0;
    stroke-width: 0.5;
    stroke-dasharray: 2,2;
    opacity: 0.7;
}

.grid path {
    stroke-width: 0;
}

.line {
    fill: none;
    stroke-width: 2.5;
    transition: all 0.3s ease;
}

.line.nvda {
    stroke: #f59e0b;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.3));
}

.line.aapl {
    stroke: #3b82f6;
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.3));
}

.line.msft {
    stroke: #10b981;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.3));
}

.line.goog {
    stroke: #ef4444;
    filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.3));
}

.dot {
    r: 4;
    transition: all 0.2s ease;
}

.dot.nvda { fill: #10b981; }
.dot.aapl { fill: #ef4444; }
.dot.msft { fill: #f59e0b; }
.dot.goog { fill: #3b82f6; }

.dot:hover {
    r: 6;
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.4));
}

.legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

.legend-item:hover {
    background: rgba(255,255,255,0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.legend-color {
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.legend-item.nvda .legend-color { background: #f59e0b; }
.legend-item.aapl .legend-color { background: #3b82f6; }
.legend-item.msft .legend-color { background: #10b981; }
.legend-item.goog .legend-color { background: #ef4444; }

.tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.zero-line {
    stroke: #64748b;
    stroke-width: 1;
    stroke-dasharray: 4,4;
    opacity: 0.8;
}

.line.faded {
    opacity: 0.2;
    stroke-width: 1.5;
}

.dot.faded {
    opacity: 0.2;
}

.annotation {
    font-family: 'Permanent Marker', sans-serif;
    font-size: 12px;
    font-weight: 400;
    fill: #374151; /* Text color for SVG text */
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none;
}

.annotation-box {
    fill: none; /* No fill */
    stroke: none; /* No border */
    filter: none;
}

.annotation-line {
    stroke: #9ca3af;
    stroke-width: 1;
    stroke-dasharray: 2,2;
    opacity: 0.7;
}
