/* ==========================
   Ch
========================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0d0d0d;
  color: white;
}

header {
  text-align: center;
  padding: 20px 0;
}

h1 {
  margin: 0;
  font-size: 32px;
}

/* ==========================
   TAB NAVIGATION
========================== */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.tab-button {
  background: #222;
  border: none;
  padding: 12px 25px;
  margin: 0 5px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.tab-button.active {
  background: #444;
}

.tab {
  display: none;
}

.tab.active {
  display: block;
}

/* ==========================
   RANK LIST
========================== */
.list-container {
  width: 90%;
  max-width: 540px;
  margin: auto;
}

.rank-bar-wrapper {
  width: 100%;
  display: block;
}

.rank-entry {
  display: flex;
  align-items: center;
  margin: 14px 0;
  width: 100%; /* ADD THIS */
}

.rank-number {
  width: 40px;
  font-size: 22px;
  font-weight: bold;
  opacity: 0.8;
}

.rank-bar {
  display: flex;
  align-items: center;
  height: 50px;
  border-radius: 8px;
  position: relative;
  padding-left: 70px;
  overflow: hidden;
  transition: width 0.3s ease;
  max-width: 100%;
}

.rank-bar img.logo {
  position: absolute;
  left: 10px;
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.rank-name {
  font-size: 20px;
  font-weight: bold;
}

.rank-rating {
  position: absolute;
  right: 12px;
  font-size: 20px;
  font-weight: bold;
}

.flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  margin-right: 10px;  /* space before player name */
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}

/* Bright color bar backgrounds */
.green   { background: #008c3c; }
.blue    { background: #003d99; }
.red     { background: #8c0000; }
.yellow  { background: #8c7b00; }
.magenta { background: #8c008c; }

/* "No data" text for empty players.json */
.no-data {
  text-align: center;
  margin-top: 50px;
  font-size: 20px;
  opacity: 0.7;
}

.last-updated {
  width: 90%;
  max-width: 540px;
  margin: 6px auto 18px auto;
  text-align: left;
  font-size: 14px;
  opacity: 0.75;
}
