body {
    font-family: 'Roboto', sans-serif;
    background-color: #f3f4f6;
    color: #333;
    margin: 0;
    padding: 50px 0 0; /* Add top margin */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensure full height of the viewport */
}

.container {
    width: 90%;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.player-name {
    text-align: center;
    margin-bottom: 20px;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-item {
    flex: 1 1 150px;
}

.filter-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.filter-item select {
    width: 100%;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

.three-column-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px; /* Add margin to separate from individual section */
}

.stats-container,
.heatmap-container,
.filtered-stats-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.heatmap-container {
    align-items: center;
}

.heatmap-title {
    margin-bottom: 20px;
}

.heatmap-image {
    width: 500px;
    height: 472px;
    background: url('{{ url_for('heat_maps.heatmap_image', token=token) }}') no-repeat center center;
    background-size: contain;
}

.legend {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.legend-item {
    margin: 0 10px;
    display: flex;
    align-items: center;
}

.legend-item span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
}

.legend-item .made {
    background-color: green;
}

.legend-item .missed {
    background-color: red;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.stats-table th, .stats-table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
}

.stats-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* Styles for individual games */
.individual-games-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Adjust for three columns */
    gap: 20px;
    margin-top: 20px;
}

.individual-game-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    padding: 10px;
    width: 100%;
    position: relative; /* Ensure positioning for modal */
}

.individual-game-heatmap {
    width: 250px;  /* Resize to half width */
    height: 236px; /* Resize to half height */
    background-size: cover;
    border-radius: 8px;
    margin-right: 10px; /* Add margin to separate from table */
    background-repeat: no-repeat;
    cursor: pointer; /* Indicate clickable */
}

.game-stats-table {
    width: auto; /* Adjust width to fit next to the heatmap */
    border-collapse: collapse;
    margin-bottom: 10px;
    table-layout: fixed; /* Ensure table takes up full width */
}

.game-stats-table th, .game-stats-table td {
    border: 1px solid #dee2e6;
    padding: 5px;
    text-align: center;
    font-size: 12px;
    width: 50%; /* Ensure two columns */
}

.game-stats-table th {
    background-color: #e9ecef;
    font-weight: bold;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 500px; /* Regular width */
    height: 472px; /* Regular height */
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Section separator */
.section-separator {
    margin-top: 40px;
    padding: 10px;
    text-align: center;
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    border-radius: 5px;
}

.overall-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px; /* Add margin to separate from other sections */
}
