:root {
  --color-bg: #0d0d0d;
  --color-surface: #141414;
  --color-surface-hover: #1c1c1c;
  --color-border: rgba(255, 255, 255, 0.07);
  --color-accent: #90EE02;
  --color-accent-dim: rgba(144, 238, 2, 0.10);
  --color-text: #e0e0e0;
  --color-text-muted: #666;
  --color-gold: #90EE02;
  --color-silver: #C0C0C0;
  --color-bronze: #CD7F32;
  --color-success: #4ade80;
  --color-success-dim: rgba(74, 222, 128, 0.10);
  --color-danger: #f87171;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans: 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Bebas Neue', var(--font-sans);
  --font-nav: 'Barlow Condensed', system-ui, sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  --max-width: 1100px;
  --nav-height: 60px;
  --radius: 10px;
  --radius-sm: 6px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── NAV ── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0 var(--space-lg);
  background-color: rgba(8, 8, 8, 0.25);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  font-family: var(--font-nav);
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

.nav--scrolled {
  background-color: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom-color: rgba(144, 238, 2, 0.10);
}

.nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 1px;
  white-space: nowrap;
  font-family: var(--font-nav);
}

.nav__monster-m {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__monster-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 5px rgba(144, 238, 2, 0.65));
}

.nav__monster-fallback {
  display: none;
  font-family: var(--font-heading);
  font-size: 3.4rem;
  line-height: 1;
  color: var(--color-accent);
  text-shadow:
    0 0 6px rgba(144, 238, 2, 0.8),
    0 0 18px rgba(144, 238, 2, 0.35);
  letter-spacing: -1px;
}

.nav__monster-m--error .nav__monster-img     { display: none; }
.nav__monster-m--error .nav__monster-fallback { display: block; }

.nav__links {
  display: flex;
  list-style: none;
  gap: 4px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav__links::-webkit-scrollbar { display: none; }

.nav__link {
  display: block;
  padding: 6px 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-family: var(--font-nav);
  font-weight: 500;
  letter-spacing: 0.4px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-accent);
  background-color: var(--color-accent-dim);
}

/* ── LAYOUT ── */

.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Entrance animation — JS přidá .section--visible přes IntersectionObserver */
.section {
  padding: 6rem 0;
  scroll-margin-top: calc(var(--nav-height) + var(--space-md));
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sekce uvnitř hero layoutu mají vlastní spacing */
.page-hero-inner .section {
  padding: var(--space-xl) 0;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 400;
  color: var(--color-accent);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(144, 238, 2, 0.09);
  position: relative;
  letter-spacing: 3px;
  text-shadow: 0 0 20px rgba(144, 238, 2, 0.15);
  line-height: 1;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent) 0%, transparent 100%);
}

/* ── TABLE BASE ── */

.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: border-color 0.3s;
}

.table-scroll:hover {
  border-color: rgba(144, 238, 2, 0.14);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table thead th {
  padding: var(--space-md);
  background-color: #0f0f0f;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-align: center;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-body);
}

.table tbody td {
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-surface);
  transition: background-color 0.15s;
}

.table tbody tr:last-child td { border-bottom: none; }

/* Lift + shadow on row hover — dopadá na všechny tabulky */
.table tbody tr {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.table tbody tr:hover {
  transform: translateY(-2px);
  position: relative;
  z-index: 1;
}

.table tbody tr:hover td {
  background-color: var(--color-surface-hover);
}

.table tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 var(--color-accent), 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* ── STANDINGS ── */

.standings-table { border-radius: var(--radius); overflow: hidden; }

.standings-table thead th.col-left,
.standings-table td.rank-cell,
.standings-table td.name-cell { text-align: left; }

.standings-row {
  animation: rowEnter 0.5s ease calc(var(--row-index, 0) * 0.08s) both;
}

.standings-table td.rank-cell {
  width: 40px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.standings-table td.photo-cell {
  width: 56px;
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
}

.standings-table td.name-cell { font-weight: 600; }

.standings-table td.points-cell {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
}

/* Top 3 */
.standings-row.rank-1 td.rank-cell,
.standings-row.rank-1 td.name-cell  { color: var(--color-gold); }
.standings-row.rank-2 td.rank-cell,
.standings-row.rank-2 td.name-cell  { color: var(--color-silver); }
.standings-row.rank-3 td.rank-cell,
.standings-row.rank-3 td.name-cell  { color: var(--color-bronze); }
.standings-row.rank-1 td.points-cell { color: var(--color-gold); }
.standings-row.rank-2 td.points-cell { color: var(--color-silver); }
.standings-row.rank-3 td.points-cell { color: var(--color-bronze); }

/* Avatar */
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  background-color: #1e1e1e;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-1 .avatar { border-color: var(--color-gold);   box-shadow: 0 0 14px rgba(144, 238, 2, 0.55); }
.rank-2 .avatar { border-color: var(--color-silver); }
.rank-3 .avatar { border-color: var(--color-bronze); }

.avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar__initials {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.rounds-note {
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* ── ROUNDS TABLE ── */

.rounds-table { min-width: 900px; }

.rounds-table thead th.col-name,
.rounds-table td.col-name {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: var(--color-surface);
  font-weight: 600;
  white-space: nowrap;
}

.rounds-table thead th.col-name { z-index: 3; background-color: #0f0f0f; }

.rounds-table td.col-total {
  font-weight: 700;
  color: var(--color-accent);
}

.rounds-table th.col-round-nadstavba,
.rounds-table td.col-round-nadstavba {
  border-left: 1px solid rgba(144, 238, 2, 0.15);
}

.rounds-table td.cell-max { color: var(--color-gold); font-weight: 700; }
.rounds-table td.cell-min { color: var(--color-danger); }

/* Heat coloring */
.rounds-table td.col-round {
  background-color: var(--cell-bg, var(--color-surface));
  transition: filter 0.2s;
}

.rounds-table tbody tr:hover td.col-round  { filter: brightness(1.25); }
.rounds-table tbody tr:hover td.col-name   { background-color: var(--color-surface-hover); }

/* ── JOKERS TABLE ── */

.jokers-table thead th.col-name,
.jokers-table td.col-name {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: var(--color-surface);
  font-weight: 600;
  white-space: nowrap;
}

.jokers-table thead th.col-name        { z-index: 3; background-color: #0f0f0f; }
.jokers-table tbody tr:hover td.col-name { background-color: var(--color-surface-hover); }

.joker-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.joker-badge--used {
  background-color: var(--color-success-dim);
  color: var(--color-success);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

/* Nevyužité: šedý tag s tečkovaným borderem */
.joker-badge--unused {
  color: var(--color-text-muted);
  border: 1px dashed rgba(136, 136, 136, 0.35);
}

/* ── RULES ── */

.rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .rules-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

.rule-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rule-card:hover {
  border-color: rgba(144, 238, 2, 0.22);
  box-shadow: 0 0 16px rgba(144, 238, 2, 0.07);
}

.rule-card__icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.rule-card__text { color: var(--color-text); line-height: 1.65; }

/* ── REWARDS ── */

.rewards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.reward-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-left-width: 3px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reward-item--win  { border-left-color: var(--color-accent); }
.reward-item--lose { border-left-color: var(--color-danger); }

.reward-item--win:hover { box-shadow: 0 0 14px rgba(144, 238, 2, 0.07); }

.reward-item__icon  { font-size: 1.4rem; flex-shrink: 0; }
.reward-item__place { min-width: 28px; font-weight: 700; font-size: 1rem; color: var(--color-accent); }
.reward-item--lose .reward-item__place { color: var(--color-danger); }
.reward-item__text  { color: var(--color-text); }

/* ── HERO ── */

.hero {
  position: relative;
  padding: calc(var(--space-xl) * 1.5) var(--space-lg);
  text-align: center;
}

.hero__bg { display: none; }

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 10vw, 7.5rem);
  font-weight: 400;
  letter-spacing: 5px;
  background: linear-gradient(135deg, #3d7a00 0%, #90EE02 35%, #c8ff6e 55%, #68c200 80%, #90EE02 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  filter: drop-shadow(0 0 30px rgba(144, 238, 2, 0.2));
}

.hero__tagline {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  font-family: var(--font-body);
}

/* Wrapper: mobil = sloupec, wide = vedle sebe */
.hero__cards-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
  max-width: 380px;
}

/* Lídr ligy — čistá karta, zelený border vlevo */
.hero__leader-box {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: rgba(144, 238, 2, 0.04);
  border: 1px solid rgba(144, 238, 2, 0.10);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  margin-top: var(--space-md);
  width: 100%;
  max-width: 380px;
}

.hero__leader-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__leader-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.hero__leader-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-gold);
  font-family: var(--font-body);
}

.hero__leader-pts {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

/* Champion card — ledová modrá přebíjí zelené hodnoty */
.hero__leader-box--champion {
  background:   rgba(96, 180, 255, 0.04);
  border-color: rgba(96, 180, 255, 0.10);
  border-left-color: #60B4FF;
}

.hero-champion-avatar {
  width: 64px;
  height: 64px;
  border-color: #60B4FF;
  box-shadow: 0 0 22px rgba(96, 180, 255, 0.5);
  margin: 0;
  flex-shrink: 0;
}

.hero__leader-name--champion { color: #60B4FF; }
.hero__leader-pts--champion  { color: rgba(96, 180, 255, 0.65); }

/* Champion diamantová korunka + modrá animace */
.hero-champion-crown {
  position: absolute;
  top: 0;
  left: 50%;
  font-size: 1.1rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  animation: championCrownPulse 2s ease-in-out infinite;
}

@keyframes championCrownPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1.0);
    filter: drop-shadow(0 0 4px rgba(96, 180, 255, 0.35));
  }
  50% {
    transform: translateX(-50%) scale(1.2);
    filter: drop-shadow(0 0 10px rgba(96, 180, 255, 0.9));
  }
}

/* ── HERO LEADER CROWN ── */

.hero-leader-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  /* Extra top space so the crown doesn't clip */
  padding-top: 18px;
}

.hero-leader-crown {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scale(1);
  font-size: 1.1rem;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  animation: crownPulse 2s ease-in-out infinite;
}

@keyframes crownPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1.0);
    filter: drop-shadow(0 0 4px rgba(144, 238, 2, 0.35));
  }
  50% {
    transform: translateX(-50%) scale(1.2);
    filter: drop-shadow(0 0 10px rgba(144, 238, 2, 0.9));
  }
}

/* ── ANIMATIONS ── */

@keyframes rowEnter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── TREND ── */

.trend-cell { min-width: 60px; }

.trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 700;
}

.trend--up   { color: var(--color-success); }
.trend--down { color: var(--color-danger); }
.trend--same { color: var(--color-text-muted); font-weight: 400; }

/* ── PAGE HERO WRAP ── */

.page-hero-wrap {
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(144, 238, 2, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 30%, rgba(0, 180, 40, 0.035) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(144, 238, 2, 0.025) 0%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 72px, rgba(144, 238, 2, 0.015) 72px, rgba(144, 238, 2, 0.015) 73px),
    repeating-linear-gradient(90deg, transparent, transparent 72px, rgba(144, 238, 2, 0.015) 72px, rgba(144, 238, 2, 0.015) 73px),
    linear-gradient(180deg, #030603 0%, #070c04 55%, var(--color-bg) 100%);
  border-bottom: 1px solid rgba(144, 238, 2, 0.07);
}

.page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xl);
}

@media (min-width: 960px) {
  .page-hero-inner {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: var(--space-xl);
    align-items: start;
    padding-top: var(--space-xl);
  }

  .page-hero-inner .hero {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-md));
    padding: var(--space-xl) var(--space-md) var(--space-xl) 0;
    text-align: left;
  }

  .page-hero-inner .hero__content  { align-items: flex-start; }
  .page-hero-inner .hero__leader-box { max-width: 100%; }
}

/* ── HERO LEADER AVATAR ── */

.hero-leader-avatar {
  width: 64px;
  height: 64px;
  border-color: var(--color-accent);
  box-shadow: 0 0 22px rgba(144, 238, 2, 0.5);
  margin: 0;
  flex-shrink: 0;
}

/* ── LAYOUT BOTTOM GRID ── */

@media (min-width: 720px) {
  .layout-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
  }

  .layout-bottom-grid .section { margin-bottom: 0; }
}

/* ── SEASON SWITCHER ── */

.season-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.season-btn {
  padding: 7px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 100px;
  color: var(--color-text-muted);
  font-family: var(--font-nav);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.season-btn:hover {
  color: var(--color-text);
  border-color: rgba(144, 238, 2, 0.4);
}

.season-btn--active {
  color: #0d0d0d;
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(144, 238, 2, 0.22);
}

/* ── HALL OF FAME ── */

.hof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

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

.hof-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: border-color 0.2s;
}

.hof-panel:hover { border-color: rgba(144, 238, 2, 0.18); }

.hof-panel__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(144, 238, 2, 0.09);
  line-height: 1;
}

.hof-table td,
.hof-table th { font-size: 0.82rem; }

.hof-table td.col-left { text-align: left; }
.hof-winner { color: var(--color-accent); font-weight: 700; text-align: left; }
.hof-loser  { color: var(--color-danger);  text-align: left; }
.hof-pts    { font-weight: 700; color: var(--color-text); }
.hof-titles { letter-spacing: 2px; }

.hof-rank-1 td { color: var(--color-gold); }
.hof-rank-2 td { color: var(--color-silver); }
.hof-rank-3 td { color: var(--color-bronze); }

.hof-rank-1 td.hof-pts,
.hof-rank-2 td.hof-pts,
.hof-rank-3 td.hof-pts { font-weight: 700; }

.hof-record-name { text-align: left; color: var(--color-text); font-size: 0.78rem; }
.hof-record-when { color: var(--color-text-muted); font-size: 0.75rem; }

/* ── PLAYER PROFILE MODAL ── */

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-modal[hidden] { display: none; }

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

.profile-modal__box {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  width: min(92vw, 520px);
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  animation: modal-enter 0.25s ease;
}

.profile-modal__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1;
}
.profile-modal__close:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
}

.profile-modal__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-right: 2.5rem;
}

.profile-modal__avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 20px rgba(144, 238, 2, 0.28);
  background: var(--color-surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-modal__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-modal__avatar-initials {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--color-accent);
}

.profile-modal__name {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 4px;
}

.profile-modal__rank {
  font-size: 0.82rem;
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Stats 2×3 grid */
.profile-modal__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.profile-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.2s;
}
.profile-stat-card:hover { border-color: rgba(144, 238, 2, 0.2); }

.profile-stat-card__label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
}

.profile-stat-card__value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--color-accent);
  line-height: 1.1;
}

.profile-stat-card__sub {
  font-size: 0.67rem;
  color: var(--color-text-muted);
}

/* Forma mini bar chart */
.profile-modal__forma-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.profile-modal__forma-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  line-height: 1;
}

.forma-wrap {
  display: flex;
  gap: 8px;
}

.forma-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.forma-bar-chart {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: flex-end;
}

.forma-bar {
  width: 100%;
  height: calc(var(--bar-pct, 0.5) * 48px);
  min-height: 4px;
  border-radius: 3px 3px 0 0;
}

.forma-bar--good { background: var(--color-accent);  opacity: 0.88; }
.forma-bar--bad  { background: var(--color-danger);  opacity: 0.88; }

.forma-bar-pts {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text);
}

.forma-bar-label {
  font-size: 0.63rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Clickable cells in standings table */
.profile-clickable {
  cursor: pointer;
  transition: color 0.15s;
}
.profile-clickable:hover { color: var(--color-accent); }

/* ── FORMA ── */

.forma-switcher {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.forma-btn {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 100px;
  color: var(--color-text-muted);
  font-family: var(--font-nav);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.forma-btn:hover { color: var(--color-text); border-color: rgba(144, 238, 2, 0.4); }
.forma-btn--active {
  color: #0d0d0d;
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  font-weight: 700;
}

.forma-legend {
  display: flex;
  gap: 1.5rem;
  margin: var(--space-md) 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

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

.forma-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.forma-legend__dot--good { background: var(--color-accent); opacity: 0.85; }
.forma-legend__dot--bad  { background: var(--color-danger); opacity: 0.85; }

.forma-name-cell {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}

.forma-avatar {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
}

.forma-avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.forma-avatar__initial {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--color-accent);
}

.forma-pill-cell { text-align: center; }

.forma-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  min-width: 34px;
  text-align: center;
}
.forma-pill--good { background: rgba(144, 238, 2, 0.14);   color: var(--color-accent); }
.forma-pill--bad  { background: rgba(248, 113, 113, 0.14); color: var(--color-danger); }
.forma-pill--null { color: var(--color-text-muted); font-weight: 400; }

.forma-col-avg   { text-align: center; }
.forma-col-trend { text-align: center; }
.forma-col-spark { padding-left: var(--space-sm); }

.forma-avg {
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
  min-width: 48px;
}

.spark-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  height: calc(var(--bar-h, 0) * 20px);
  min-height: 2px;
}
.spark-bar--good { background: var(--color-accent); opacity: 0.72; }
.spark-bar--bad  { background: var(--color-danger); opacity: 0.72; }
.spark-bar--null { height: 2px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; }

/* ── BUMP CHART ── */

.bump-chart-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.bump-chart__svg {
  display: block;
}

/* Round-picker switcher for the gap chart */
.gap-switcher {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  scrollbar-width: none;
}

.gap-switcher::-webkit-scrollbar {
  display: none;
}

.gap-btn {
  padding: 5px 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 100px;
  color: var(--color-text-muted);
  font-family: var(--font-nav);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.gap-btn:hover {
  color: var(--color-text);
  border-color: rgba(144, 238, 2, 0.4);
}

.gap-btn--active {
  color: #0d0d0d;
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(144, 238, 2, 0.22);
}

/* Canvas wrapper for the Chart.js gap chart */
.gap-chart-canvas-wrap {
  position: relative;
  height: 340px;
  padding: 0.5rem 1rem 1rem;
}

.bump-tooltip {
  position: fixed;
  z-index: 500;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--color-text);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ── LINEUP MODAL ── */

.lineup-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lineup-modal[hidden] { display: none; }

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

.lineup-modal__box {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  max-width: min(92vw, 900px);
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  animation: modal-enter 0.25s ease;
}

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.lineup-modal__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  line-height: 1;
}

.lineup-modal__close:hover {
  color: var(--color-text);
  border-color: var(--color-accent);
}

.lineup-modal__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--color-accent);
  padding-right: 2.5rem;
  line-height: 1;
}

.lineup-modal__joker-banner {
  background: #FFD700;
  color: #1a1a1a;
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  font-weight: 500;
  font-size: 0.9rem;
}

.lineup-modal__penalty-banner {
  background: #cc2222;
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  font-weight: 500;
  font-size: 0.9rem;
}

.lineup-modal__img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.lineup-modal__img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: var(--radius-sm);
  display: block;
}

.lineup-modal__missing {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: var(--space-xl) 0;
}

/* Clickable round-point cells */
.col-round--clickable {
  cursor: pointer;
  transition: color 0.15s;
}

.col-round--clickable:hover {
  color: var(--color-accent);
}

/* ── RESPONSIVE ── */

@media (max-width: 600px) {
  .nav  { padding: 0 var(--space-md); }
  .main { padding: 0 var(--space-md); }

  .section { padding: 4rem 0; }

  .section__title { font-size: 2.4rem; }

  .reward-item  { padding: var(--space-sm) var(--space-md); }

  .hero { padding: var(--space-xl) var(--space-md); }

  .hero__leader-box { max-width: 100%; }

  .page-hero-inner { padding: 0 var(--space-md) var(--space-lg); }
}
