/* Container Styles */
.scores-chart-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 10px 0;
    background: #fafafa;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    min-width: 800px;
    max-width: 95vw; /* Responsive to viewport */    
    overflow: visible;
    box-sizing: border-box;
}

/* Control Panel Styles */
.chart-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
}

.control-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 5px 8px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.control-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.control-btn.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.control-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Chart SVG Styles */
.scores-chart-container svg {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* Axis Styles */
.x-axis,
.y-axis {
    font-size: 11px;
    color: #666;
}

.x-axis .domain,
.y-axis .domain {
    stroke: #ddd;
    stroke-width: 1;
}

.x-axis .tick line,
.y-axis .tick line {
    stroke: #eee;
    stroke-width: 1;
}

.x-axis text,
.y-axis text {
    fill: #666;
    font-weight: 400;
}

/* Rotate x-axis labels for better fit */
.x-axis text {
    transform: rotate(-45deg);
    text-anchor: end;
}

.axis-label {
    fill: #444;
    font-size: 14px;
    font-weight: 600;
}

/* Data Points */
.data-point {
    stroke: white;
    stroke-width: 1.5;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.data-point:hover {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Box Plot Styles */
.box-plot rect {
    cursor: pointer;
}

.box-plot line {
    stroke-linecap: round;
}

/* Tooltip Styles */
.chart-tooltip {
    position: absolute;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 8px;
    pointer-events: none;
    font-size: 13px;
    line-height: 1.4;
    max-width: 200px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 0 6px;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* Legend Styles */
.legend {
    font-size: 14px;
}

.legend text {
    fill: #444;
    font-weight: 500;
    font-size: 13px;
}

.legend circle {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Grid Lines */
.grid line {
    stroke: #f0f0f0;
    stroke-dasharray: 2,2;
    stroke-width: 1;
}

.grid path {
    stroke-width: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chart-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .control-group {
        min-width: auto;
        width: 100%;
    }
    
    .button-group {
        justify-content: center;
    }
    
    .control-btn {
        flex: 1;
        min-width: 0;
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .scores-chart-container {
        padding: 15px;
    }
    
    .scores-chart-container svg {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .chart-controls {
        padding: 15px;
    }