/* Keep everything aligned to same width as table */
.table-aligned-container {
  max-width: 1280px;
  margin: 0 auto;
}

/* ----------------------------------------------
   HEADER + CONTROLS ROW (NEW)
---------------------------------------------- */
.table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;   /* ensures header + dropdowns sit on same line */
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 10px;
}

/* TITLE */
#tableHeader {
  margin: 0;
  padding-left: 2px;
  font-size: 28px;
  font-weight: 700;
}

/* ----------------------------------------------
   DROP-DOWNS (UPDATED)
---------------------------------------------- */

.table-controls {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

/* Label ABOVE dropdown */
.control-block {
  display: flex;
  flex-direction: column;
}

.control-block label {
  font-size: 12px;
  margin-bottom: 4px;
  color: #ccc;
}

/* Select styling kept from original */
.table-controls select {
  background: #1f212d;
  color: #ccc;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 14px;
}

/* ----------------------------------------------
   TABLE WRAPPER
---------------------------------------------- */

.table-wrapper {
  background: #181a24;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* ----------------------------------------------
   TABLE
---------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid #2a2d3a;
  text-align: left;
}

thead {
  background: #1f212d;
  cursor: pointer;
}

th {
  color: #aaa;
  user-select: none;
  font-weight: 600;
}

/* sorting arrows */
th.sort-asc::after { content: "▲"; margin-left: 6px; }
th.sort-desc::after { content: "▼"; margin-left: 6px; }

/* ----------------------------------------------
   COUNTRY FLAG (UNCHANGED — original size)
---------------------------------------------- */

.flag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

/* ----------------------------------------------
   BADGES
---------------------------------------------- */

.badge {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
}

.qualified { background: #007bff30; color: #339af0; }
.dnq { background: #dc354530; color: #dc3545; }

/* ----------------------------------------------
   PLAY ICON
---------------------------------------------- */

.play-icon i {
  color: #e50914;
  cursor: pointer;
}

/* ----------------------------------------------
   RESPONSIVE
---------------------------------------------- */

@media (max-width: 800px) {
  .table-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
