/* ===============================================================
   kotr-central.css — King of the Rink hub
   Mirrors the PSC hub structure (psc-central.css) recoloured to the
   KOTR palette: deep navy + gold (logo colours). Adds a sortable
   career-stats table. Self-contained; classes are kt- prefixed.
=============================================================== */

:root{
  --kt-navy:   #121636;   /* hero / panel navy */
  --kt-navy2:  #1a1e38;   /* table header navy */
  --kt-gold:   #d4a83a;   /* primary accent (good contrast on dark) */
  --kt-gold-d: #c8a000;   /* solid-fill gold */
  --kt-gold-soft: rgba(212,168,58,0.12);
  --kt-gold-line: rgba(212,168,58,0.32);
}

/* ---------- base ---------- */
body{
  margin:0; min-height:100%;
  font-family:'Istok Web', sans-serif;
  background:#27282d; color:#fff;
}
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:none; }
*,*::before,*::after{ box-sizing:border-box; }

/* ---------- hero ---------- */
.hero{ position:relative; background:rgba(18,22,54,0.45); border-bottom:1px solid var(--kt-gold-line); }
.hero-wrap{ position:relative; max-width:1100px; margin:0 auto; padding:26px 20px 22px; text-align:center; }
.hero-back{
  position:absolute; left:20px; top:26px;
  font-family:'Roboto Condensed',sans-serif; font-size:12px; font-weight:700;
  letter-spacing:1px; text-transform:uppercase; color:#d1d5db;
  padding:6px 14px; border-radius:999px;
  border:1px solid rgba(255,255,255,0.10); background:rgba(255,255,255,0.04);
  transition:background .18s ease,color .18s ease;
}
.hero-back:hover{ background:var(--kt-gold-soft); color:var(--kt-gold); }
.hero-logo{ display:block; width:84px; height:84px; object-fit:contain; margin:0 auto 10px; }
.hero-title{
  font-family:'Roboto Condensed',sans-serif; font-weight:700; text-transform:uppercase;
  letter-spacing:1px; font-size:clamp(22px,4vw,34px); margin:0; color:#fff;
}
.hero-title span{ color:var(--kt-gold); }
.hero-meta{ display:block; margin-top:6px; font-size:13px; letter-spacing:1px; color:#9ca3af; }
.hero-divider{ width:60px; height:2px; background:var(--kt-gold); margin:14px auto 0; opacity:.7; }
@media (max-width:600px){
  .hero-back{ position:static; display:inline-block; margin-bottom:12px; left:auto; top:auto; }
  .hero-logo{ width:62px; height:62px; }
}
@media (max-width:560px){
  .hero-wrap{ padding:20px 16px 18px; }
  .hero-title{ font-size:20px; }
  .hero-meta{ font-size:12px; }
}

/* ---------- sub-nav ---------- */
.kt-subnav{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px; max-width:1100px; margin:18px auto 6px; padding:0 16px; }
.kt-subnav-link{
  padding:7px 16px; border-radius:999px;
  font-family:'Roboto Condensed',sans-serif; font-size:12px; font-weight:700;
  letter-spacing:1px; text-transform:uppercase; color:#d1d5db;
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.10);
  transition:background .18s ease,color .18s ease;
}
.kt-subnav-link:hover{ background:var(--kt-gold-soft); color:var(--kt-gold); }
.kt-subnav-link.is-active{ color:var(--kt-gold); background:var(--kt-gold-soft); border-color:var(--kt-gold-line); }

/* ---------- section heading ---------- */
.kt-sectionhead{
  display:flex; align-items:center; justify-content:center; gap:10px;
  max-width:1100px; margin:46px auto 18px; padding:10px 14px;
  font-family:'Roboto Condensed',sans-serif; font-weight:700; letter-spacing:2px;
  text-transform:uppercase; color:var(--kt-gold); border-bottom:1px solid var(--kt-gold-line);
}
.kt-sectionhead .kt-tag{ opacity:.85; font-size:13px; }
.kt-sectionhead .kt-num{
  font-size:14px; padding:4px 12px; border-radius:999px;
  background:var(--kt-gold-soft); border:1px solid var(--kt-gold-line); color:var(--kt-gold);
}

/* ---------- reigning champion spotlight ---------- */
.kt-spot{ max-width:1100px; margin:22px auto 0; padding:0 16px; }
.kt-spot-inner{
  display:flex; align-items:center; gap:26px; padding:22px 26px;
  background:rgba(18,22,54,0.55); border:1px solid var(--kt-gold-line); border-radius:16px;
}
.kt-spot-media{ flex-shrink:0; }
.kt-crown-kicker{
  display:flex; align-items:center; gap:8px;
  font-family:'Roboto Condensed',sans-serif; font-size:12px; font-weight:800;
  letter-spacing:2.5px; text-transform:uppercase; color:var(--kt-gold);
}
.kt-crown-kicker svg{ width:18px; height:18px; fill:none; stroke:var(--kt-gold); stroke-width:1.7; stroke-linejoin:round; }
.kt-spot-body{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.kt-spot-name, .kt-spot-name a{
  font-family:'Roboto Condensed',sans-serif; font-size:clamp(24px,3.4vw,34px); font-weight:700;
  text-transform:uppercase; letter-spacing:1px; color:#fff; line-height:1.1;
}
.kt-spot-name a:hover{ color:var(--kt-gold); }
.kt-spot-meta{ font-size:13px; color:#9ca3af; letter-spacing:.4px; }
.kt-spot-cta{
  align-self:flex-start; margin-top:8px; padding:8px 18px; border-radius:999px;
  font-family:'Roboto Condensed',sans-serif; font-size:12px; font-weight:700;
  letter-spacing:1px; text-transform:uppercase; color:#1a1a1a; background:var(--kt-gold);
  border:1px solid var(--kt-gold); transition:background .18s ease;
}
.kt-spot-cta:hover{ background:#e7c463; }
@media (max-width:560px){
  .kt-spot-inner{ flex-direction:column; text-align:center; padding:18px; }
  .kt-spot-body{ align-items:center; }
  .kt-spot-cta{ align-self:center; }
}

/* ---------- team-colour disc ---------- */
.kt-disc{
  width:96px; height:96px; border-radius:50%; border:3px solid;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden;
}
.kt-disc img{ width:64%; height:64%; object-fit:contain; }
.kt-disc-x{ background:#2a2e44; border-color:rgba(255,255,255,0.18); }
.kt-spot-disc{ width:140px; height:140px; }

/* ---------- at-a-glance ---------- */
.kt-glance{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px;
  max-width:1100px; margin:14px auto 0; padding:0 16px;
}
.kt-glance-card{
  display:flex; flex-direction:column; gap:2px; padding:14px 16px;
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.10); border-radius:12px; text-align:center;
}
.kt-glance-label{ font-family:'Roboto Condensed',sans-serif; font-size:11px; font-weight:700; letter-spacing:1.6px; text-transform:uppercase; color:#9ca3af; }
.kt-glance-value{ font-family:'Roboto Condensed',sans-serif; font-size:40px; font-weight:800; color:var(--kt-gold); line-height:1; letter-spacing:-0.5px; font-variant-numeric:tabular-nums; margin:2px 0; }
.kt-glance-name{ font-family:'Roboto Condensed',sans-serif; font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:#fff; }

/* ---------- champions wall ---------- */
.kt-champwall{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; max-width:1100px; margin:0 auto; padding:0 16px; }
.kt-champcard{
  display:flex; flex-direction:column; align-items:center; gap:3px; padding:12px 10px 14px;
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.10); border-radius:12px;
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}
a.kt-champcard:hover{ transform:translateY(-3px); border-color:var(--kt-gold-line); background:var(--kt-gold-soft); }
.kt-champcard-media{ width:100%; display:flex; align-items:center; justify-content:center; margin:4px 0 10px; }
.kt-champcard .kt-disc{ width:74px; height:74px; }
.kt-champcard-year{ font-family:'Roboto Condensed',sans-serif; font-size:11px; font-weight:700; letter-spacing:1.6px; text-transform:uppercase; color:var(--kt-gold); opacity:.85; }
.kt-champcard-name{ font-family:'Roboto Condensed',sans-serif; font-size:15px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:#fff; text-align:center; line-height:1.15; }
.kt-champcard-team{ font-size:11px; color:#9ca3af; letter-spacing:.4px; text-align:center; }
@media (max-width:560px){ .kt-champwall{ grid-template-columns:repeat(2,1fr); } }

/* ---------- sortable career stats table ---------- */
.kt-stats-wrap{ max-width:1100px; margin:0 auto; padding:0 16px; overflow-x:auto; }
.kt-stats-note{ max-width:1100px; margin:0 auto 12px; padding:0 16px; font-size:12px; color:#9ca3af; text-align:center; letter-spacing:.3px; }
.kt-stats{ width:100%; border-collapse:separate; border-spacing:0 6px; font-family:'Roboto Condensed',sans-serif; min-width:760px; }
.kt-stats thead th{
  position:sticky; top:0; z-index:2;
  background:var(--kt-navy2); color:#fff;
  font-size:11px; font-weight:700; letter-spacing:.5px; text-transform:uppercase;
  padding:10px 8px; text-align:center; white-space:nowrap; cursor:pointer; user-select:none;
  border-bottom:2px solid var(--kt-gold-d);
}
.kt-stats thead th.l{ text-align:left; }
.kt-stats thead th:first-child{ border-radius:8px 0 0 0; cursor:default; }
.kt-stats thead th:last-child{ border-radius:0 8px 0 0; }
.kt-stats thead th .kt-arrow{ color:var(--kt-gold); margin-left:3px; font-size:10px; opacity:0; }
.kt-stats thead th.sort-asc .kt-arrow,
.kt-stats thead th.sort-desc .kt-arrow{ opacity:1; }
.kt-stats thead th.sort-asc .kt-arrow::after{ content:'\25B2'; }
.kt-stats thead th.sort-desc .kt-arrow::after{ content:'\25BC'; }
.kt-stats thead th:hover{ color:var(--kt-gold); }
.kt-stats tbody td{ background:rgba(255,255,255,0.04); padding:8px; text-align:center; font-size:13px; border-top:1px solid rgba(255,255,255,0.04); border-bottom:1px solid rgba(255,255,255,0.04); }
.kt-stats tbody tr:hover td{ background:var(--kt-gold-soft); }
.kt-stats tbody td.l{ text-align:left; }
.kt-stats td:first-child{ border-radius:999px 0 0 999px; color:#9aa0b4; font-weight:700; width:34px; }
.kt-stats td:last-child{ border-radius:0 999px 999px 0; }
.kt-rk{ color:#9aa0b4; font-weight:700; }
.kt-player{ display:flex; align-items:center; gap:9px; min-width:0; }
.kt-player .kt-tlogo{ width:20px; height:20px; object-fit:contain; flex-shrink:0; }
.kt-player .kt-name{ font-weight:700; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kt-player .kt-name a{ color:#fff; }
.kt-player .kt-name a:hover{ color:var(--kt-gold); }
.kt-pts{ font-weight:800; color:var(--kt-gold); }
.kt-badge{ display:inline-block; min-width:22px; padding:2px 8px; border-radius:999px; background:var(--kt-gold-d); color:#1a1a1a; font-weight:800; font-size:12px; }
.kt-badge.z{ background:rgba(255,255,255,0.08); color:#6b7280; }
.kt-pos{ color:#7fd49a; } .kt-neg{ color:#e07a7a; }
.kt-finish{ color:#cdd0db; font-weight:600; white-space:nowrap; }

/* hide the breakdown columns on small screens (keep ranking + headline) */
@media (max-width:820px){
  .kt-stats .col-opt{ display:none; }
  .kt-stats{ min-width:0; }
}

/* ---------- season directory ---------- */
.kt-directory{ max-width:1100px; margin:26px auto 10px; padding:0 16px; }
.kt-directory-inner{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; padding:14px 18px; background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06); border-radius:16px; }
.kt-directory-link{
  display:inline-flex; align-items:center; justify-content:center; padding:8px 16px; border-radius:999px;
  font-family:'Roboto Condensed',sans-serif; font-size:13px; font-weight:700; letter-spacing:.6px; text-transform:uppercase;
  color:var(--kt-gold); background:var(--kt-gold-soft); border:1px solid var(--kt-gold-line);
  transition:background .18s ease,transform .18s ease,box-shadow .18s ease;
}
.kt-directory-link:hover{ transform:translateY(-2px); background:rgba(212,168,58,0.20); box-shadow:0 4px 14px rgba(0,0,0,0.35); }

/* ---------- season switcher (kotr.php) ---------- */
.kt-seasonbar{ display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:7px; max-width:1100px; margin:18px auto 6px; padding:0 16px; }
.kt-spill{
  padding:7px 14px; border-radius:999px; font-family:'Roboto Condensed',sans-serif; font-size:12px; font-weight:700;
  letter-spacing:.5px; color:#d1d5db; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.10);
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.kt-spill:hover{ background:var(--kt-gold-soft); color:var(--kt-gold); transform:translateY(-1px); }
.kt-spill.on{ color:#1a1a1a; background:var(--kt-gold); border-color:var(--kt-gold); }
.kt-spill.kt-spill-hub{ color:var(--kt-gold); background:transparent; border-color:var(--kt-gold-line); }
.kt-spill.kt-spill-hub:hover{ background:var(--kt-gold-soft); }

/* ---------- per-season round-by-round detail (dark) ---------- */
.kt-rounds{ max-width:1100px; margin:10px auto 50px; padding:0 16px; }
.kt-rnd{ margin:12px 0; border:1px solid rgba(255,255,255,0.10); border-radius:12px; overflow:hidden; background:rgba(255,255,255,0.03); }
.kt-rnd>summary{ list-style:none; cursor:pointer; padding:13px 18px; display:flex; align-items:baseline; gap:12px; background:rgba(18,22,54,0.45); }
.kt-rnd>summary::-webkit-details-marker{ display:none; }
.kt-rnd[open]>summary{ border-bottom:1px solid var(--kt-gold-line); }
.kt-rnd-n{ font-family:'Roboto Condensed',sans-serif; font-size:14px; font-weight:800; color:var(--kt-gold); letter-spacing:.6px; text-transform:uppercase; }
.kt-rnd-meta{ font-size:11px; font-weight:700; color:#9ca3af; text-transform:uppercase; letter-spacing:.5px; }
.kt-groups{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; padding:14px; }
.kt-grp{ border:1px solid rgba(255,255,255,0.08); border-radius:10px; overflow:hidden; background:rgba(255,255,255,0.02); }
.kt-grp-h{ background:var(--kt-navy2); color:#fff; font-family:'Roboto Condensed',sans-serif; font-size:11px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; padding:7px 11px; }
.kt-tbl{ width:100%; border-collapse:collapse; font-family:'Roboto Condensed',sans-serif; font-size:12px; }
.kt-tbl th{ font-size:9px; text-transform:uppercase; letter-spacing:.4px; color:#9ca3af; font-weight:700; padding:6px 4px; text-align:center; border-bottom:1px solid rgba(255,255,255,0.08); }
.kt-tbl td{ padding:5px 4px; text-align:center; border-bottom:1px solid rgba(255,255,255,0.05); color:#e5e7eb; }
.kt-tbl th.l,.kt-tbl td.l{ text-align:left; }
.kt-tbl tr:last-child td{ border-bottom:none; }
.kt-tbl .kt-rk{ color:#9aa0b4; font-weight:700; width:18px; }
.kt-tbl .kt-nm{ font-weight:600; max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kt-tbl .kt-nm a{ color:#fff; }
.kt-tbl .kt-nm a:hover{ color:var(--kt-gold); }
.kt-tbl .kt-pts{ font-weight:800; color:var(--kt-gold); }
.kt-tbl td.pos{ color:#7fd49a; } .kt-tbl td.neg{ color:#e07a7a; }
.kt-tbl .kt-rdisc{ display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; border-radius:50%; border:2px solid; overflow:hidden; vertical-align:middle; }
.kt-tbl .kt-rdisc img{ width:72%; height:72%; object-fit:contain; }
.kt-adv td{ background:var(--kt-gold-soft); }
.kt-adv .kt-nm{ font-weight:800; }
.kt-chk{ color:var(--kt-gold); font-size:9px; }
@media (max-width:560px){ .kt-groups{ grid-template-columns:1fr; } }

/* ---------- back to top ---------- */
.kt-backtotop{
  position:fixed; right:24px; bottom:28px; width:46px; height:46px; border-radius:50%;
  border:1px solid var(--kt-gold-line); background:rgba(18,22,54,0.65);
  color:var(--kt-gold); font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .25s ease,transform .25s ease,background .2s ease,box-shadow .2s ease;
}
.kt-backtotop svg{ width:22px; height:22px; fill:none; stroke:var(--kt-gold); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.kt-backtotop.show{ opacity:1; visibility:visible; transform:translateY(0); }
.kt-backtotop:hover{ background:rgba(212,168,58,0.20); box-shadow:0 6px 16px rgba(0,0,0,0.35); transform:translateY(-3px); }
@media (max-width:560px){ .kt-backtotop{ right:16px; bottom:18px; width:42px; height:42px; } }
