body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    text-align: center;
    margin: 0;
    padding: 20px;
  }
  
  h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
  }
  
  h2 {
    font-size: 24px;
    color: #4CAF50;
    margin: 10px 0;
  }
  
  .filter-container {
    text-align: center;
    margin-bottom: 20px;
  }

  .chart-container {
    margin: 20px auto;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 95%; /* Adjust width for mobile */
    max-width: 800px; /* Limit the chart width for desktop */
    height: auto; /* Automatically adjust height */
  }

    /* Tooltip container */
  .tooltip-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 12px;
    color: #000; /* Black text for the '?' */
    margin-left: 5px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border: 1px solid #000; /* Black border for the circle */
    border-radius: 50%; /* Make it circular */
    text-align: center;
    background-color: #fff; /* White background */
  }

  /* Tooltip text (hidden by default) */
  .tooltip-icon .tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  /* Tooltip arrow */
  .tooltip-icon .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; /* Arrow below the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
  }

  /* Show the tooltip on hover or focus */
  .tooltip-icon:hover .tooltip-text,
  .tooltip-icon:focus .tooltip-text {
    visibility: visible;
    opacity: 1;
  }

  /* Accessibility: Focus outline for the tooltip icon */
  .tooltip-icon:focus {
    outline: 2px solid #007bff;
  }

  
  h2 {
    margin-top: 20px;
    text-align: center;
  }  
  
  select {
    padding: 5px;
    font-size: 16px;
  }
  
  table {
    width: 100%;
    max-width: 600px; /* Limit table width */
    margin: 20px auto; /* Center the tables */
    border-collapse: collapse;
  }
  
  th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
  }
  
  th {
    background-color: #4CAF50;
    color: white;
  }
  
  tr:nth-child(even) {
    background-color: #f2f2f2;
  }

  /* Spinner Styles */
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Final Standings Styles */
.final-standings {
  margin: 20px auto 40px;
  padding: 20px;
  background-color: #f0f8f0;
  border-radius: 8px;
  max-width: 800px;
}

.final-standings h2 {
  color: #2e7d32;
  margin-top: 0;
  margin-bottom: 20px;
}

#final-standings-table {
  margin: 0 auto;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: 100%;
}

#final-standings-table th {
  background-color: #2e7d32;
}

#final-standings-table .rank-1 {
  background-color: #EFBF04;
  font-weight: bold;
}

#final-standings-table .rank-2 {
  background-color: #C4C4C4;
  font-weight: bold;
}

#final-standings-table .rank-3 {
  background-color: #CE8946;
  font-weight: bold;
}

/* #final-standings-table .rank-4 {
  background-color: #fce4ec;
  font-weight: bold;
} */

/* History button styles */
.history-section {
  margin-top: 60px;
  text-align: center;
  padding: 40px 0;
}

.history-button {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  padding: 20px 40px;
  background: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.history-button:hover {
  background: #218838;
}

.button-arrow {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.history-button:hover .button-arrow {
  transform: translateX(5px);
}