:root {
  --bg: #f5f5f7;
  --surface: #f2f5f9;
  --surface-light: #f8fafc;
  --surface-hover: #ffffff;
  --border: #cbd5e1;
  --border-light: #b8c3d1;
  --accent: #00e676;
  --accent-dim: rgba(0,230,118,0.12);
  --teal: #64ffda;
  --purple: #7c5fe6;
  --shame: #ff6b6b;
  --shame-dim: rgba(255,107,107,0.1);
  --gold: #ffd740;
  --gold-dim: rgba(255,215,64,0.1);
  --silver: #b8c4d8;
  --bronze: #e8903a;
  --text: #111827;
  --text-muted: #475467;
  --muted: #667085;
  --mono: 'JetBrains Mono', monospace;
  --display: 'Bebas Neue', sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --fpl-cyan: var(--teal);
  --sticky-top: 0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  min-height: 100vh;
  padding: 32px 20px 80px;
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -5%, rgba(124,95,230,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 95% 95%, rgba(0,230,118,0.09) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(100,116,139,0.12) 47px, rgba(100,116,139,0.12) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 47px, rgba(100,116,139,0.08) 47px, rgba(100,116,139,0.08) 48px);
}

.container { width: 100%; max-width: 920px; margin: 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.header {
  display: grid; grid-template-columns: 1fr; justify-content: center; align-items: center;
  column-gap: 18px; row-gap: 6px; text-align: center;
  margin-bottom: 18px; animation: fadeDown 0.7s ease both;
}

.fpl-link {
  display: inline-flex; align-items: center; gap: 8px;
  grid-column: 2; grid-row: 3; justify-self: start;
  margin: 0; padding: 4px 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--teal); text-decoration: none;
  border: 1px solid rgba(100,255,218,0.2); border-radius: 24px;
  background: rgba(100,255,218,0.04); transition: border-color 0.2s, background 0.2s;
}
.fpl-link:hover { border-color: var(--teal); background: rgba(100,255,218,0.08); }
.fpl-link img { width: 16px; height: 16px; object-fit: contain; }

.league-tag {
  grid-column: 1; grid-row: 2; justify-self: end;
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; color: var(--teal); text-transform: uppercase;
  border: 1px solid rgba(100,255,218,0.18); padding: 4px 15px; border-radius: 24px;
  margin: 0; background: rgba(100,255,218,0.04);
}

.title {
  grid-column: 1 / -1; grid-row: 1; justify-self: center;
  font-family: var(--display); font-size: clamp(40px, 8vw, 58px);
  letter-spacing: 0.03em; line-height: 0.93;
  background: linear-gradient(140deg, #111827 0%, #0284c7 48%, #7c3aed 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin: 0;
}

.subtitle {
  grid-column: 1; grid-row: 2; justify-self: center;
  margin: 0; font-size: 11px; line-height: 1.35;
  color: var(--text-muted); letter-spacing: 0.04em;
}

.site-footer {
  padding-top: 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.footer-slogan {
  font-family: var(--display); font-size: clamp(18px, 2.5vw, 23px);
  font-weight: 400; line-height: 1; color: var(--gold);
  letter-spacing: 0.12em; text-transform: uppercase;
  text-shadow: 0 0 40px rgba(255,215,64,0.35), 0 0 80px rgba(255,215,64,0.15);
}
.site-footer .fpl-link {
  display: inline-flex; margin: 0; padding: 6px 14px;
}

.stats-bar {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px;
  margin-bottom: 28px; animation: fadeUp 0.6s 0.15s ease both;
}

.stat {
  --stat-color: var(--accent);
  --stat-color-2: var(--teal);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.18), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.035)),
    rgba(20,28,42,0.48);
  border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius-lg); padding: 18px 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(255,255,255,0.06),
    0 18px 42px rgba(0,0,0,0.26);
  backdrop-filter: blur(20px) saturate(1.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.72), var(--stat-color), var(--stat-color-2));
  box-shadow: 0 0 22px rgba(100,255,218,0.4);
}
.stat::after {
  content: ''; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,0.16), transparent 42%);
  opacity: 0.55;
}
.stat:hover {
  transform: translateY(-2px); border-color: rgba(255,255,255,0.3);
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.24), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05)),
    rgba(24,34,50,0.54);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    0 22px 50px rgba(0,0,0,0.3);
}
.stat > * { position: relative; z-index: 1; }
.stat-val {
  font-family: var(--display); font-size: clamp(26px, 6vw, 34px);
  background: linear-gradient(135deg, var(--stat-color), var(--stat-color-2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.stat:nth-child(1) { --stat-color: #38bdf8; --stat-color-2: var(--teal); }
.stat:nth-child(2) { --stat-color: var(--gold); --stat-color-2: var(--bronze); }
.stat:nth-child(3) { --stat-color: var(--accent); --stat-color-2: var(--teal); }
.stat:nth-child(4) { --stat-color: var(--shame); --stat-color-2: var(--bronze); }
.stat:nth-child(5) { --stat-color: #c084fc; --stat-color-2: var(--purple); }
.stat:nth-child(6) { --stat-color: #93c5fd; --stat-color-2: #38bdf8; }
.stat:nth-child(-n+5) .stat-val {
  background: none; color: #111827;
  -webkit-text-fill-color: #111827;
}
.stat:nth-child(5) .stat-val,
.stat:nth-child(6) .stat-val { font-size: clamp(20px, 2.4vw, 27px); white-space: nowrap; }
.stat-old-guards { padding: 10px 8px; }
.old-guards-list {
  width: auto; display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 12px;
  justify-content: center;
  font-family: var(--display); font-size: 14px; line-height: 1;
}
.old-guard-item {
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.old-guard-rank { color: var(--muted); }
.old-guard-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.old-guard-seasons { color: #38bdf8; font-weight: 700; }
.stat-old-guards .stat-lbl { margin-top: 4px; }
.stat-lbl {
  font-family: var(--mono); font-size: 9px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.12em; margin-top: 5px;
}

/* Sticky filters */
.filter-sticky-wrap {
  position: sticky; top: var(--sticky-top); z-index: 100;
  padding: 12px 0; margin-bottom: 20px;
  background: transparent; backdrop-filter: none;
  border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.filter-sticky-wrap.is-stuck { border-bottom-color: var(--border); }

.filter-bar { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.filter-btn {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  padding: 8px 20px; border-radius: 24px; cursor: pointer;

  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  transition: all 0.15s ease;
}
.filter-btn:hover { border-color: rgba(0,230,118,0.35); color: var(--text); }
.filter-btn.active {
  border-color: var(--accent); color: var(--accent);
  background: rgba(0,230,118,0.08);
  box-shadow: 0 0 18px rgba(0,230,118,0.12);
}

/* Podium */
.podium-section { margin-bottom: 28px; animation: fadeUp 0.6s 0.25s ease both; }
.podium-section .section-header { justify-content: center; margin-bottom: 12px; }
.podium-section .section-line { display: none; }
.podium-capture { padding: 0 24px; }
.podium {
  display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end;
}
.podium-card {
  background: var(--surface-light);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 12px;
  min-height: 164px;
  text-align: center; position: relative; transition: transform 0.2s;
}
.podium-card.place-1 { order: 2; min-height: 190px; padding-top: 28px; border-color: rgba(255,215,64,0.35); box-shadow: 0 0 30px rgba(255,215,64,0.08); }
.podium-card.place-2 { order: 1; }
.podium-card.place-3 { order: 3; }
.podium-card:hover { transform: translateY(-3px); }
.podium-medal { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.podium-card.place-1 .podium-medal { font-size: 40px; }
.podium-name { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.podium-titles {
  font-family: var(--display); font-size: 30px; line-height: 1;
}
.podium-card.place-1 .podium-titles { color: var(--gold); font-size: 38px; }
.podium-card.place-2 .podium-titles { color: var(--silver); }
.podium-card.place-3 .podium-titles { color: var(--bronze); }
.podium-lbl {

  font-family: var(--mono); font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em; margin-top: 4px;
}

/* Table */
.table-wrap {
  background: var(--surface-light);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 36px; animation: fadeUp 0.6s 0.3s ease both;
}
.table-head {
  display: grid; grid-template-columns: 52px 1fr 300px; padding: 13px 18px;
  background: linear-gradient(90deg, rgba(0,230,118,0.04), rgba(124,95,230,0.04));
  border-bottom: 1px solid var(--border);
}
.th {

  font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em;
  color: var(--muted); text-transform: uppercase;
}
.th.center { text-align: center; }
.row {
  display: grid; grid-template-columns: 52px 1fr 300px; padding: 13px 18px;
  align-items: center; border-bottom: 1px solid var(--border); min-height: 62px;
  transition: background 0.15s ease; animation: rowIn 0.35s ease both;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--surface-hover); }
.row.rank-1 { background: linear-gradient(90deg, rgba(255,215,64,0.07), transparent); border-left: 3px solid var(--gold); }
.row.rank-2 { background: linear-gradient(90deg, rgba(184,196,216,0.05), transparent); border-left: 3px solid var(--silver); }
.row.rank-3 { background: linear-gradient(90deg, rgba(232,144,58,0.05), transparent); border-left: 3px solid var(--bronze); }
.row:not(.rank-1):not(.rank-2):not(.rank-3) { border-left: 3px solid transparent; }
.rank-num { font-family: var(--display); font-size: 20px; color: var(--muted); padding-left: 4px; }
.rank-1 .rank-num { color: var(--gold); }
.rank-2 .rank-num { color: var(--silver); }
.rank-3 .rank-num { color: var(--bronze); }
.manager-col { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-family: var(--display); font-size: 13px;
  flex-shrink: 0; border: 2px solid var(--border); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.manager-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.manager-link,
.live-profile-link {
  color: inherit;
  text-decoration: none;
}
.manager-link:hover,
.live-profile-link:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.manager-titles { display: flex; gap: 3px; margin-top: 2px; flex-wrap: wrap; }
.season-badge {
      font-family: var(--mono); font-size: 9px; padding: 1px 5px;
      border-radius: 4px; color: var(--accent);
      border: 1px solid rgba(0,230,118,0.22); background: rgba(0,230,118,0.06);
      font-feature-settings: "tnum";
    }
.wins-col { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wins-trophies { display: flex; gap: 4px; flex-wrap: nowrap; font-size: 18px; }
.wins-years { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; margin-top: 3px; }
.wins-years .season-badge {
  color: #05603a; border-color: rgba(5,96,58,0.35); background: rgba(5,96,58,0.12);
  font-weight: 700;
}
.streak-badge {

  display: inline-block; font-family: var(--mono); font-size: 9px;
  padding: 1px 7px; border-radius: 4px; color: var(--gold);
  border: 1px solid rgba(255,215,64,0.3); background: var(--gold-dim);
  margin-left: 6px; white-space: nowrap; vertical-align: middle;
}

/* Mini cards */
.side-section { margin-bottom: 36px; animation: fadeUp 0.6s 0.35s ease both; }
.awards-shame-section { margin-top: 56px; }
.awards-section .section-header { justify-content: center; }
.awards-section .section-line { display: none; }
.mini-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.mini-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 12px; text-align: center;
}
.mini-card .mini-name { font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.mini-card .mini-stat {

  font-family: var(--mono); font-size: 10px; color: var(--text-muted); letter-spacing: 0.04em;
}
.empty-note {
  font-size: 13px; color: var(--muted); font-style: italic; padding: 8px 0;
}

/* Awards */
.awards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.awards-shame-section .awards-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.award-card {
  background: var(--surface-light);
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px;
  position: relative; overflow: hidden; transition: transform 0.2s, border-color 0.2s;
}
.awards-shame-section .award-card { min-height: 160px; padding: 14px 12px; }
.awards-shame-section .award-emoji { font-size: 22px; margin-bottom: 7px; }
.awards-shame-section .award-winner { font-size: 13px; line-height: 1.35; }
.awards-shame-section .award-detail { font-size: 11px; line-height: 1.35; }
.award-card:hover { transform: translateY(-2px); border-color: var(--border-light); }
.award-card.fame::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
}
.award-card.shame::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--shame), var(--bronze));
}
.award-card.shame { border-color: rgba(255,107,107,0.15); background: linear-gradient(145deg, rgba(255,107,107,0.04), var(--surface)); }
.award-emoji { font-size: 26px; margin-bottom: 8px; line-height: 1; }
.award-title {

  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 5px;
}
.award-winner { font-size: 14px; font-weight: 600; color: var(--text); }
.award-detail { font-size: 12px; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }

/* History */
.history-section { margin-top: 8px; animation: fadeUp 0.6s 0.5s ease both; }
.history-section .section-header { justify-content: center; }
.history-section .section-line { display: none; }
.cabinet-header { justify-content: center; margin-top: 8px; }
.cabinet-header .section-line { display: none; }
.section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.section-label {
  font-family: var(--display); font-size: 17px; font-weight: 400;
  letter-spacing: 0.12em; color: var(--text); text-transform: uppercase; white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-light), transparent); }
.history-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px;
}
.history-card {
  background: linear-gradient(145deg, var(--surface-light), var(--surface));
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: all 0.2s ease; cursor: pointer; position: relative; overflow: hidden;
}
.history-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.history-card:hover { border-color: rgba(56,239,125,0.4); transform: translateY(-3px); }
.history-card:hover::before { opacity: 1; }
.history-card.current-season { border-color: rgba(56,239,125,0.35); box-shadow: 0 0 16px rgba(56,239,125,0.1); }
.history-card.current-season::before { opacity: 1; }
.trophy-icon { font-size: 24px; line-height: 1; }

.history-season { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); font-feature-settings: "tnum"; }
.history-winner { font-size: 12px; font-weight: 600; text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-label {

  font-family: 'JetBrains Mono', monospace; font-size: 8px; letter-spacing: 0.1em;
  color: var(--accent); text-transform: uppercase;
}

/* Modal */
.modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,12,16,0.95); align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(8px); padding: 20px 56px;
}
.modal.active { display: flex; animation: fadeIn 0.2s ease; }
.modal-content {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 100%; cursor: default;
}
.modal-caption {

  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted);
  text-align: center;
}
.modal img {
  max-width: 100%; max-height: calc(100vh - 120px);
  border-radius: 8px; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-error {

  font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted);
  text-align: center; padding: 24px 32px; border: 1px dashed var(--border); border-radius: 8px;
}
.modal-close {
  position: absolute; top: 16px; right: 20px; z-index: 2;
  background: none; border: none; font-size: 36px; color: var(--muted);
  cursor: pointer; padding: 4px 8px; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.modal-nav:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-light); }
.modal-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.modal-prev { left: 12px; }
.modal-next { right: 12px; }

@media (max-width: 640px) {
  .header {
    grid-template-columns: 1fr; grid-template-rows: 30px 18px;
    column-gap: 8px; row-gap: 2px; margin-bottom: 16px;
  }
  .title {
    grid-column: 1 / -1; grid-row: 1; justify-self: center; align-self: center;
    margin: 0; font-size: clamp(30px, 10.5vw, 38px); line-height: 0.9;
    white-space: nowrap;
  }
  .subtitle {
    grid-column: 1; grid-row: 2; justify-self: center; align-self: center;
    max-width: 100%; margin: 0; font-size: 9px; line-height: 1.2; text-align: center;
  }
  .live-section .section-label {
    font-size: 15px; letter-spacing: 0; white-space: nowrap;
  }
  .podium-section { display: none; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stats-bar .stat {
    height: 70px; padding: 8px 6px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
  }
  .stats-bar .stat-val { font-size: 25px; }
  .stats-bar .stat-lbl { font-size: 8px; line-height: 1.2; }
  .stats-bar .stat-old-guards { padding: 5px 7px; }
  .stats-bar .old-guards-list { gap: 4px 6px; font-size: 11px; line-height: 1; }
  .stats-bar .stat-old-guards .stat-lbl { margin-top: 2px; }
  .table-head, .row { grid-template-columns: 40px 1fr 200px; padding: 10px 12px; }
  .avatar { width: 32px; height: 32px; font-size: 12px; }
  .wins-trophies { font-size: 16px; gap: 2px; }
  .history-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .history-card { min-height: 88px; padding: 9px 6px; gap: 3px; border-radius: var(--radius-sm); }
  .trophy-icon { font-size: 18px; }
  .history-season { font-size: 9px; }
  .history-winner { font-size: 11px; }
  .current-label { font-size: 7px; }
  .awards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .awards-shame-section .awards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .award-card { min-height: 148px; padding: 12px 10px; border-radius: var(--radius-sm); }
  .award-emoji { font-size: 20px; margin-bottom: 8px; }
  .award-title { font-size: 8px; letter-spacing: 0.1em; }
  .award-winner { font-size: 12px; line-height: 1.35; }
  .award-detail { font-size: 11px; line-height: 1.35; }
  .modal { padding: 20px 48px; }
}

@keyframes fadeDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Live Widget */
.live-section {
  margin-bottom: 28px; padding: 14px;
  border: 1px solid rgba(255,255,255,0.72); border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.82), transparent 34%),
    linear-gradient(145deg, rgba(255,255,255,0.68), rgba(235,241,249,0.48)),
    rgba(238,243,250,0.54);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 22px 55px rgba(0,0,0,0.24);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  animation: fadeDown 0.6s 0.1s ease both;
}
.live-section .section-label { color: #111827; }
.live-section .section-line { background: #d7dde7; }
.live-section .section-header { margin-bottom: 12px; padding: 0 2px; flex-wrap: wrap; }
.live-deadline {
  margin: 0 0 0 auto; color: #344054; font-family: var(--mono); font-size: 9px;
  font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}
.live-table {
  background: rgba(255,255,255,0.48);
  border: 1px solid rgba(255,255,255,0.74); border-radius: var(--radius-md); overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 12px 28px rgba(15,23,42,0.08);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}
.live-entry { border-bottom: 1px solid #e7ebf1; }
.live-entry:last-child { border-bottom: none; }
/* Three-zone live row: identity, performance, actions. */
.live-row {
  display: grid;
  grid-template-columns: 44px minmax(180px, 1fr) minmax(210px, 0.58fr) minmax(140px, auto);
  gap: 14px; padding: 12px 18px; align-items: center;
  background: rgba(255,255,255,0.32);
}
.live-entry:hover > .live-row { background: rgba(255,255,255,0.58); }
.live-rank { display: flex; align-items: center; font-family: var(--display); font-size: 18px; color: #475467; }
.live-identity { min-width: 0; }
.live-manager-line { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.live-manager { font-size: 14px; font-weight: 650; color: #111827; }
.live-team-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.live-team { font-family: var(--mono); font-size: 12px; color: #475467; }
.live-meta {
  font-family: var(--mono); font-size: 12px; line-height: 1.25; color: #064e3b;
  border: 1px solid #5e8f7b; background: #e8f5ef;
  border-radius: 4px; padding: 2px 5px; white-space: nowrap; font-weight: 700;
}
.live-meta-caf { color: #064e3b; border-color: #5e8f7b; background: #e8f5ef; }
.live-performance,
.live-scores { display: grid; grid-template-columns: repeat(3, minmax(52px, 1fr)); gap: 8px; text-align: right; }
.live-score { display: grid; gap: 1px; }
.live-score small { display: none; font-family: var(--mono); font-size: 12px; color: #475467; font-weight: 700; }
.live-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.live-projected-chip {
  padding: 3px 6px; border: 1px dashed #7c5c00; border-radius: 4px;
  background: #fff7d6; color: #654b00; font: 700 12px/1.25 var(--mono); white-space: nowrap;
}
.live-table-head {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(174px, 0.38fr);
  padding: 8px 18px 7px; border-bottom: 1px solid #dfe4ec;
  background: rgba(241,245,249,0.58);
}
.live-score-head,
.live-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: right; }
.live-score-head {
  font-family: var(--mono); font-size: 8px; color: #667085;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.live-score {
  font-family: var(--display); font-size: 18px; color: var(--teal);
  text-align: right; font-feature-settings: "tnum"; white-space: nowrap;
}
.live-score:nth-child(1),
.live-score:nth-child(2) { color: #475467; }
.live-score:nth-child(3) { color: #111827; }
.live-trend { display: inline-flex; align-items: center; gap: 1px; width: auto; height: 16px; margin-left: 4px; vertical-align: middle; }
.live-move { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.live-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.live-chip,
.live-role {
  font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1.25;
  color: #064e3b; background: #e8f5ef; border: 1px solid #5e8f7b;
  border-radius: 4px; padding: 2px 5px;
}
.live-score:has(.live-gw-hit) { white-space: normal; }
.live-gw-net { display: block; }
.live-gw-hit { display: block; font-family: var(--mono); font-size: 10px; font-weight: 700; color: #513d00; line-height: 1.3; }
.live-panel { margin-top: 14px; }
.live-panel-title { margin: 0 0 6px; font-family: var(--display); font-size: 22px; letter-spacing: 0.04em; color: #111827; }
.live-panel-label { margin: 10px 0 4px; font-family: var(--mono); font-size: 12px; color: #344054; }
.live-panel-note, .live-compare-kicker { margin: 0 0 6px; color: #475467; font-size: 12px; line-height: 1.4; }
.live-pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.live-pick-list li { display: flex; justify-content: space-between; gap: 8px; color: #111827; font-size: 12px; }
.live-pick-name { font-weight: 700; }
.live-pick-details { margin-top: 8px; color: #344054; font-size: 12px; }
.live-compare-picks { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.live-compare-picks label { display: grid; gap: 4px; color: #344054; font-family: var(--mono); font-size: 12px; }
.live-compare-picks select {
  min-height: 36px; min-width: 10rem; padding: 4px 8px;
  color: #111827; background: #fff; border: 1px solid #98a2b3; border-radius: 5px;
  font: 14px/1.3 'DM Sans', sans-serif;
}
.live-compare-picks select:focus-visible { outline: 3px solid #f5c542; outline-offset: 2px; }
.live-compare-squads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.live-rivalry { margin-top: 8px; }
.live-trend svg,
.live-squad-toggle svg,
.live-projected-note svg,
.live-player-name em svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trend-up { color: #067647; }
.trend-down { color: #b42318; }
.trend-flat { color: #475467; }
.live-toggle {
  width: 100%; padding: 11px 18px; cursor: pointer;
  background: rgba(241,245,249,0.62); border: 0; border-top: 1px solid #dfe4ec;
  color: var(--teal); font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.live-toggle:hover { background: rgba(255,255,255,0.76); }
.live-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.live-squad-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 32px; padding: 6px 9px;
  border: 1px solid #98a2b3; border-radius: 5px; cursor: pointer;
  background: #fff; color: #344054;
  font-family: var(--mono); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.live-squad-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.live-squad-toggle:hover { border-color: #0f766e; color: #0f5f59; }
.live-squad-toggle:focus-visible { outline: 3px solid #f5c542; outline-offset: 2px; }
.live-projected-note {
  display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; padding: 7px 8px;
  border: 1px dashed #8a6800; border-radius: 5px; background: #fff7d6; color: #513d00;
  font: 12px/1.45 var(--mono);
}
.live-projected-note svg { flex: 0 0 auto; margin-top: 1px; }
.live-squad {
  padding: 8px; border-top: 1px solid #dfe4ec;
  background: #dce7df;
}
.live-squad-pitch {
  display: flex; flex-direction: column; gap: 8px; padding: 9px 8px;
  border: 1px solid rgba(255,255,255,0.8); border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(255,255,255,0.62) 49.7%, rgba(255,255,255,0.62) 50.3%, transparent 50.3%),
    repeating-linear-gradient(0deg, #4b9a63 0, #4b9a63 32px, #438d5a 32px, #438d5a 64px);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.15);
}
.live-squad-line { display: flex; align-items: flex-start; justify-content: space-evenly; gap: 5px; }
.live-player { width: 70px; min-width: 0; text-align: center; font-family: var(--mono); }
.live-player-shirt {
  width: 36px; height: 30px; margin: 0 auto -2px; display: grid; place-items: center;
  color: #fff; font-size: 7px; font-weight: 700; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(145deg, #172033, #48556d); border: 1px solid rgba(255,255,255,0.76);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}
.live-player-name,
.live-player-points { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-player-name {
  position: relative; padding: 3px 4px; background: #111827; color: #fff;
  border-radius: 3px 3px 0 0; font-size: 12px;
}
.live-player-name b {
  display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin-left: 3px;
  border-radius: 50%; background: #f5c542; color: #101828; font-size: 12px;
}
.live-player-name em {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 3px; padding: 1px 3px; border-radius: 2px;
  background: #fff; color: #101828; font-size: 12px; font-style: normal; font-weight: 800;
}
.live-player-name em svg { width: 12px; height: 12px; }
.live-player-points {
  padding: 2px 3px; border-radius: 0 0 3px 3px; background: #fff; color: #101828;
  font-family: var(--display); font-size: 12px;
}
.live-player-captain .live-player-points { color: var(--teal); }
.live-player-benched { opacity: 0.65; filter: grayscale(0.35); }
.live-player-sub-out .live-player-name { text-decoration: line-through; }
.live-player-sub-in { opacity: 1; filter: none; }
.live-player-sub-in .live-player-shirt { outline: 2px solid var(--accent); }
.live-player-sub-in .live-player-name em { background: var(--accent); }
.live-squad-bench { margin-top: 6px; padding: 6px; border-radius: 6px; background: rgba(17,24,39,0.08); }
.live-squad-bench > span {
  display: block; margin-bottom: 5px; color: #344054; font-family: var(--mono);
  font-size: 7px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.live-squad-bench > div { display: flex; justify-content: space-evenly; gap: 5px; }

@media (max-width: 760px) {
  .live-section { padding: 8px; border-radius: var(--radius-md); overflow-x: hidden; }
  .live-section .section-header { margin-bottom: 9px; }
  .live-deadline { width: 100%; margin: 0; font-size: 12px; white-space: normal; }
  .live-table { overflow-x: hidden; }
  .live-table-head { display: none; }
  .live-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas: "rank identity performance" ". actions actions";
    gap: 8px 10px; padding: 11px 10px; max-width: 100%; box-sizing: border-box;
  }
  .live-rank { grid-area: rank; font-size: 16px; }
  .live-identity { grid-area: identity; min-width: 0; overflow: hidden; }
  .live-performance { grid-area: performance; grid-template-columns: repeat(2, minmax(45px, auto)); gap: 8px; }
  .live-performance .live-score:first-child { display: none; }
  .live-score { font-size: 17px; }
  .live-score small { display: block; }
  .live-actions { grid-area: actions; justify-content: space-between; padding-top: 3px; }
  .live-manager-line { gap: 5px; min-width: 0; }
  .live-manager { font-size: 13px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .live-team { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .live-team-line { display: none; }
  .live-squad-toggle { min-height: 36px; }
  .live-squad { padding: 6px; overflow-x: hidden; max-width: 100%; }
  .live-squad-pitch { gap: 7px; padding: 8px 3px; }
  .live-player { width: clamp(54px, 19vw, 76px); }
  .live-player-shirt { width: 31px; height: 27px; }
  .live-player-name, .live-player-points { font-size: 12px; }
  .live-squad-bench { padding: 5px 2px; }
  .live-squad-bench > span { font-size: 12px; }
  .live-compare-squads { grid-template-columns: 1fr; }
  .live-panel-title { font-size: 18px; }
}

.share-actions { text-align: center; margin-top: 16px; }

/* Action Button (Bragging Rights) */
.action-btn {
  background: linear-gradient(135deg, rgba(124,95,230,0.18), rgba(0,230,118,0.18));
  border: 1px solid var(--accent); color: var(--text);
  padding: 10px 20px; border-radius: 30px; cursor: pointer;

  font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.05em;
  transition: all 0.2s; box-shadow: 0 0 16px rgba(0,230,118,0.08);
}
.action-btn:hover { background: linear-gradient(135deg, rgba(124,95,230,0.35), rgba(0,230,118,0.35)); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,230,118,0.25); }

/* Light frosted-glass component system */
.stat,
.podium-card,
.table-wrap,
.mini-card,
.award-card,
.history-card {
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,0.88), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,0.68), rgba(235,241,249,0.48)),
    rgba(238,243,250,0.54);
  border-color: rgba(255,255,255,0.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.96),
    0 16px 38px rgba(0,0,0,0.18);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}
.podium-card.place-1 {
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,0.88), transparent 36%),
    linear-gradient(145deg, rgba(255,255,255,0.68), rgba(235,241,249,0.48)),
    rgba(238,243,250,0.54);
}
.stat:hover,
.podium-card:hover,
.mini-card:hover,
.award-card:hover,
.history-card:hover {
  background:
    radial-gradient(circle at 16% 0%, rgba(255,255,255,0.96), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,0.78), rgba(241,245,249,0.58)),
    rgba(245,248,252,0.64);
  border-color: rgba(255,255,255,0.9);
}
.old-guard-name,
.podium-name,
.manager-name,
.mini-card .mini-name,
.award-winner,
.history-winner { color: #111827; }
.stat-lbl,
.old-guard-rank,
.podium-lbl,
.th,
.rank-num,
.mini-card .mini-stat,
.award-title,
.history-season { color: #667085; }
.table-head {
  background: rgba(241,245,249,0.62);
  border-bottom-color: rgba(148,163,184,0.3);
}
.row { border-bottom-color: rgba(148,163,184,0.28); }
.row:hover { background: rgba(255,255,255,0.46); }
.row.rank-1 { background: linear-gradient(90deg, rgba(255,215,64,0.18), rgba(255,255,255,0.2)); }
.row.rank-2 { background: linear-gradient(90deg, rgba(148,163,184,0.16), rgba(255,255,255,0.18)); }
.row.rank-3 { background: linear-gradient(90deg, rgba(232,144,58,0.15), rgba(255,255,255,0.18)); }
.award-card.shame {
  background:
    linear-gradient(145deg, rgba(255,239,239,0.72), rgba(255,255,255,0.48)),
    rgba(245,248,252,0.54);
  border-color: rgba(255,107,107,0.24);
}
.award-detail { color: #475467; }
.filter-btn,
.action-btn,
.league-tag,
.fpl-link {
  background: rgba(255,255,255,0.58);
  border-color: rgba(255,255,255,0.74);
  color: #344054;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88), 0 8px 22px rgba(0,0,0,0.12);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.filter-btn:hover,
.action-btn:hover,
.fpl-link:hover { background: rgba(255,255,255,0.76); color: #111827; }
.filter-btn.active {
  background: rgba(224,255,241,0.72);
  color: #087443;
}
.league-tag { color: #087443; }
.site-footer {
  margin-top: 38px; padding: 22px 16px;
  border: 1px solid rgba(255,255,255,0.68); border-radius: var(--radius-lg);
  background: rgba(238,243,250,0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 16px 38px rgba(0,0,0,0.16);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
}
