body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
  padding: 10px;
}

h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 20px;
}

.ranking {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin-bottom: 15px;
}

  .ranking h2 {
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    margin-bottom: 10px;
  }

/* Table styling for wider screens */
.table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

  .table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }

  .table th {
    background-color: #3498db;
    color: white;
    font-weight: bold;
  }

  .table tr:nth-child(even) {
    background-color: #f8f9fa;
  }

  .table tr:hover {
    background-color: #e9ecef;
  }

.ticket-link {
  color: #3498db;
  text-decoration: none;
  font-weight: bold;
}

  .ticket-link:hover {
    text-decoration: underline;
  }

/* Card styling for narrow screens */
.ranking-card {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 8px;
  background-color: white;
}

.card-line-1 {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 4px;
}

.card-line-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

  .card-line-2 > div {
    flex: 1 0 auto;
  }

/* Hide table on narrow screens and show cards */
@media (max-width: 768px) {
  .table-container {
    display: none;
  }

  .cards-container {
    display: block;
    padding-left: 5px;
    padding-right: 5px;
  }
}

/* Hide cards on wider screens and show table */
@media (min-width: 769px) {
  .cards-container {
    display: none;
  }
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  font-family: monospace;
  max-height: 80vh;
  overflow-y: auto;
}

.mobile-club {
  flex: none;
  width: 30vw;
}

.mobile-category {
  flex: none;
  width: 10vw;
}

.mobile-ticket {
  flex: none;
  width: 10vw;
}

.mobile-speed {
  flex: none;
  width: 15vw;
}