/* Shared ranking-page styles -- extracted verbatim from site/index.html
   (boys soccer's page) so every sport page looks consistent without
   duplicating ~400 lines of CSS per page. Visual rules only, no
   behavior/logic lives here. */
:root{
  --bg:#08080b;
  --panel:#111116;
  --panel-2:#16161d;
  --card:#141419;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.16);
  --white:#f5f5f7;
  --muted:#8b8b96;
  --muted-2:#5f5f6c;
  --purple:#4A2A82;
  --purple-dim:#2E1A54;
  --purple-glow: rgba(74,42,130,.35);
  --gold:#C9A227;
  --gold-dim:#A9881F;
  --green:#34d399;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(74,42,130,.12), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(201,162,39,.07), transparent 55%),
    var(--bg);
  color:var(--white);
  font-family:'Inter',system-ui,sans-serif;
  min-height:100vh;
}
::selection{background:var(--purple); color:#fff;}
a{color:inherit; text-decoration:none;}
button{font-family:inherit;}

/* ---------- Top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 28px;
  background:rgba(10,10,14,.82);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.brand{display:flex; align-items:center; gap:12px; cursor:pointer; user-select:none;}
.brand .badge{
  width:46px;height:46px;border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  background:transparent;
}
.brand .badge img{width:100%; height:100%; object-fit:contain;}
.brand .wordmark{
  font-family:'Poppins',sans-serif; font-weight:700; font-size:20px;
}
.brand .wordmark .p1{color:var(--purple);}
.brand .wordmark .p2{color:var(--gold);}
.brand .wordmark .p3{color:var(--white);}
.topbar-right{display:flex; align-items:center; gap:10px;}
.btn-add{
  display:flex; align-items:center; gap:6px;
  background:var(--gold); color:#221800;
  border:none; border-radius:10px;
  padding:12px 18px;
  font-family:'Poppins',sans-serif; font-weight:600; font-size:14px;
  cursor:pointer; white-space:nowrap;
  transition:transform .1s ease, background .15s ease;
}
.btn-add:hover{background:#ffe07a;}
.btn-add:active{transform:scale(.97);}
@media (max-width:640px){
  .topbar{padding:14px 16px; flex-wrap:wrap; row-gap:8px;}
  .brand .badge{width:40px;height:40px;}
  .brand .wordmark{font-size:17px;}
  .auto-badge{padding:6px 10px !important; font-size:11px !important;}
  .tabs{flex-wrap:wrap; gap:6px;}
  .tab{padding:8px 14px; font-size:12px;}
  .rk-hero{padding:34px 16px 0;}
  .stat-row{gap:26px; padding:26px 16px 22px;}
  .table-wrap{padding:0 12px 20px;}
  thead th{padding:0 6px 10px; font-size:9.5px;}
  tbody td{padding:11px 6px; font-size:13px;}
  .logo-tile{width:26px;height:26px;font-size:9.5px;}
  .teamcell{gap:8px;}
  td.teamname{font-size:13px;}
}
@media (max-width:560px){
  /* Keep Rank / Team / Rating visible; drop the Offense & Defense
     sub-columns (still reachable via the Offense/Defense tabs, which
     only ever render 3 columns so this rule has no effect there). */
  #tableHead th:nth-child(4), #tableHead th:nth-child(5),
  #rankBody td:nth-child(4), #rankBody td:nth-child(5){
    display:none;
  }
}
@media (max-width:420px){
  .brand .badge{width:36px;height:36px;}
  .brand .wordmark{font-size:15px;}
  .auto-badge span{display:inline;}
  h2.rk-title{font-size:24px;}
  .stat .val{font-size:21px;}
  .soon-grid{grid-template-columns:1fr;}
}
html, body{overflow-x:hidden;}

/* ---------- Views ---------- */
.view{display:none;}
.view.active{display:block;}

/* ---------- Home / landing ---------- */
.home-hero{
  max-width:640px; margin:0 auto;
  padding:90px 24px 40px;
  text-align:center;
}
.home-badge{
  width:120px;height:135px; margin:0 auto 30px;
  display:flex; align-items:center; justify-content:center;
  filter:drop-shadow(0 20px 40px rgba(74,42,130,.35));
}
.home-badge img{width:100%; height:100%; object-fit:contain;}
h1.home-title{
  font-family:'Poppins',sans-serif; font-weight:800;
  font-size:clamp(32px,6vw,44px);
  line-height:1.15;
  margin:0 0 14px;
}
h1.home-title .l1{display:block;}
h1.home-title .l2{display:block; color:var(--white);}
h1.home-title .c1{color:var(--purple);}
h1.home-title .c2{color:var(--gold);}
.home-hero p.sub{
  color:var(--muted); font-size:15px; line-height:1.6; margin:0 auto;
  max-width:440px;
}
.divider{
  width:64px; height:3px; margin:34px auto;
  border-radius:2px;
  background:linear-gradient(90deg,var(--purple),var(--gold));
}
.section-label{
  max-width:720px; margin:0 auto; padding:0 24px;
  font-family:'Poppins',sans-serif; font-weight:600; font-size:11px;
  letter-spacing:.14em; text-transform:uppercase; color:var(--muted-2);
  margin-bottom:12px;
}
.sport-pill{
  max-width:560px; margin:0 auto 30px; padding:0 24px;
}
.sport-pill-inner{
  display:flex; align-items:center; gap:16px;
  border:1px solid var(--purple-dim);
  background:linear-gradient(180deg, rgba(74,42,130,.12), rgba(74,42,130,.04));
  border-radius:14px;
  padding:16px 18px;
  cursor:pointer;
  transition:box-shadow .2s ease, transform .1s ease;
}
.sport-pill-inner:hover{box-shadow:0 0 0 1px var(--purple-glow), 0 12px 30px rgba(74,42,130,.18); transform:translateY(-1px);}
.sport-icon{
  width:42px;height:42px;border-radius:10px;
  background:var(--panel-2);
  display:flex; align-items:center; justify-content:center;
  font-size:19px; flex:none;
}
.sport-pill-inner .meta{flex:1; text-align:left;}
.sport-pill-inner .eyebrow2{
  font-family:'Poppins',sans-serif; font-weight:600; font-size:10.5px;
  letter-spacing:.1em; text-transform:uppercase; color:var(--purple);
  margin-bottom:2px;
}
.sport-pill-inner .title2{font-family:'Poppins',sans-serif; font-weight:600; font-size:16px; color:var(--white);}
.sport-pill-inner .chev{color:var(--purple); font-size:18px;}

.soon-grid{
  max-width:720px; margin:0 auto; padding:0 24px;
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
.soon-card{
  display:flex; align-items:center; gap:12px;
  border:1px solid var(--line);
  border-radius:12px; padding:13px 14px;
  opacity:.5;
}
.soon-card .sport-icon{width:34px;height:34px; font-size:15px;}
.soon-card .title2{font-size:13.5px; font-weight:500; color:var(--muted);}
.soon-tag{
  margin-left:auto;
  font-family:'Poppins',sans-serif; font-weight:600; font-size:9px; letter-spacing:.08em;
  color:var(--muted-2); background:rgba(255,255,255,.05);
  padding:3px 7px; border-radius:5px;
}
.live-grid{
  max-width:720px; margin:0 auto 30px; padding:0 24px;
  display:grid; grid-template-columns:1fr 1fr; gap:12px;
}
.live-card{
  display:flex; align-items:center; gap:12px;
  border:1px solid var(--line-strong);
  border-radius:12px; padding:13px 14px;
  cursor:pointer;
  transition:box-shadow .2s ease, transform .1s ease, border-color .15s ease;
}
.live-card:hover{border-color:var(--purple); box-shadow:0 0 0 1px var(--purple-glow); transform:translateY(-1px);}
.live-card .sport-icon{width:34px;height:34px; font-size:15px;}
.live-card .title2{font-size:13.5px; font-weight:600; color:var(--white);}
@media (max-width:480px){
  .live-grid{grid-template-columns:1fr;}
}
.home-footer{
  text-align:center; color:var(--muted); font-size:15px; font-weight:600;
  padding:50px 24px 46px; border-top:1px solid var(--line); margin-top:50px;
}
.home-footer a:hover{color:var(--gold);}

/* ---------- Rankings view ---------- */
.rk-hero{max-width:720px; margin:0 auto; padding:52px 24px 0; text-align:center;}
.season-chip{
  display:inline-flex; align-items:center; gap:7px;
  border:1px solid var(--line-strong);
  border-radius:20px; padding:6px 14px;
  font-family:'Poppins',sans-serif; font-weight:500; font-size:11px;
  letter-spacing:.06em; text-transform:uppercase; color:var(--muted);
  margin-bottom:22px;
}
.season-chip .dot{width:6px;height:6px;border-radius:50%; background:var(--gold);}
h2.rk-title{
  font-family:'Poppins',sans-serif; font-weight:800;
  font-size:clamp(28px,5vw,38px); margin:0 0 12px;
}
h2.rk-title .w{color:var(--white);}
h2.rk-title .g{color:var(--gold);}
h2.rk-title .p{color:var(--purple);}
.rk-hero p.sub{color:var(--muted); font-size:14.5px; line-height:1.6; max-width:480px; margin:0 auto;}

.stat-row{
  display:flex; justify-content:center; gap:44px;
  padding:36px 24px 30px; flex-wrap:wrap;
}
.stat{text-align:center;}
.stat .val{
  font-family:'Poppins',sans-serif; font-weight:700; font-size:26px;
  background:linear-gradient(90deg,var(--purple),var(--gold));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.stat .lbl{
  font-size:10px; letter-spacing:.09em; text-transform:uppercase; color:var(--muted-2);
  margin-top:4px; font-weight:600;
}

.tabs{
  display:flex; justify-content:center; gap:8px;
  padding:0 24px 26px;
}
.tab{
  border:1px solid var(--line-strong);
  background:transparent; color:var(--muted);
  border-radius:20px; padding:9px 20px;
  font-family:'Poppins',sans-serif; font-weight:600; font-size:12.5px;
  cursor:pointer; transition:all .15s ease;
}
.tab.active{
  background:var(--purple); border-color:var(--purple); color:#fff;
}
.tab:not(.active):hover{border-color:var(--muted); color:var(--white);}

.table-wrap{max-width:960px; margin:0 auto; padding:0 24px 20px;}
table{width:100%; border-collapse:collapse;}
thead th{
  text-align:left;
  font-size:10.5px; letter-spacing:.07em; text-transform:uppercase;
  color:var(--muted-2); font-weight:600;
  padding:0 10px 12px;
  border-bottom:1px solid var(--line-strong);
  cursor:pointer;
  white-space:nowrap;
}
thead th.num{text-align:right;}
thead th:hover{color:var(--muted);}
thead th .arrow{font-size:9px; margin-left:3px; opacity:.7;}
tbody td{
  padding:14px 10px;
  border-bottom:1px solid var(--line);
  font-size:14px;
  vertical-align:middle;
}
tbody tr{transition:background .12s ease;}
tbody tr:hover{background:rgba(255,255,255,.025);}
tbody tr.flash{animation:flash 1.8s ease-out;}
@keyframes flash{ 0%{background:rgba(201,162,39,.18);} 100%{background:transparent;} }
td.rank{font-weight:700; font-size:14px; width:34px;}
td.rank.gold{color:var(--gold);}
td.rank.purple{color:var(--purple);}
td.rank.gray{color:var(--muted-2);}
.teamcell{display:flex; align-items:center; gap:12px;}
.logo-tile{
  width:32px;height:32px;border-radius:8px;
  background:#f2f0e9;
  display:flex; align-items:center; justify-content:center;
  font-family:'Poppins',sans-serif; font-weight:700; font-size:11px;
  flex:none;
}
td.teamname{font-weight:500; color:var(--white);}
td.num{text-align:right; font-variant-numeric:tabular-nums; font-weight:600;}
td.num.gold{color:var(--gold);}
td.num.green{color:var(--green);}
td.num.purple{color:var(--purple);}

.empty-row td{text-align:center; padding:40px 10px; color:var(--muted);}

.pagination{
  display:flex; justify-content:center; align-items:center; gap:6px;
  padding:26px 24px 10px; flex-wrap:wrap;
}
.pg-btn{
  border:1px solid var(--line-strong); background:transparent; color:var(--muted);
  border-radius:8px; padding:8px 13px; font-size:12.5px; font-weight:500; cursor:pointer;
  font-family:'Inter',sans-serif;
}
.pg-btn:hover:not(:disabled){border-color:var(--muted); color:var(--white);}
.pg-btn.active{background:var(--purple); border-color:var(--purple); color:#fff;}
.pg-btn:disabled{opacity:.35; cursor:not-allowed;}
.pg-ellipsis{color:var(--muted-2); font-size:12.5px; padding:0 2px;}

.rk-footer{
  text-align:center; color:var(--muted); font-size:15px; font-weight:600;
  padding:40px 24px 64px; border-top:1px solid var(--line); margin-top:20px;
}
.rk-footer a:hover{color:var(--gold);}

.recent-results{max-width:820px;margin:14px auto 0;display:flex;flex-direction:column;gap:8px;}
.rr-row{display:flex;justify-content:space-between;align-items:center;gap:16px;
  padding:12px 16px;background:var(--panel);border:1px solid rgba(255,255,255,.06);
  border-radius:10px;font-size:13.5px;}
.rr-date{color:var(--gold-dim);font-weight:600;white-space:nowrap;}
.rr-teams{color:#e8e8ee;text-align:right;flex:1;margin-left:16px;}
.rr-score{display:inline-block;min-width:20px;text-align:center;font-weight:700;color:var(--purple);}
.rr-empty{text-align:center;color:#888;font-size:13.5px;padding:18px 0;}
