body {
    margin: 0;
    padding: 24px;
    background-color: #f2f2f2;
}

select {
    padding: 10px;
    font-size: 16px;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff; /* Change this to the desired button color */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3; /* Change this to the desired button hover color */
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 4px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

#main {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    background-color: #f2f2f2;
}

#header {
    background-color: #f2f2f2;
    margin-bottom: 8px;
}

#authPanel {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#authStatus {
    font-weight: 600;
    color: #1f2937;
}

.auth-message {
    margin-top: 6px;
    padding: 8px 10px;
    background-color: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    color: #1e3a8a;
    font-size: 14px;
}

.auth-message.error {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

#buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#resultsLayout {
    display: grid;
    grid-template-columns: minmax(340px, 42%) minmax(420px, 58%);
    gap: 18px;
    align-items: start;
    margin-top: 10px;
}

#table {
    width: 100%;
    overflow-x: auto;
}

#canvas {
    width: 100%;
    display: flex;
    flex-direction: column; /* Stack items vertically */
}

#canvas canvas {
    width: 100%;
    margin-left: 0;
    margin-bottom: 10px;
}

.chart-filters {
    margin: 6px 0 8px 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.chart-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-right: 4px;
}

.race-filter-btn {
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid #b6c1ce;
    background-color: #ffffff;
    color: #1f2937;
    border-radius: 14px;
    cursor: pointer;
}

.race-filter-btn.active {
    background-color: #1f2937;
    color: #ffffff;
    border-color: #1f2937;
}

.race-filter-btn:hover {
    background-color: #e5e7eb;
    color: #1f2937;
    border-color: #9aa8ba;
}

.race-filter-btn.active:hover {
    background-color: #1f2937;
    color: #ffffff;
    border-color: #1f2937;
}

#ddLists {
    display: grid;
    grid-gap: 10px; /* Add some gap between rows */
    
}
.dropdown-row {
    display: flex;
    align-items: center;
    
}

.dropdown-row label {
    text-align: left;
    min-width: 125px; /* Ensure consistent width for labels */
}

.select-wrapper {
    width: 100%; /* Make selects fill the available width */
}

.select-wrapper input {
    padding: 10px;
    font-size: 16px;
    margin-bottom: 10px;
}

#outputTable {
    display: none;
}

#intervalTableHtml {
    display: none;
}

#loadingSpinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px; /* Adjust size as needed */
    height: 100px; /* Adjust size as needed */
    background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent background */
    border-radius: 50%;
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure the spinner is on top of other content */
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #333;
    border-radius: 50%;
    width: 50px; /* Adjust size as needed */
    height: 50px; /* Adjust size as needed */
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 1200px) {
    #resultsLayout {
        grid-template-columns: 1fr;
    }
}
