/* ==========================================================================
   Font Import
   ========================================================================== */
@font-face {
  font-family: "Eurostile Unicase LT W04 Rg";
  src: url("https://db.onlinewebfonts.com/t/e2aba67a61a20987775ae4a14c15dd81.eot");
  src: url("https://db.onlinewebfonts.com/t/e2aba67a61a20987775ae4a14c15dd81.eot?#iefix") format("embedded-opentype"),
       url("https://db.onlinewebfonts.com/t/e2aba67a61a20987775ae4a14c15dd81.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/e2aba67a61a20987775ae4a14c15dd81.woff") format("woff"),
       url("https://db.onlinewebfonts.com/t/e2aba67a61a20987775ae4a14c15dd81.ttf") format("truetype"),
       url("https://db.onlinewebfonts.com/t/e2aba67a61a20987775ae4a14c15dd81.svg#Eurostile Unicase LT W04 Rg") format("svg");
  font-display: swap;
}

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
  --bg: #181818;
  --bg-2: #1f1f1f;
  --bg-3: #242424;
  --stroke: #2b2b2b;
  --txt: #ffffff;
  --muted: #b8b8b8;
  --accent: #A657E7;
}

/* ==========================================================================
   Global Reset
   ========================================================================== */
* { box-sizing: border-box; }
*, *::before, *::after { border-radius: 0 !important; } /* all corners 0 */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--txt);
  font-family: "Eurostile Unicase LT W04 Rg", monospace;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* ==========================================================================
   Layout
   ========================================================================== */
#container {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#logo-container { margin-top: 16px; }
#logo { width: 180px; height: auto; display: block; margin: 0 auto 16px; }

/* Headings */
#latest-game-headline,
#leaderboard-headline {
  font-size: 18px;
  margin: 30px 0 6px 0;
  letter-spacing: .5px;
}
#leaderboard-subheadline {
  margin: 0;
  opacity: .5;
  font-size: 12px;
}

/* ==========================================================================
   Countdown (season)
   ========================================================================== */
#season-countdown { margin-top: 12px; }

#countdown {
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  padding: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.cd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.cd-unit {
  background: var(--bg-3);
  border: 1px solid var(--stroke);
  padding: 10px 6px;
  text-align: center;
}

.cd-value {
  font-size: 24px;
  line-height: 1;
}

.cd-label {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: .6px;
}

.season-progress {
  margin-top: 10px;
  height: 6px;
  background: var(--stroke);
  width: 100%;
}

.season-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.season-sub {
  margin: 8px 0 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  letter-spacing: .4px;
}

/* ==========================================================================
   Tables (Latest Games + Leaderboard) — unified style
   ========================================================================== */
#table-container,
#leaderboard-container {
  width: 100%;
  margin-top: 12px;
  padding-top: 6px;
}

/* Base table */
table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: var(--bg-3);
  border-bottom: 1px solid var(--stroke);
  padding: 12px 8px;
  font-size: 12px;
  text-align: left;
}

tbody tr {
  background: transparent;
  border-bottom: 1px solid var(--stroke);
  transition: background 0.15s ease-in-out;
}

tbody tr:hover { background: var(--bg-3); }

td {
  padding: 12px 8px;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
}

/* Latest Games specific widths */
#table-container td:nth-child(1) { width: auto; }
#table-container td:nth-child(2),
#table-container td:nth-child(3) { width: 88px; text-align: center; }

/* Leaderboard table matches same visuals */
#leaderboard-table { border: 1px solid var(--bg-3); }
#leaderboard-table th { text-align: left; }
#leaderboard-table td { border-bottom: 1px solid var(--stroke); }
#leaderboard-table tr:hover { background: var(--bg-3); }

/* Rank column emphasis */
#leaderboard-table th:nth-child(1),
#leaderboard-table td:nth-child(1) {
  width: 40px;
  text-align: center;
  color: var(--accent);
  font-weight: bold;
}

/* Numeric columns center-aligned */
#leaderboard-table th:nth-child(3),
#leaderboard-table td:nth-child(3),
#leaderboard-table th:nth-child(4),
#leaderboard-table td:nth-child(4),
#leaderboard-table th:nth-child(5),
#leaderboard-table td:nth-child(5) {
  text-align: center;
  width: 15%;
}

/* Player name truncation */
#leaderboard-table td:nth-child(2) {
  max-width: 360px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Button
   ========================================================================== */
#leaderboard-btn-wrapper { text-align: center; margin: 16px auto; }

#leaderboard-btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: "Eurostile Unicase LT W04 Rg", monospace !important;
  text-transform: uppercase !important;
}

#leaderboard-btn:hover { opacity: .9; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  html, body { font-size: 12px; }
  #container { padding: 12px; }
  #logo { width: 140px; margin-bottom: 12px; }

  /* Countdown bigger digits on phones */
  .cd-value { font-size: 28px; }
  .cd-label { font-size: 10px; }

  /* Latest Games rows become grid for tighter layout */
  #table-container tbody tr {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
  }
  #table-container td { font-size: 13px; padding: 10px 6px; }
  #table-container td:nth-child(1) { grid-column: 1; }
  #table-container td:nth-child(2) { grid-column: 2; text-align: center; }
  #table-container td:nth-child(3) { grid-column: 3; text-align: center; }

  /* Leaderboard compact */
  #leaderboard-container { width: 100%; padding-bottom: 10px; }
  #leaderboard-table { width: 100%; border-collapse: collapse; }
  #leaderboard-table th,
  #leaderboard-table td {
    padding: 10px 6px;
    font-size: 12px;
    line-height: 1.6;
  }

  /* Mobile header compaction with short labels */
  #leaderboard-table thead th {
    border: none !important;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-indent: -9999px;
    border-bottom: 2px solid var(--accent) !important;
    text-align: center;
  }
  #leaderboard-table thead th:nth-child(2)::after {
    content: "Player"; position: absolute; left: 0; text-indent: 0;
  }
  #leaderboard-table thead th:nth-child(3)::after,
  #leaderboard-table thead th:nth-child(4)::after,
  #leaderboard-table thead th:nth-child(5)::after {
    position: absolute; left: 50%; transform: translateX(-50%); text-indent: 0;
  }
  #leaderboard-table thead th:nth-child(3)::after { content: "P"; }
  #leaderboard-table thead th:nth-child(4)::after { content: "K"; }
  #leaderboard-table thead th:nth-child(5)::after { content: "D"; }

  /* Player column truncation on mobile */
  #leaderboard-table td:nth-child(2) {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  #leaderboard-headline {
    font-size: 16px;
    padding-top: 20px;
    margin: 20px 0 5px 0;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  border: 0 !important;
}






/* Latest Games table frame + horizontal lines only */
#table-container table {
  border: 1px solid var(--stroke); /* outer frame */
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 50px;
}

#table-container tbody tr {
  border-bottom: 1px solid var(--stroke); /* horizontal lines */
}

#table-container td {
  font-size: 12px; /* match size */
}



