:root{
  --bg: #000000;
  --text: #ffffff;

  --gold: #d7b46a;
  --gold-2: #c9a55c;
  --line: rgba(215,180,106,0.65);
  --muted: rgba(215,180,106,0.85);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter Tight", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* -------------------------
   NAVBAR
-------------------------- */
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 56px 18px;
}

.nav__brand{
  text-decoration: none;
  color: var(--gold);
}

.nav__logo-img{
  height: 42px;
  width: auto;
  display: block;
}

.nav__links{
  display: flex;
  gap: 18px;
}

.nav__link{
  text-decoration: none;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
}

.nav__link--active{
  border-bottom-color: var(--gold);
}

/* -------------------------
   TICKER
-------------------------- */
.ticker{
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ticker__rail{
  overflow: hidden;
  width: 100%;
}

.ticker__track{
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 10px 0;
  white-space: nowrap;
  will-change: transform;

  /* controlled by JS */
  --ticker-shift: 0px;
  animation: tickerMove 15s linear infinite;

  width: max-content;
  transform: translate3d(0,0,0);
}

.ticker__item{
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: 14px;
  text-transform: uppercase;
}

.ticker__item--label{
  color: #fff;
  padding: 10px 22px;
  border-right: 1px solid rgba(255,255,255,0.15);
}

.ticker__item--pill{
  background: var(--gold);
  color: #0b0b0b;
  padding: 10px 14px;
  border-radius: 2px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ticker__item--score{
  color: #fff;
  opacity: 0.95;
}

.ticker__item--sep{
  color: rgba(255,255,255,0.5);
  font-weight: 700;
}

@keyframes tickerMove{
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(calc(-1 * var(--ticker-shift)), 0, 0); }
}

@media (prefers-reduced-motion: reduce){
  .ticker__track{ animation: none; }
}

/* -------------------------
   PAGE WRAP
-------------------------- */
.wrap{
  padding: 38px 56px 60px;
}

/* -------------------------
   TOTY SECTION
-------------------------- */
.toty{
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 30px;
  align-items: center;
}

.toty__copy{ min-width: 0; }

.toty__title-img{
  width: min(740px, 90%);
  height: auto;
  display: block;
  margin-bottom: 22px;
}

.toty__desc{
  max-width: 620px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
  font-size: 16px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.toty__pitch{
  position: relative;
  width: 100%;
  max-width: 720px;
  margin-left: auto;
}

.pitch{
  width: 100%;
  height: auto;
  display: block;
}

.player{
  position: absolute;
  width: 16%;
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
}

.p1{ left: 25%; top: 22%; width: 15%; }
.p2{ left: 50%; top: 18%; width: 15%; }
.p3{ left: 75%; top: 22%; width: 15%; }

.p4{ left: 35%; top: 48%; width: 15%; }
.p5{ left: 50%; top: 56%; width: 15%; }
.p6{ left: 65%; top: 48%; width: 15%; }

.p7{ left: 25%; top: 78%; width: 15%; }
.p8{ left: 50%; top: 84%; width: 15%; }
.p9{ left: 75%; top: 78%; width: 15%; }

/* -------------------------
   SECTION 2: FANTASY
-------------------------- */
.fantasy{
  margin-top: 75px;
}

.fantasy__header{
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.fantasy__logo{
  width: min(820px, 92%);
  height: auto;
  display: block;
}

.fantasy__grid{
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 26px;
  align-items: start;
}

/* ---- TOTW PITCH ---- */
.totw__pitch{
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: #0ea44c;
  min-height: 560px;
  box-shadow: 0 20px 55px rgba(0,0,0,0.55);
}

/* midfield line */
.totw__pitch::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:100%;
  height:2px;
  background: rgba(255,255,255,0.78);
}

/* center circle */
.totw__pitch::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width: 230px;
  height: 230px;
  transform: translate(-50%,-50%);
  border: 2px solid rgba(255,255,255,0.78);
  border-radius: 999px;
}

/* Players */
.totw__player{
  position: absolute;
  transform: translate(-50%, -50%);
  width: 104px;
  text-align: center;
  z-index: 2;
}

.totw__shirt{
  width: 74px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.35));
}

.totw__name{
  margin: 6px auto 5px;
  background: #fff;
  color: #000;
  font-weight: 900;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 6px 9px;
  width: 104px;
  text-transform: uppercase;
  font-size: 11.5px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.totw__pos{
  margin: 0 auto;
  background: #d7d7d7;
  color: #000;
  font-weight: 900;
  letter-spacing: 0.04em;
  border-radius: 12px;
  padding: 5px 10px;
  width: 60px;
  text-transform: uppercase;
  font-size: 11.5px;
  line-height: 1;
}

/* TOTW points badge (top-right of player icon) */
.totw__pts{
  position: absolute;
  top: -6px;
  right: -6px;

  background: var(--gold);
  color: #000;

  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1;

  padding: 6px 10px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 6;
  pointer-events: none;
}

@media (max-width: 560px){
  .totw__pts{
    top: -4px;
    right: -4px;
    font-size: 10px;
    padding: 5px 8px;
  }
}

/* TOTW 3-3-3 positions */
.tw1{ left: 18%; top: 24%; }
.tw2{ left: 50%; top: 18%; }
.tw3{ left: 82%; top: 24%; }

.tw4{ left: 30%; top: 54%; }
.tw5{ left: 50%; top: 54%; }
.tw6{ left: 70%; top: 54%; }

.tw7{ left: 18%; top: 80%; }
.tw8{ left: 50%; top: 86%; }
.tw9{ left: 82%; top: 80%; }

/* -------------------------
   TOTW NAV (independent)
-------------------------- */
.totw__bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom: 12px;
}

.totw__title{
  color: var(--gold);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
}

.totw__mw{
  margin-top: 6px;
  color: rgba(255,255,255,0.65);
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 11px;
}

.totw__nav{
  display:flex;
  gap:10px;
}

.totw__btn{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.totw__btn:hover{
  border-color: rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.50);
}

.totw__btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---- LEADERBOARD ---- */
.fboard{
  border-radius: 22px;
  border: 1px solid rgba(215,180,106,0.35);
  overflow: hidden;
  background:
    radial-gradient(
      900px 360px at 30% 0%,
      rgba(214, 179, 109, 0.35),
      rgba(214, 179, 109, 0) 60%
    );
  box-shadow: 0 20px 55px rgba(0,0,0,0.45);

  height: 615px;
  display: flex;
  flex-direction: column;
}

.fboard__title{
  margin: 0;
  padding: 22px 22px 14px;
  text-align: center;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.fboard__search{
  padding: 0 18px 12px;
}

.fboard__search input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(215,180,106,0.35);
  outline: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-weight: 700;
}

.fboard__list{
  padding: 6px 14px 16px;
  overflow-y: auto;
  flex: 1;
}

.fboard__list::-webkit-scrollbar{ width: 10px; }
.fboard__list::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}
.fboard__list::-webkit-scrollbar-track{ background: rgba(0,0,0,0.25); }

.frow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 16px 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}

.frow:hover{
  background: rgba(255,255,255,0.03);
}

.frow__left{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
}

.frow__avatar{
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(215,180,106,0.25);
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.03em;
  font-size: 12px;
  flex: 0 0 auto;
}

.frow__name{
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.frow__pts{
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.04em;
  min-width: 28px;
  text-align: right;
}

/* -------------------------
   SECTION 3: MATCHWEEK
-------------------------- */
.mw{
  margin-top: 70px;
}

.mw__card{
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.55);
  box-shadow: 0 22px 70px rgba(0,0,0,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 26px 26px 22px;
}

/* warm gold glow on the left */
.mw__card::before{
  content:"";
  position:absolute;
  inset:-40px;
  background:
    radial-gradient(700px 420px at 18% 24%,
      rgba(215,180,106,0.28),
      rgba(215,180,106,0.08) 45%,
      rgba(0,0,0,0) 70%);
  pointer-events:none;
}

.mw__top{
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mw__titlewrap{
  text-align: center;
  padding-left: 44px;
}

.mw__title{
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.10em;
  font-size: 34px;
  text-transform: uppercase;
}

.mw__subtitle{
  margin-top: 6px;
  color: rgba(255,255,255,0.60);
  font-weight: 800;
  letter-spacing: 0.10em;
  font-size: 12px;
  text-transform: uppercase;
}

.mw__nav{
  display: flex;
  gap: 10px;
}

.mw__btn{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mw__btn:hover{
  border-color: rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.50);
}

.mw__btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.mw__rows{
  position: relative;
  padding-top: 18px;
}

.mw__row{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 12px;
}

.mw__row + .mw__row{
  border-top: 1px solid rgba(255,255,255,0.08);
}

.mw__team{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.mw__team--right{
  justify-content: flex-end;
}

.mw__name{
  font-weight: 900;
  letter-spacing: 0.10em;
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(215,180,106,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mw__dot{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  flex: 0 0 auto;
}

.mw__score{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 22px;
  padding: 10px 26px;
  border-radius: 14px;
  min-width: 120px;
  text-align: center;
}

.mw__empty{
  padding: 18px 12px;
  opacity: 0.75;
  font-weight: 700;
}

/* -------------------------
   PLAYER MODAL (REFERENCE LOOK)
-------------------------- */
.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.modal.is-open{ display: block; }

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(1120px, calc(100vw - 48px));
  border-radius: 34px;
  overflow: hidden;

  /* warm gold card like the reference */
  background: linear-gradient(180deg, rgba(223, 190, 120, 0.98), rgba(201, 165, 92, 0.96));
  box-shadow: 0 45px 120px rgba(0,0,0,0.75);

  padding: 34px 34px 28px;
  color: #000;
}

/* subtle inner glow */
.modal__panel::before{
  content:"";
  position:absolute;
  inset:-60px;
  background:
    radial-gradient(900px 520px at 30% 20%,
      rgba(255,255,255,0.18),
      rgba(255,255,255,0.0) 55%);
  pointer-events:none;
}

.modal__close{
  position: absolute;
  right: 22px;
  top: 18px;
  border: 0;
  background: transparent;
  font-size: 38px;
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
  color: #000;
  z-index: 5;
}

/* header row */
.modal__head{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 26px;
  align-items: center;
  margin-bottom: 22px;
}

.modal__avatar{
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: #000;
  display: grid;
  place-items: center;

  color: #d7b46a;
  font-weight: 1000;
  letter-spacing: 0.06em;
  font-size: 62px;
}

.modal__meta{ min-width: 0; }

.modal__title{
  margin: 0 0 10px;
  font-size: clamp(34px, 3.6vw, 62px);
  font-weight: 1000;
  letter-spacing: -0.01em;
  color: #000;
}

.modal__sub{
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 16px;
  opacity: 0.95;
}

/* stats grid */
.modal__stats{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 720px){
  .modal__panel{
    width: calc(100vw - 28px);
    padding: 26px 22px 22px;
    border-radius: 28px;
  }

  .modal__head{
    grid-template-columns: 120px 1fr;
    gap: 18px;
  }

  .modal__avatar{
    width: 120px;
    height: 120px;
    font-size: 50px;
  }

  .modal__stats{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

/* error */
.modal__error{
  padding: 14px;
  font-weight: 900;
}

/* -------------------------
   STAT TILES (match reference)
-------------------------- */
.statcard{
  position: relative;
  overflow: hidden;

  height: 138px;
  border-radius: 26px;

  /* black tile */
  background: #000;
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);

  display: grid;
  place-items: center;
  padding: 18px 14px 46px; /* bottom space for the gold footer strip */
}

/* gold footer strip */
.statcard::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height: 44px;
  background: rgba(215,180,106,0.98);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.20);
}

/* big number */
.statcard__value{
  position: relative;
  z-index: 2;
  color: rgba(215,180,106,0.98);
  font-weight: 1000;
  font-size: clamp(44px, 3.2vw, 66px);
  line-height: 1;
}

/* label sits on the gold footer strip */
.statcard__label{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 3;

  text-align: center;
  color: #000;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 14px;
}

/* slightly tighter on small screens */
@media (max-width: 720px){
  .statcard{
    height: 128px;
    border-radius: 22px;
  }
  .statcard__value{
    font-size: 44px;
  }
  .statcard__label{
    font-size: 12px;
    bottom: 11px;
  }
}

/* -------------------------
   RESPONSIVE
-------------------------- */
@media (max-width: 980px){
  .nav{ padding: 22px 22px 14px; }
  .wrap{ padding: 26px 22px 48px; }

  .toty{ grid-template-columns: 1fr; }
  .toty__pitch{ margin: 10px auto 0; max-width: 760px; }
  .toty__title-img{ width: min(720px, 100%); }

  .fantasy__grid{ grid-template-columns: 1fr; }
  .frow__name{ max-width: 60vw; }

  .fboard{ height: 560px; }
}

@media (max-width: 560px){
  .ticker__track{ gap: 18px; animation-duration: 15s; }
  .ticker__item{ font-size: 13px; }
  .ticker__item--label{ padding: 10px 14px; }
  .nav__link{ font-size: 14px; }

  .totw__pitch{ min-height: 640px; }

  .totw__player{ width: 94px; }
  .totw__shirt{ width: 66px; }
  .totw__name{
    width: 88px;
    font-size: 11px;
    padding: 6px 8px;
  }
  .totw__pos{
    width: 52px;
    font-size: 11px;
    padding: 5px 8px;
  }

  .totw__pitch::after{
    width: 170px;
    height: 170px;
  }

  .tw1{ left: 20%; top: 18%; }
  .tw2{ left: 50%; top: 12%; }
  .tw3{ left: 80%; top: 18%; }

  .tw4{ left: 26%; top: 45%; }
  .tw5{ left: 50%; top: 45%; }
  .tw6{ left: 74%; top: 45%; }

  .tw7{ left: 20%; top: 78%; }
  .tw8{ left: 50%; top: 85%; }
  .tw9{ left: 80%; top: 78%; }

  .fboard{ height: 520px; }
}

/* -------------------------
   MATCHWEEK (mobile nav safe-area + better team names)
-------------------------- */
@media (max-width: 560px){

  .mw__card{
    padding: 18px 16px 16px !important;
  }

  .mw__top{
    position: relative !important;
    padding-right: 56px !important;
  }

  .mw__nav{
    position: absolute !important;
    right: 14px !important;
    top: 22px !important;
    display: flex !important;
    gap: 8px !important;
    margin: 0 !important;
  }

  .mw__btn{
    width: 36px !important;
    height: 36px !important;
    font-size: 20px !important;
  }

  .mw__titlewrap{
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: center !important;
  }

  .mw__title{
    font-size: 28px !important;
    white-space: nowrap !important;
  }

  .mw__md{
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin-bottom: 6px;
  }

  .mw__scorewrap{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .mw__row{
    gap: 10px !important;
    padding: 14px 6px !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  }

  .mw__team{
    gap: 8px !important;
  }

  .mw__dot{
    width: 18px !important;
    height: 18px !important;
  }

  .mw__score{
    min-width: 86px !important;
    padding: 8px 12px !important;
    font-size: 18px !important;
  }

  .mw__name{
    font-size: 11px !important;
    letter-spacing: 0.06em !important;
    white-space: normal !important;

    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.1 !important;
  }

  .mw__team--right .mw__name{
    text-align: right !important;
  }

  .mw__md{
    font-size: 10px;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
  }
}

/* -------------------------
   SECTION 4: CAMPO LEAGUE STATS
-------------------------- */
.ls{
  margin-top: 60px;
}

.ls__heading{
  margin: 0 0 18px;
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 28px;
}

.ls__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;

  max-width: 1180px;
  margin: 0 auto;
}

.ls__card{
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.55);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 18px 18px 10px;
}

.ls__card::before{
  content:"";
  position:absolute;
  inset:-40px;
  background:
    radial-gradient(650px 380px at 18% 20%,
      rgba(215,180,106,0.22),
      rgba(215,180,106,0.06) 45%,
      rgba(0,0,0,0) 70%);
  pointer-events:none;
}

.ls__title{
  position: relative;
  color: rgba(215,180,106,0.95);
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 28px;
  margin-bottom: 10px;
}

.ls__list{
  position: relative;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.ls__list::-webkit-scrollbar{ width: 10px; }
.ls__list::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}
.ls__list::-webkit-scrollbar-track{ background: rgba(0,0,0,0.25); }

@media (max-width: 560px){
  .ls__list{ max-height: 320px; }
}

.ls__row{
  display: grid;
  grid-template-columns: 26px 56px minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 4px;
}

.ls__row + .ls__row{
  border-top: 1px solid rgba(255,255,255,0.08);
}

.ls__rank{
  color: rgba(215,180,106,0.7);
  font-weight: 900;
  font-size: 13px;
  text-align: center;
}

.ls__badge{
  width: 44px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  display: grid;
  place-items: center;
  color: rgba(215,180,106,0.92);
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: 14px;
}

.ls__meta{
  min-width: 0;
}

.ls__name{
  color: rgba(215,180,106,0.92);
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ls__pos{
  margin-top: 3px;
  color: rgba(255,255,255,0.55);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
}

.ls__value{
  color: rgba(215,180,106,0.95);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 0.02em;
}

/* =========================================================
   JOIN COMMUNITY CTA
   ========================================================= */

.community-cta{
  display:flex;
  justify-content:center;
  margin-top: clamp(32px, 6vw, 64px);
  margin-bottom: clamp(32px, 6vw, 64px);
}

.community-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding: 18px 34px;
  border-radius: 999px;

  background: #deb674;
  color: #000;

  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: clamp(13px, 1.4vw, 15px);

  text-decoration: none;
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);

  transition:
    transform .2s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.community-button:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
  filter: brightness(1.05);
}

.community-button:active{
  transform: translateY(0);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

@media (max-width: 1100px){
  .ls__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px){
  .ls__grid{ grid-template-columns: 1fr; }
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer{
  margin-top:clamp(80px, 12vw, 160px);
  padding:clamp(24px, 4vw, 56px) clamp(18px, 3vw, 40px);
  border-top:1px solid rgba(255,255,255,.2);
}

.footer-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  margin-bottom:clamp(36px, 6vw, 72px);
}

.mailing-list a{
  color: #ddb674;
  text-decoration:none;
  font-size:clamp(14px, 1.4vw, 18px);
  letter-spacing:.02em;
  font-weight:700;
}

.mailing-list a:hover{
  text-decoration:underline;
}

.social-icons{
  display:flex;
  gap:18px;
  align-items:center;
}

.social-icons a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
}

.social-icons img{
  width:100%;
  height:auto;
  max-height:100%;
  object-fit:contain;
  opacity:.9;
  transition:opacity .2s ease;
}

.social-icons a:hover img{
  opacity:1;
}

.footer-logo{
  display:flex;
  justify-content:center;
  margin-bottom:clamp(28px, 5vw, 56px);
}

.footer-logo a{
  display:inline-block;
  line-height:0;
}

.footer-logo img{
  width:clamp(120px, 16vw, 220px);
  height:auto;
  display:block;
  cursor:pointer;
  transition:opacity .2s ease;
}

.footer-logo a:hover img{
  opacity:.85;
}

.footer-bottom{
  text-align:center;
  max-width:880px;
  margin:0 auto;
  font-size:clamp(12px, 1.2vw, 14px);
  line-height:1.6;
  color:#ddb674;
}

.footer-bottom p{
  margin:.4em 0;
}

.community-cta + .site-footer{
  margin-top: 0;
}

@media (max-width:700px){
  .footer-top{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }
}

main.wrap + .site-footer{
  margin-top: 0;
}

/* =========================================================
   FORCE MODAL STATS: Desktop = 1 row (4 cols), Mobile = 2x2
   ========================================================= */

#pmStats.modal__stats{
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
}

#pmStats.modal__stats .statcard{
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px){
  #pmStats.modal__stats{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 641px){
  #pmStats.modal__stats .statcard__value{
    font-size: clamp(22px, 2.2vw, 34px);
    line-height: 1.1;
  }
  #pmStats.modal__stats .statcard__label{
    font-size: 12px;
    letter-spacing: .12em;
  }
}

/* -------------------------
   CLICKABLE MW rows (open match modal)
-------------------------- */
.mw__row--clickable{
  cursor: pointer;
  border-radius: 14px;
  transition: transform 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.mw__row--clickable:hover{
  background: rgba(0,0,0,0.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 10px 30px rgba(0,0,0,0.35);
  transform: translateY(-1px);
}

.mw__row--clickable:focus{
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.16), 0 0 0 4px rgba(0,0,0,0.45);
}

.mw__scorewrap{
  display: grid;
  justify-items: center;
  gap: 6px;
}

.mw__md{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

/* =========================================================
   MATCH MODAL (NEW LOOK)
   ========================================================= */

.modal--match{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.modal--match.is-open{
  display: block;
}

.modal--match .modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

/* Panel */
.modal--match .modal__panel--match{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(1060px, calc(100vw - 32px));
  border-radius: 28px;
  overflow: hidden;

  padding: 0;
  background: transparent;
  box-shadow: 0 40px 90px rgba(0,0,0,0.65);

  max-height: calc(100vh - 28px);
}

/* Close button */
.matchmodal__close{
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 20;
  border: 0;
  background: transparent;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  color: #000;
}

/* Scroll container: desktop = no scroll, mobile = scroll inside */
.matchmodal__scroll{
  max-height: calc(100vh - 28px);
  overflow: hidden;
}

/* HEADER (tan) */
.matchmodal__header{
  background: var(--gold);
  padding: 18px 22px 16px;
}

.matchmodal__topline{
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: 14px;
}

.matchmodal__dash{ padding: 0 8px; }

/* 3-column bar */
.matchmodal__bar{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: start;
}

/* Team blocks */
.matchmodal__team{
  display: grid;
  justify-items: center;
  gap: 10px;
}

.matchmodal__teamname{
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 26px;
  text-align: center;
}

/* Dots */
.matchmodal__teamdot{
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.matchmodal__teamdot--home{ background:#000; }
.matchmodal__teamdot--away{ background: var(--gold); }

/* Score pill */
.matchmodal__scorepill{
  background: #000;
  color: var(--gold);
  border-radius: 18px;
  padding: 14px 22px 12px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0,0,0,0.28);
  min-width: 190px;
  justify-self: center;
}

.matchmodal__scorelabel{
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 6px;
}

.matchmodal__scorevalue{
  font-weight: 1000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 40px;
  line-height: 1;
}

/* Legend */
.matchmodal__legend{
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 260px;
}

.legend__item{
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend__item--stack{ align-items: flex-start; }

.legend__ico{
  width: 22px;
  height: 22px;
  color: #000;
  flex: 0 0 auto;
}

.legend__ico--mini{ width: 16px; height: 16px; }

.legend__title{
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.legend__text{ display: grid; gap: 2px; }

.legend__sub{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  opacity: 0.95;
}

/* PITCH */
.matchmodal__pitchwrap{
  background: #0ea44c;
}

.mpitch--ref{
  position: relative;
  height: min(560px, 72vh);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0ea44c;
}

/* split line (desktop vertical) */
.mpitch--ref::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:50%;
  width: 3px;
  background: rgba(255,255,255,0.90);
  transform: translateX(-50%);
  z-index: 2;
}

.mpitch--ref .mpitch__half{ position: relative; z-index: 3; }

/* player icons */
.mp__player{
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 170px;
  z-index: 4;
}

.mp__badge{
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.65);
  box-shadow: 0 14px 26px rgba(0,0,0,0.28);
  display: grid;
  place-items: center;
}

.mp__player--home .mp__badge{ background:#000; }
.mp__player--away .mp__badge{ background: var(--gold); }

.mp__num{
  font-size: 22px;
  font-weight: 1000;
}

.mp__player--home .mp__num{ color: var(--gold); }
.mp__player--away .mp__num{ color: #000; }

.mp__name{
  color: #000;
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 12px;
  text-transform: uppercase;
  text-align: center;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* hide any old chips under players */
.mev{ display: none !important; }

/* MOBILE */
@media (max-width: 720px){
  .matchmodal__scroll{
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .matchmodal__bar{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .matchmodal__teamname{
    font-size: 22px;
  }

  .matchmodal__scorepill{
    width: 72%;
    max-width: 360px;
    min-width: 0;
  }

  .mpitch--ref{
    height: 920px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  /* split line becomes horizontal on mobile */
  .mpitch--ref::after{
    left: 0;
    right: 0;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 3px;
    transform: translateY(-50%);
  }
}
