/* (full file with updated search-bar styles; keep the rest of your file as-is) */
@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;700&display=swap");

* {
  box-sizing: border-box;
}

body {
  background-color: #515151;
  font-family: "Rubik", sans-serif;
}

#global-statistics {
  display: flex;
  justify-content: space-between;
  margin: 20px;
}

@media (max-width: 768px) {
  #global-statistics {
    flex-direction: column;
    align-items: center;
  }
}

.stat-card {
  background-color: #f7f7f7;
  border: 1px solid #ddd;
  padding: 10px;
  width: calc(33.33% - 20px);
  margin: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: scale(1.02);
}

#stat-total {
  background-color: #ffd700;
  /* gold */
}

#stat-inmeeting {
  background-color: #c0c0c0;
  /* silver */
}

#stat-today {
  background-color: #cd7f32;
  /* bronze */
}

.stat-card h3,
.stat-card h2,
.stat-card h5,
.stat-card h4 {
  text-align: center;
  margin: 10px;
}

.stat-card h3,
.stat-card h2 {
  font-weight: bold;
  font-size: 24px;
}

.stat-card h5,
.stat-card h4 {
  font-size: 18px;
  color: #666;
}

* {
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #232526 0%, #515151 100%);
  color: #242424;
  font-family: "Rubik", sans-serif;
  margin: 0;
  min-height: 100vh;
}

header {
  text-align: center;
  margin-top: 32px;
  margin-bottom: 16px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: #F45151;
  margin-bottom: 0.2em;
}

nav a {
  color: #F45151;
  font-weight: 600;
  margin: 0 10px;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

.scoreboard {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
}

.score-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 28px 32px 18px 32px;
  min-width: 260px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.18s cubic-bezier(0.17, 0.67, 0.83, 0.67), box-shadow 0.18s;
  border: 2.5px solid transparent;
  position: relative;
}

.score-card.selected {
  border-color: #F45151;
  box-shadow: 0 10px 40px 4px rgba(244, 81, 81, 0.15);
  transform: scale(1.03);
}

.player-header {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 1.6em;
}

.player-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.badge {
  background: #F45151;
  color: #fff;
  font-weight: 600;
  padding: 0.12em 0.7em;
  border-radius: 1em;
  font-size: 0.9em;
  letter-spacing: 0.02em;
}

.score-items {
  display: flex;
  gap: 1.1em;
  justify-content: center;
}

.score-item {
  background: #f7f8fa;
  border-radius: 12px;
  padding: 0.8em 1.2em;
  text-align: center;
  min-width: 75px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}

.score-item .score-icon {
  font-size: 1.5rem;
  margin-bottom: 0.15em;
}

.score-item .score-value {
  font-size: 2rem;
  font-weight: 800;
  color: #F45151;
  margin-bottom: 0.1em;
}

.score-item .score-label {
  font-size: 0.97rem;
  color: #555;
}

.score-item.total .score-icon {
  color: #FFD700;
}

.score-item.week .score-icon {
  color: #2596be;
}

.score-item.inmeeting .score-icon {
  color: #F45151;
}

footer {
  text-align: center;
  margin-top: 48px;
  margin-bottom: 22px;
  color: #fff;
  font-size: 1.1rem;
  opacity: 0.92;
}

@media (max-width: 800px) {
  .scoreboard {
    flex-direction: column;
    gap: 2.5em;
    align-items: center;
  }

  .score-card {
    min-width: 90vw;
    max-width: 98vw;
    padding: 20px 8vw 16px 8vw;
  }
}

.page-title {
  text-align: center;
  color: #F45151;
  font-size: 2rem;
  margin: 1.3em 0 0.7em 0;
}

/* UPDATED SEARCH BAR / SELECT STYLING
   Make input + select look like a single attached search control.
   - input: left rounded
   - select: square middle
   - button: right rounded
*/
.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1em 0 2em 0;
  gap: 0; /* we remove gaps between input/select/button to make them look attached */
}

/* Text input: keep previous look but explicit heights so it matches select/button */
.search-bar input[type="text"] {
  font-size: 1.1em;
  padding: 0.6em 1em;
  border-radius: 6px 0 0 6px;
  border: 1px solid #bbb;
  border-right: none; /* remove double border between input and select */
  width: 300px;
  height: 44px;
  line-height: 1.2;
  box-sizing: border-box;
  background: #fff;
}

/* Select element styled to match input height and attached look */
.search-bar select {
  font-size: 1.1em;
  padding: 0.5em 1.2em;
  border: 1px solid #bbb;
  border-left: none;  /* remove double border between input and select */
  border-right: none; /* remove double border between select and button */
  height: 44px;
  line-height: 1.2;
  box-sizing: border-box;
  background-color: #fff;
  color: #333;
  border-radius: 0; /* square so it visually connects to input/button */
  /* nicer native arrow: hide default, show small SVG triangle on the right */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6"><path fill="%23333" d="M0 0l5 6 5-6z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  padding-right: 2.2em; /* make room for arrow */
  min-width: 160px;
}

/* Button as right-rounded edge of the search control */
.search-bar button {
  font-size: 1.1em;
  padding: 0.6em 1.2em;
  border-radius: 0 6px 6px 0;
  border: 1px solid #f45151;
  border-left: none; /* remove double border between select and button */
  background: #f45151;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  height: 44px;
  box-sizing: border-box;
}

/* Hover for button */
.search-bar button:hover {
  background: #d73c3c;
}

/* When the search is stacked on small screens, make full-width controls */
@media (max-width: 600px) {
  .search-bar {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .search-bar input[type="text"],
  .search-bar select,
  .search-bar button {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border-right: 1px solid #bbb;
    border-left: 1px solid #bbb;
  }

  .search-bar select {
    background-position: right 14px center;
    padding-right: 1.8em;
  }
}

.dictionary-table {
  width: 80%;
  margin: 2em auto 0 auto;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.dictionary-table th,
.dictionary-table td {
  padding: 1em;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

.dictionary-table th {
  background: #f45151;
  color: #fff;
}

.dictionary-table tr:last-child td {
  border-bottom: none;
}

.scoreboard-wrap {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;

}

.tg  {border:none;border-collapse:collapse;border-color:#9ABAD9;border-spacing:0;}
.tg td{background-color:#EBF5FF;border-color:#9ABAD9;border-style:solid;border-width:0px;color:#444;
  font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;word-break:normal;}
.tg th{background-color:#409cff;border-color:#9ABAD9;border-style:solid;border-width:0px;color:#fff;
  font-family:Arial, sans-serif;font-size:14px;font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
.tg .tg-hmp3{background-color:#D2E4FC;text-align:left;vertical-align:top}
.tg .tg-0lax{text-align:left;vertical-align:top}

.player-stats{
  width: 100%; 
  margin: auto;
}
.player-name{
  margin-bottom: 8px;
}
.player-stat-row{
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
  align-items: center;
}

/* Names columns and table styling (append after existing CSS) */
.names-columns {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  padding: 0 1rem 2rem 1rem;
  box-sizing: border-box;
}

.names-column {
  flex: 1 1 420px; /* two columns side-by-side, but flexible */
  max-width: 640px;
  min-width: 260px;
}

.names-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.names-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.names-card .player-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.names-count {
  font-size: 0.95rem;
  color: #666;
  background: #f3f3f3;
  padding: 4px 8px;
  border-radius: 999px;
}

.names-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.names-table th,
.names-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.names-table thead th {
  background: #f45151;
  color: #fff;
  font-weight: 600;
  border-bottom: none;
}

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

/* responsive: stack columns on small screens */
@media (max-width: 900px) {
  .names-columns {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .names-column {
    max-width: none;
    min-width: 0;
  }
}