body {
  font-family: Verdana, Arial, sans-serif;
  background-color: #ffffff; /* white background */
  margin: 0;
  padding: 20px;
  color: #000;
  font-size: 16px;
}

label {
  display: inline-block;
  margin-right: 5px;
  margin-bottom: 10px;
  font-size: 20px; /* Bigger label text */
}

.container {
  background-color: #ffffff;
  border: 1px solid #999;
  padding: 1em;
  max-width: 800px;
  margin: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
  margin-top: 0;
  color: #003366;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.2em;
}

h3 {
  margin-bottom:10px;
}

select {
  margin-left: 5px;
  padding: 5px 10px;
  font-size: 16px;
  border-radius: 6px; /* Rounded corners */
  border: 1px solid #aaa;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1em;
}

th, td {
  border: 1px solid #999;
  padding: 0.4em;
  text-align: center;
}

th {
  background-color: #dceeff;
  color: #000;
  font-weight: bold;
  padding: 8px;
  text-align: center;
}

tr:nth-child(even) {
  background-color: #f9f9f9;  /* soft light gray */
}

tr:nth-child(odd) {
  background-color: #ffffff;  /* pure white */
}

#tableNotes {
  margin-top: 0px;
  font-size: 14px;
  padding-left: 20px;
}

#tableNotes li {
  margin-bottom: 8px;
}

table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sorttable_nosort):after { 
    content: "\25B4\25BE" 
}

#exportContainer {
  text-align: right;
  margin: 0.5em 0;
}

#exportCsvBtn {
  background-color: #4CAF50;   /* green, nice but not too loud */
  color: white;
  border: none;
  padding: 0.5em 1.2em;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  position: relative;
  top: -3px;  /* small tweak until visually aligned */
}

#exportCsvBtn:hover {
  background-color: #45a049;   /* slightly darker on hover */
}

#controlsRow {
  display: flex;
  justify-content: space-between;  /* selectors on the left, button on the right */
  align-items: center;
  flex-wrap: wrap;  /* allows wrapping on small screens */
 /*  margin-bottom: 0.5em; */
}

#selectors label {
  margin-right: 0.8em;
}

/* apply ranking ONLY when .ranking-active is present */
table.sortable.ranking-active tbody {
  counter-reset: rowNumber;
}

table.sortable.ranking-active tbody tr {
  counter-increment: rowNumber;
}

table.sortable.ranking-active tbody tr td:first-child::before {
  content: counter(rowNumber);
  font-weight: bold;
}

/* medals */
table.sortable.ranking-active tbody tr:nth-child(1) td:first-child::before {
  content: "🥇";
}
table.sortable.ranking-active tbody tr:nth-child(2) td:first-child::before {
  content: "🥈";
}
table.sortable.ranking-active tbody tr:nth-child(3) td:first-child::before {
  content: "🥉";
}

.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #ccc;
  border-top: 4px solid #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
  background: transparent;
}

.hidden {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}