:root{
  --bg:#ffffff;
  --ink:#1a1a1a;
  --muted:#666;
  --line:#e6e6e6;      /* light grey lines */
  --card:#ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.06);
  --accent:#ee6c2f;    /* subtle orange for hover/active, tweak if you like */
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; background:var(--bg); color:var(--ink); font:16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
img{ max-width:100%; height:auto; display:block; }

.container{ width:100%; max-width:1100px; margin:0 auto; padding:0 16px; }

/* Header */
.site-header{ border-bottom:1px solid var(--line); background:#fff; position:sticky; top:0; z-index:100; }
.header-inner{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; }
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }
.brand-logo{ width:40px; height:40px; object-fit:contain; border:1px solid var(--line); border-radius:6px; padding:4px; background:#fff; }
.brand-name{ font-weight:700; letter-spacing:.2px; }

/* Nav */
.site-nav ul{ display:flex; list-style:none; gap:8px; margin:0; padding:0; }
.site-nav a{
  display:block; padding:10px 12px; border:1px solid transparent; border-radius:8px; text-decoration:none; color:inherit;
}
.site-nav a:hover{ background:#fafafa; border-color:var(--line); }
.site-nav a.active{ border-color:var(--line); background:#fff; box-shadow:var(--shadow); }
.nav-toggle{ display:none; background:none; border:1px solid var(--line); border-radius:8px; padding:8px; cursor:pointer; }
.nav-toggle-bar{ display:block; width:20px; height:2px; background:#333; margin:3px 0; }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* Page layout */
.page{ padding:24px 0 48px; }
.page h1{ margin:0 0 12px; font-size:28px; }
.page .lede{ color:var(--muted); margin:0 0 24px; }

/* Cards / sections */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow);
  padding:16px;
}
.grid{ display:grid; gap:16px; }

.grid.cols-2{
  grid-template-columns: repeat(2, minmax(0,1fr));
}

.grid.cols-3{
  grid-template-columns: repeat(3, minmax(0,1fr));
}

.muted{ color:var(--muted); }

/* Footer */
.site-footer{ border-top:1px solid var(--line); background:#fff; }
.footer-grid{ display:grid; gap:12px; padding:16px 0; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.site-footer a{ color:inherit; text-decoration:none; border-bottom:1px solid transparent; }
.site-footer a:hover{ border-bottom-color:var(--line); }

/* Responsive */
@media (max-width: 900px){

  .grid.cols-2{
    grid-template-columns: 1fr;
  }

  .grid.cols-3{
    grid-template-columns: 1fr;
  }

  .scoreboard{
    font-size: 14px;
  }

}
@media (max-width: 780px){
  .site-nav{ position:absolute; right:16px; top:64px; background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:8px; display:none; }
  .site-nav.open{ display:block; }
  .site-nav ul{ flex-direction:column; }
  .nav-toggle{ display:block; }
}
/* Podium highlighting */

.rank.gold {
  font-weight: bold;
  color: #b08d00;
}

.rank.silver {
  font-weight: bold;
  color: #777;
}

.rank.bronze {
  font-weight: bold;
  color: #a05a2c;
}

/* Optional row highlighting (looks very nice) */

tr.podium-1 {
  background: #fff8dc;
}

tr.podium-2 {
  background: #f3f3f3;
}

tr.podium-3 {
  background: #fff1e6;
}
#historyModal{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;

  background: rgba(0,0,0,0.35);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  z-index:999;
}

/* When modal is open */
#historyModal.show{
  display:flex;
  align-items:center;
  justify-content:center;
}

#historyContent{
  background: rgba(255,255,255,0.92);
  width:600px;
  max-width:90%;
  padding:22px;
  border-radius:12px;

  border:1px solid rgba(255,255,255,0.6);
  box-shadow:0 20px 50px rgba(0,0,0,0.35);
}
/* Shooter name links */

a.shooter-link {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

a.shooter-link:visited {
  color: #000;
}

a.shooter-link:hover {
  color: #000;
  text-decoration: underline;
}
.scoreboard {
    width: 100%;
}

.scoreboard th,
.scoreboard td {
    padding: 6px 8px;
}

.scoreboard th:last-child,
.scoreboard td:last-child {
    text-align: right;
}

/* Shooter column formatting */

.scoreboard td:nth-child(2) {
    white-space: normal;
    line-height: 1.2;
}

.scoreboard td:nth-child(2) a {
    display: block;
    font-weight: 500;
}

/* badges appear on a second line */
.scoreboard td:nth-child(2) .badges {
    display: block;
    font-size: 0.85em;
    opacity: 0.9;
}
.scoreboard td:nth-child(3) {
    white-space: nowrap;
}
.scoreboard th:first-child,
.scoreboard td:first-child{
    width:40px;
    text-align:center;
}
.table{
  width:100%;
}

.table th,
.table td{
  white-space:nowrap;
}
/* ===== Scoreboard Toggle Buttons (modern retro) ===== */

.active-btn {
  background: linear-gradient(145deg, #3fa34d, #2e7d32);
  color: #fff;
  border: 1px solid #1b5e20;
  border-radius: 8px;
  padding: 8px 14px;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 2px 4px rgba(0,0,0,0.25);
  transition: all 0.15s ease;
}

.active-btn:hover {
  background: linear-gradient(145deg, #2e7d32, #1b5e20);
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 3px 6px rgba(0,0,0,0.3);
}

.active-btn:active {
  transform: translateY(1px);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.4);
}


/* Inactive button (red) */

.inactive-btn {
  background: linear-gradient(145deg, #e53935, #c62828);
  color: #fff;
  border: 1px solid #8e0000;
  border-radius: 8px;
  padding: 8px 14px;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 2px 4px rgba(0,0,0,0.25);
  transition: all 0.15s ease;
  opacity: 0.9;
}

.inactive-btn:hover {
  background: linear-gradient(145deg, #c62828, #8e0000);
  opacity: 1;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 3px 6px rgba(0,0,0,0.3);
}

.inactive-btn:active {
  transform: translateY(1px);
  box-shadow: 
    inset 0 2px 4px rgba(0,0,0,0.4);
}