.rankings {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow-x: auto; /* Allow horizontal scrolling on small screens */
  display: table;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rankings thead {
  background-color: #f8f9fa;
}

.rankings th {
  padding: 8px 4px; /* Reduced padding for mobile */
  text-align: left;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  font-size: 12px; /* Smaller font size for mobile */
  letter-spacing: 0.5px;
  white-space: nowrap; /* Prevent text wrapping in header */
}

th.Rank {
  padding-right: 0px;
}

th.Difference {
  padding-right: 50px;
}

.rankings td {
  padding: 8px 4px; /* Reduced padding for mobile */
  border-top: 1px solid #e9ecef;
  color: #212529;
  font-size: 14px; /* Adjusted font size for mobile */
}

.rankings tbody tr:hover {
  background-color: #f1f3f5;
  transition: background-color 0.3s ease;
}

.rankings tbody tr:last-child td {
  border-bottom: none;
}

.johnsonIndex {
  margin: auto;
  width: 100%; /* Full width on mobile */
  max-width: 600px; /* Max width for larger screens */
  text-align: center;
}

.logo-nfl {
  height: 22px; /* Slightly smaller for mobile */
  width: 22px;
  vertical-align: middle; /* Align with text */
  margin-right: 0px; /* Add some space between logo and text */
}

.logo-cfb {
  height: 18px; /* Slightly smaller for mobile */
  width: 18px;
  vertical-align: middle; /* Align with text */
  margin-right: 0px; /* Add some space between logo and text */
}

.tab-container {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;  /* This centers the tab container and its children */
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;  /* This centers the buttons horizontally */
}

.tab-button {
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-family: 'Helvetica', Arial, sans-serif;
  font-weight: bolder;
}

.tab-button.active {
  background-color: #007bff;
  color: white;
}

.tab-content {
  display: none;
  width: 100%;  /* Makes sure content takes full width */
}

.tab-content.active {
  display: block;
}

/* Filter styles */
.table-container {
    margin: 10px 0;
}

.team-filter {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    display: block;
    margin: 0 auto 15px auto;
}

.team-filter:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.team-filter::placeholder {
    color: #888;
    font-style: italic;
}

/* Team name styling */
.team-name {
    display: none;
}

/* Media query for larger screens */
@media (min-width: 768px) {
  .rankings {
    display: table; /* Revert to table display on larger screens */
    overflow-x: visible; /* Remove horizontal scroll on larger screens */
    width: 75%;
    margin: auto;
    table-layout: fixed;
  }

  .rankings th {
    padding: 16px;
    font-size: 14px;
  }

  .rankings td {
    padding: 16px;
    font-size: 16px;
  }

  .johnsonIndex {
    width: 50%; /* Revert to original width on larger screens */
  }

  .logo-nfl {
    height: 25px;
    width: 25px;
    margin-right: -40px;
  }

  .logo-cfb {
    height: 25px;
    width: 25px;
    margin-right: -40px;
  }

  th.Rank {
    width: 5%;
  }

  th.Difference {
    width: 5%;
    padding-right: 100px;
  }

  th.TeamLogo {
    width: 0%;
  }

  th.Team {
    width: 20%;
  }

  th.Win {
    width: 20%;
  }

  th.Loss {
    width: 20%;
  }

  th.Score {
    width: 20%;
  }
}