.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.field-container {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.field-container > * {
    pointer-events: auto;
    height: 100%;
}

.analytics-container {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
    box-sizing: border-box;
    pointer-events: none;
}

.analytics-container > * {
    pointer-events: auto;
}

.histogram-container {
    position: relative;
    background-color: #1A1A1D;
    border: none;
    border-radius: 0;
    flex: 0.8;
    min-height: 0;
    overflow: hidden;
}

.spider-container {
    position: relative;
    background-color: #1A1A1D;
    border: none;
    border-radius: 0;
    flex: 1.4;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.middle-stats {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
    box-sizing: border-box;
    pointer-events: none;
    background-color: #1A1A1D;
}

.middle-stats > * {
    pointer-events: auto;
}

.xgscatter {
    width: 300px;
    height: 300px;
    background-color: #1A1A1D;
    border: none;
    box-sizing: border-box;
}

.playermetrics {
    width: 300px;
    flex: 1;
    background-color: #1A1A1D;
    border: none;
    box-sizing: border-box;
    margin-top: 10px;
    overflow-y: auto;
}

.chart-section.full-width {
    grid-column: 1 / -1;
}

.chart-section {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    overflow: visible;
    height: 100%;
    box-sizing: border-box;
}

.chart {
    height: 100%;
    position: relative;
}

.shot-map {
    min-height: 500px;
}

.court-boundary {
    fill: none;
    stroke: #333;
    stroke-width: 2px;
}

.goal-area {
    fill: none;
    stroke: #666;
    stroke-width: 1.5px;
}

.center-circle {
    fill: none;
    stroke: #666;
    stroke-width: 1.5px;
}

.hexagon {
    stroke: #fff;
    stroke-width: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hexagon:hover {
    opacity: 1 !important;
    stroke-width: 2px;
    filter: brightness(1.1);
}

.hexagon-group text {
    pointer-events: none;
    user-select: none;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.heatmap-legend,
.size-legend {
    pointer-events: none;
}

.heatmap-tooltip {
    background: rgba(0, 0, 0, 0.85) !important;
}

.grid-cell {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.grid-cell:hover {
    opacity: 1 !important;
    stroke-width: 2px !important;
}

.shot-map-legend {
    font-size: 12px;
}

.shot-map-legend text {
    fill: #A0A0A8;
}

.axis {
    font-size: 12px;
    color: #A0A0A8;
}

.axis path,
.axis line {
    fill: none;
    stroke: #3D3D42;
    shape-rendering: crispEdges;
}

.axis text {
    fill: #A0A0A8;
}

.bar {
    fill: #007bff;
    transition: fill 0.3s ease;
}

.bar:hover {
    fill: #0056b3;
}

.line {
    fill: none;
    stroke: #007bff;
    stroke-width: 2px;
}

.dot {
    fill: #B3F5FF;
    stroke: #fff;
    stroke-width: 0.5;
}

.metrics-info-modal::-webkit-scrollbar {
    width: 8px;
}

.metrics-info-modal::-webkit-scrollbar-track {
    background: #1A1A1D;
    border-radius: 4px;
}

.metrics-info-modal::-webkit-scrollbar-thumb {
    background: #4A4A50;
    border-radius: 4px;
}

.metrics-info-modal::-webkit-scrollbar-thumb:hover {
    background: #5A5A60;
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}
