:root {
  --ink: #06162d;
  --navy: #071b38;
  --navy-2: #0b2b58;
  --blue: #075fcb;
  --blue-bright: #1688ff;
  --cyan: #4ee9ff;
  --lime: #d8ff38;
  --gold: #e6bd55;
  --paper: #f4f7fb;
  --white: #ffffff;
  --muted: #93a7c2;
  --line: rgba(121, 167, 220, 0.18);
  --shadow: 0 24px 70px rgba(1, 13, 34, 0.24);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--white);
  background:
    linear-gradient(rgba(13, 39, 76, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 39, 76, 0.22) 1px, transparent 1px),
    var(--ink);
  background-size: 54px 54px;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  min-width: 320px;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-one {
  top: -220px;
  right: -160px;
  background: var(--blue-bright);
}

.ambient-two {
  bottom: -340px;
  left: -220px;
  background: #53ffd0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 19, 42, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 48px;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--lime);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 12px rgba(216, 255, 56, 0.28));
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0.12em;
}

.brand strong {
  font-size: 0.9rem;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.nav-link {
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  background: var(--lime);
}

.model-live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c2d1e4;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(216, 255, 56, 0.28);
  border-radius: 999px;
  color: var(--lime);
  background: rgba(216, 255, 56, 0.06);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  border-color: var(--lime);
  background: rgba(216, 255, 56, 0.13);
  outline: none;
  transform: translateY(-1px);
}

.language-icon {
  font-size: 0.82rem;
  line-height: 1;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3cff98;
  box-shadow: 0 0 0 5px rgba(60, 255, 152, 0.1), 0 0 18px #3cff98;
  animation: pulse 1.8s infinite;
}

main {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 700px;
  padding: 94px 6vw 70px;
  overflow: hidden;
}

.hero::after {
  content: "26";
  position: absolute;
  right: 1vw;
  bottom: -0.21em;
  z-index: -1;
  color: rgba(255, 255, 255, 0.025);
  font-size: clamp(18rem, 34vw, 34rem);
  font-weight: 1000;
  line-height: 0.8;
  letter-spacing: -0.1em;
}

.hero-copy {
  align-self: center;
  max-width: 780px;
}

.eyebrow,
.section-kicker {
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

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

.eyebrow i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--lime);
}

.hero h1 {
  margin: 24px 0 22px;
  font-size: clamp(4rem, 8.2vw, 8.8rem);
  font-weight: 1000;
  line-height: 0.82;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(95deg, var(--lime), #82f9ff 58%, #fff);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-title-top {
  color: var(--white);
}

.hero-copy > p {
  max-width: 670px;
  margin: 0;
  color: #b6c6db;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-top: 36px;
}

.simulate-button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 285px;
  padding: 15px 24px 15px 16px;
  border: 0;
  border-radius: 14px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 14px 45px rgba(216, 255, 56, 0.22);
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.simulate-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.65), transparent 70%);
  transform: translateX(-120%);
  transition: transform 600ms ease;
}

.simulate-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 55px rgba(216, 255, 56, 0.3);
}

.simulate-button:hover::after {
  transform: translateX(120%);
}

.simulate-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.button-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--lime);
  background: var(--ink);
  font-size: 0.82rem;
}

.simulate-button span:last-child {
  display: block;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 1000;
  letter-spacing: 0.02em;
}

.simulate-button strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 1000;
  letter-spacing: 0.02em;
}

.simulate-button small {
  display: block;
  margin-bottom: 3px;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.seed-control {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 150px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.seed-control span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.seed-control input {
  width: 100%;
  margin-top: 5px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font-size: 1rem;
  font-weight: 800;
}

.seed-control input::placeholder {
  color: #7187a4;
}

.hero-meta {
  display: flex;
  gap: 40px;
  margin-top: 44px;
}

.hero-meta div {
  display: flex;
  flex-direction: column;
}

.hero-meta strong {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.hero-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  width: min(38vw, 510px);
  aspect-ratio: 1;
  border: 1px solid rgba(117, 214, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(32, 132, 255, 0.18), transparent 66%),
    repeating-radial-gradient(circle, transparent 0 42px, rgba(255,255,255,.025) 43px 44px);
}

.trophy {
  position: relative;
  z-index: 2;
  width: min(21vw, 260px);
  filter: drop-shadow(0 35px 55px rgba(0, 0, 0, 0.38));
  animation: float 5s ease-in-out infinite;
}

.trophy svg {
  display: block;
  width: 100%;
}

.trophy-glow {
  position: absolute;
  inset: 25% 10% 4%;
  z-index: -1;
  border-radius: 50%;
  background: #ffc63e;
  filter: blur(65px);
  opacity: 0.25;
}

.orbital {
  position: absolute;
  border: 1px solid rgba(216, 255, 56, 0.18);
  border-radius: 50%;
}

.orbital-a {
  width: 430px;
  height: 180px;
  transform: rotate(28deg);
}

.orbital-b {
  width: 270px;
  height: 490px;
  transform: rotate(54deg);
}

.host-badge {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--lime);
  background: rgba(6, 27, 56, 0.82);
  box-shadow: var(--shadow);
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.host-canada { top: 18%; right: 12%; }
.host-mexico { bottom: 18%; left: 8%; }
.host-usa { bottom: 10%; right: 10%; }

.dashboard-strip,
.probabilities-section,
.simulation-empty,
.story-header,
.champion-stage,
.phase-nav-wrap,
.groups-section,
.bracket-section,
.storylines-section {
  margin-right: 4vw;
  margin-left: 4vw;
}

.dashboard-strip {
  display: grid;
  grid-template-columns: minmax(230px, 0.38fr) 1fr;
  gap: 30px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(13, 45, 87, 0.85), rgba(6, 26, 55, 0.82));
  box-shadow: var(--shadow);
}

.strip-copy h2,
.section-heading h2,
.story-header h2,
.simulation-empty h2 {
  margin: 7px 0 0;
  font-size: clamp(1.65rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.favorites-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.favorite-card {
  position: relative;
  padding: 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.favorite-card::after {
  content: attr(data-rank);
  position: absolute;
  right: 5px;
  bottom: -12px;
  color: rgba(255, 255, 255, 0.04);
  font-size: 4.8rem;
  font-weight: 1000;
}

.favorite-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 900;
}

.flag {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 22px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.25rem;
  line-height: 1;
}

.favorite-probability {
  display: block;
  margin-top: 15px;
  color: var(--lime);
  font-size: 1.28rem;
  font-weight: 1000;
}

.favorite-bar {
  display: block;
  height: 3px;
  margin-top: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.favorite-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
}

.probabilities-section {
  padding-top: 88px;
}

.probabilities-heading {
  align-items: flex-end;
}

.probabilities-heading > div:first-child {
  max-width: 760px;
}

.probability-controls {
  display: flex;
  gap: 10px;
}

.probability-controls label {
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.probability-controls label:last-child {
  min-width: 150px;
}

.probability-controls span {
  color: var(--muted);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.probability-controls input,
.probability-controls select {
  width: 100%;
  margin-top: 5px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 800;
}

.probability-controls select {
  cursor: pointer;
}

.probability-controls option {
  color: var(--ink);
}

.group-quick-filters {
  display: flex;
  gap: 7px;
  margin: 0 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.group-quick-filters::-webkit-scrollbar {
  display: none;
}

.group-filter-button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  color: #839ab6;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-transform: uppercase;
}

.group-filter-button:hover,
.group-filter-button.active {
  color: var(--ink);
  border-color: var(--lime);
  background: var(--lime);
}

.probability-table-shell {
  max-height: 720px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(11, 42, 83, 0.88), rgba(5, 24, 51, 0.94));
  box-shadow: var(--shadow);
  overflow: auto;
}

.probability-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.probability-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.probability-table thead th {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #8da5c2;
  background: #071d3d;
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-align: right;
  text-transform: uppercase;
}

.probability-table thead th:nth-child(1),
.probability-table thead th:nth-child(2) {
  text-align: left;
}

.probability-table tbody tr {
  transition: background 160ms ease;
}

.probability-table tbody tr:hover {
  background: rgba(216, 255, 56, 0.045);
}

.probability-table tbody td,
.probability-table tbody th {
  height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.rank-cell {
  width: 62px;
  color: #718aa8;
  font-size: 0.68rem;
  font-weight: 1000;
}

.probability-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  text-align: left;
}

.probability-team > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.probability-team strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.probability-team small {
  margin-top: 3px;
  color: #7088a6;
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.probability-cell {
  position: relative;
  min-width: 88px;
  color: #c2d1e3;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: right;
}

.probability-cell.featured {
  min-width: 120px;
  color: var(--lime);
  background: rgba(216, 255, 56, 0.025);
  font-size: 0.85rem;
  font-weight: 1000;
}

.probability-cell.featured i {
  position: absolute;
  right: 14px;
  bottom: 7px;
  width: min(var(--probability), calc(100% - 28px));
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-bright), var(--lime));
}

.position-probability-column {
  color: var(--cyan) !important;
  background: #092448 !important;
}

.probability-loading td,
.probability-empty-row td {
  padding: 38px;
  color: var(--muted);
  text-align: center;
}

.probability-count {
  margin: 12px 4px 0;
  color: #738aa7;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}

.skeleton {
  position: relative;
  min-height: 90px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.08), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

.simulation-empty {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 30px;
  align-items: center;
  min-height: 250px;
  margin-top: 28px;
  margin-bottom: 60px;
  padding: 45px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.empty-number {
  color: var(--lime);
  font-size: 5.5rem;
  font-weight: 1000;
  letter-spacing: -0.1em;
}

.simulation-empty p,
.section-heading p {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.hidden {
  display: none !important;
}

.story-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 70px;
  padding: 0 4px 22px;
}

.story-id {
  text-align: right;
}

.story-id span {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.story-id strong {
  display: block;
  margin-top: 5px;
  color: var(--lime);
  font-size: 1.15rem;
}

.champion-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 28px;
  align-items: center;
  min-height: 390px;
  padding: clamp(30px, 5vw, 70px);
  border: 1px solid rgba(230, 189, 85, 0.28);
  border-radius: 32px;
  background:
    linear-gradient(130deg, rgba(11, 44, 88, 0.96), rgba(5, 23, 48, 0.95)),
    var(--navy);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.champion-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 23% 50%, rgba(230, 189, 85, 0.2), transparent 27%),
    linear-gradient(110deg, transparent 55%, rgba(22, 136, 255, 0.1));
}

.champion-rays {
  position: absolute;
  left: -70px;
  top: 50%;
  width: 420px;
  height: 420px;
  transform: translateY(-50%);
  background: repeating-conic-gradient(from 0deg, rgba(230,189,85,.06) 0 5deg, transparent 5deg 14deg);
  border-radius: 50%;
  animation: rotate 40s linear infinite;
}

.champion-copy,
.podium,
.story-stats {
  position: relative;
  z-index: 2;
}

.champion-label {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.22em;
}

.champion-flag {
  margin-top: 20px;
  font-size: 5.3rem;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.25));
}

.champion-copy h2 {
  margin: 4px 0 10px;
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.champion-copy p {
  color: #b3c5db;
}

.podium {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 250px;
}

.podium-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 31%;
  padding: 14px 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.podium-place.first {
  min-height: 220px;
  border-color: rgba(230, 189, 85, 0.35);
  background: linear-gradient(rgba(230, 189, 85, 0.16), rgba(255,255,255,.04));
}

.podium-place.second { min-height: 170px; }
.podium-place.third { min-height: 140px; }

.podium-place .podium-flag {
  font-size: 2.2rem;
}

.podium-place strong {
  max-width: 100%;
  margin-top: 8px;
  font-size: 0.67rem;
  text-align: center;
  text-transform: uppercase;
}

.podium-place span:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
}

.story-stats {
  display: grid;
  gap: 10px;
}

.story-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.story-stat span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-stat strong {
  color: var(--lime);
  font-size: 1.12rem;
}

.phase-nav-wrap {
  position: sticky;
  top: 76px;
  z-index: 30;
  margin-top: 28px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(6, 25, 53, 0.9);
  backdrop-filter: blur(18px);
}

.bracket-section .phase-nav-wrap {
  margin: 0 0 18px;
}

.phase-progress {
  height: 2px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.phase-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  transition: width 400ms ease;
}

.phase-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.phase-nav::-webkit-scrollbar {
  display: none;
}

.phase-button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.phase-button.active,
.phase-button:hover {
  color: var(--ink);
  background: var(--lime);
}

.groups-section,
.bracket-section,
.storylines-section {
  padding-top: 88px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px;
}

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

.group-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(11, 42, 83, 0.88), rgba(5, 24, 51, 0.9));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
}

.group-card.visible {
  animation: card-in 450ms forwards;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.group-title h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.group-title span {
  color: var(--lime);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.standings-head,
.standing-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px 28px 32px;
  gap: 6px;
  align-items: center;
}

.standings-head {
  padding: 10px 14px 7px;
  color: #6f88a7;
  font-size: 0.52rem;
  font-weight: 900;
  text-align: center;
}

.standings-head span:nth-child(2) {
  text-align: left;
}

.standing-row {
  position: relative;
  padding: 9px 14px;
  font-size: 0.7rem;
}

.standing-row::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.standing-row.qualified::before {
  background: var(--lime);
}

.standing-row.best-third::before {
  background: var(--cyan);
}

.position {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.standing-team {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 800;
}

.standing-team .flag {
  width: 23px;
  height: 18px;
  font-size: 1rem;
}

.standing-team span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-number {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.points {
  color: var(--lime);
  font-weight: 1000;
}

.group-matches-toggle {
  width: 100%;
  padding: 12px 15px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #95aac5;
  background: rgba(0, 0, 0, 0.1);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.group-match-list {
  display: none;
  padding: 5px 13px 13px;
  background: rgba(0, 0, 0, 0.09);
}

.group-card.open .group-match-list {
  display: block;
}

.mini-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.62rem;
}

.mini-match:last-child {
  border: 0;
}

.mini-team {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mini-team:last-child {
  justify-content: flex-end;
  text-align: right;
}

.mini-score {
  min-width: 38px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--lime);
  font-weight: 1000;
  text-align: center;
}

.bracket-shell {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(rgba(8, 32, 67, 0.78), rgba(5, 22, 47, 0.9)),
    radial-gradient(circle at 50% 20%, rgba(0, 132, 255, 0.18), transparent 45%);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: rgba(216, 255, 56, 0.45) rgba(255, 255, 255, 0.05);
}

.bracket {
  --bracket-track-height: 1660px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--bracket-column-count, 5), 286px);
  gap: 58px;
  align-items: start;
  width: max-content;
  padding-bottom: 8px;
}

.bracket-connections {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}

.bracket-connector {
  fill: none;
  stroke: rgba(121, 167, 220, 0.52);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.bracket-connector.third-place-connector {
  stroke: rgba(230, 189, 85, 0.58);
  stroke-dasharray: 5 5;
}

.bracket-connector.world-final-connector {
  stroke: rgba(255, 215, 92, 0.9);
  stroke-width: 2.7;
  filter: drop-shadow(0 0 4px rgba(255, 210, 72, 0.42));
}

.bracket-column {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: calc(var(--bracket-track-height) + 62px);
  padding: 0 9px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 1px solid rgba(255, 255, 255, 0.018);
  background: linear-gradient(rgba(255, 255, 255, 0.014), transparent 38%);
  transition: background 220ms ease;
}

.bracket-column-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 -9px 12px;
  padding: 11px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(5, 24, 51, 0.96);
  backdrop-filter: blur(12px);
}

.bracket-column.active {
  background: linear-gradient(rgba(216, 255, 56, 0.055), transparent 42%);
}

.bracket-column.active .bracket-column-header {
  border-color: rgba(216, 255, 56, 0.5);
  box-shadow: 0 0 0 1px rgba(216, 255, 56, 0.08);
}

.round-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(216, 255, 56, 0.2);
  border-radius: 9px;
  color: var(--lime);
  background: rgba(216, 255, 56, 0.06);
  font-size: 0.62rem;
  font-weight: 1000;
}

.round-title {
  display: flex;
  flex-direction: column;
}

.round-title small {
  color: #718ba9;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.round-title strong {
  margin-top: 2px;
  font-size: 0.86rem;
  letter-spacing: -0.025em;
}

.round-match-count {
  padding: 6px 7px;
  border-radius: 8px;
  color: #8fa7c3;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.46rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
}

.bracket-matches {
  position: relative;
  height: var(--bracket-track-height);
  flex: 0 0 var(--bracket-track-height);
}

.match-slot {
  position: absolute;
  left: 0;
  z-index: 3;
  width: 100%;
  transform: translateY(-50%);
}

.match-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  color: inherit;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.13);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-10px);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.match-card:hover,
.match-card:focus-visible {
  border-color: rgba(216, 255, 56, 0.42);
  background: rgba(216, 255, 56, 0.055);
  outline: none;
  transform: translateY(-2px);
}

.match-card.visible {
  animation: match-in 380ms forwards;
}

.match-meta {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  color: #7187a3;
  background: rgba(0, 0, 0, 0.14);
  font-size: 0.49rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.match-team-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.68rem;
  font-weight: 800;
}

.match-team-row.winner {
  color: var(--white);
  background: linear-gradient(90deg, rgba(216, 255, 56, 0.12), transparent);
}

.match-team-row.loser {
  color: #8095af;
}

.match-team-row .flag {
  width: 23px;
  height: 18px;
  font-size: 1rem;
}

.match-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  font-weight: 1000;
}

.match-team-row.winner .match-score {
  color: var(--ink);
  background: var(--lime);
}

.match-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 27px;
  padding: 7px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: #667f9d;
  background: rgba(0, 0, 0, 0.1);
  font-size: 0.5rem;
  font-weight: 800;
}

.match-card-footer strong {
  color: var(--lime);
  letter-spacing: 0.06em;
}

.penalty-tag {
  color: var(--gold);
  font-weight: 900;
}

.medal-round {
  background: linear-gradient(rgba(230, 189, 85, 0.055), transparent 42%);
}

.final-column .match-card {
  border-color: rgba(230, 189, 85, 0.35);
  background: linear-gradient(140deg, rgba(230,189,85,.12), rgba(255,255,255,.04));
}

.final-column .world-final-slot {
  z-index: 5;
}

.final-column .world-final-card {
  border: 2px solid rgba(255, 215, 92, 0.92);
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 224, 116, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(113, 79, 9, 0.42), rgba(10, 34, 67, 0.97) 62%);
  box-shadow:
    0 0 0 4px rgba(230, 189, 85, 0.08),
    0 18px 38px rgba(0, 0, 0, 0.3),
    0 0 28px rgba(230, 189, 85, 0.2);
}

.final-column .world-final-card::before {
  content: "";
  position: absolute;
  inset: 0 14px auto;
  z-index: 2;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, #ffe88d 25%, #dcae37 75%, transparent);
  box-shadow: 0 0 10px rgba(255, 224, 116, 0.65);
}

.final-column .world-final-card .match-meta {
  color: #f8da78;
  background: rgba(69, 43, 0, 0.38);
}

.final-column .world-final-card .match-meta span:first-child {
  font-size: 0.54rem;
  letter-spacing: 0.1em;
}

.final-column .world-final-card .match-team-row.winner {
  background: linear-gradient(90deg, rgba(230, 189, 85, 0.24), transparent);
}

.final-column .world-final-card .match-team-row.winner .match-score {
  color: #241900;
  background: linear-gradient(145deg, #fff1a5, #dcae37);
  box-shadow: 0 0 12px rgba(230, 189, 85, 0.32);
}

.final-column .world-final-card .match-card-footer {
  color: #c8a94f;
  background: rgba(69, 43, 0, 0.24);
}

.final-column .world-final-card .match-card-footer strong {
  color: #ffe88d;
}

.final-column .world-final-card:hover,
.final-column .world-final-card:focus-visible {
  border-color: #ffe88d;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 224, 116, 0.28), transparent 38%),
    linear-gradient(145deg, rgba(132, 92, 8, 0.5), rgba(10, 34, 67, 0.97) 62%);
  box-shadow:
    0 0 0 5px rgba(230, 189, 85, 0.11),
    0 20px 42px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(230, 189, 85, 0.3);
}

.final-column .round-index {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold);
}

.storyline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 90px;
}

.storyline-card {
  min-height: 215px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(11, 42, 83, 0.72), rgba(5, 24, 51, 0.86));
}

.storyline-card .storyline-number {
  color: var(--lime);
  font-size: 2.5rem;
  font-weight: 1000;
  letter-spacing: -0.06em;
}

.storyline-card h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
}

.storyline-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 38px 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #041229;
}

footer p {
  max-width: 700px;
  margin: 0;
  color: #6e85a2;
  font-size: 0.7rem;
  line-height: 1.6;
  text-align: right;
}

.footer-brand .mini {
  width: 30px;
  height: 32px;
  border: 2px solid var(--lime);
  border-radius: 8px 8px 4px 4px;
}

.modal-open {
  overflow: hidden;
}

.match-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 20px;
}

.match-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(1, 10, 24, 0.84);
  backdrop-filter: blur(12px);
  cursor: default;
}

.match-modal-panel {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 40px));
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(216, 255, 56, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0, rgba(22, 136, 255, 0.16), transparent 34%),
    #071b38;
  box-shadow: 0 35px 110px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.match-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.35rem;
  cursor: pointer;
}

.match-modal-header {
  padding-right: 40px;
}

.match-modal-header > span,
.modal-card-label {
  color: var(--lime);
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.match-modal-header h2 {
  margin: 8px 0 5px;
  font-size: clamp(1.75rem, 5vw, 3.1rem);
  letter-spacing: -0.055em;
}

.match-modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.modal-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 22px;
  align-items: center;
  margin: 28px 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.modal-score-team {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-width: 0;
  text-align: center;
}

.modal-team-flag {
  font-size: 3.2rem;
  filter: drop-shadow(0 9px 16px rgba(0, 0, 0, 0.25));
}

.modal-score-team strong {
  margin-top: 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.modal-score-team small {
  margin-top: 5px;
  color: #7890ad;
  font-size: 0.55rem;
}

.modal-score {
  text-align: center;
}

.modal-score > strong {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  letter-spacing: -0.08em;
}

.modal-score > strong span {
  color: var(--lime);
  font-size: 0.55em;
}

.modal-score small {
  display: block;
  max-width: 170px;
  margin-top: 6px;
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 900;
}

.match-modal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 13px;
}

.modal-data-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.12);
}

.modal-probability {
  margin-top: 15px;
}

.modal-probability > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #a8bad0;
  font-size: 0.65rem;
  font-weight: 800;
}

.modal-probability > div strong {
  color: var(--white);
}

.modal-probability > i {
  display: block;
  height: 5px;
  margin-top: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.modal-probability > i span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.modal-probability .team-a {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.modal-probability .draw {
  background: #8095af;
}

.modal-probability .team-b {
  background: linear-gradient(90deg, var(--gold), var(--lime));
}

.modal-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  font-size: 0.63rem;
}

.modal-stat-row:last-child {
  border-bottom: 0;
}

.modal-stat-row span {
  color: var(--muted);
}

.modal-stat-row strong {
  max-width: 58%;
  text-align: right;
}

.simulation-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background:
    radial-gradient(circle at center, rgba(12, 84, 166, 0.35), transparent 38%),
    rgba(3, 15, 34, 0.98);
}

.overlay-grid {
  position: absolute;
  inset: 0;
  opacity: 0.23;
  background:
    linear-gradient(rgba(70, 143, 222, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 143, 222, 0.14) 1px, transparent 1px);
  background-size: 45px 45px;
  mask-image: radial-gradient(circle, black, transparent 72%);
}

.tournament-loader {
  position: relative;
  z-index: 1;
  width: min(780px, 92vw);
  margin-bottom: 28px;
}

.loader-trophy-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 128px;
}

.loader-trophy-glow {
  position: absolute;
  top: 8px;
  width: 110px;
  height: 86px;
  border-radius: 50%;
  background: rgba(216, 255, 56, 0.13);
  filter: blur(22px);
  animation: loader-glow 1.8s ease-in-out infinite;
}

.loader-trophy {
  position: relative;
  width: 72px;
  height: 84px;
  overflow: visible;
  fill: rgba(216, 255, 56, 0.06);
  stroke: var(--lime);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 12px rgba(216, 255, 56, 0.28));
  animation: trophy-float 1.8s ease-in-out infinite;
  transition: fill 350ms ease, stroke 350ms ease, filter 350ms ease;
}

.loader-live {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
  color: #8ca5c2;
  font-size: 0.49rem;
  font-weight: 1000;
  letter-spacing: 0.18em;
}

.loader-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 9px rgba(216, 255, 56, 0.8);
  animation: loader-live 1s ease-in-out infinite;
}

.loader-journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(46px, 1fr));
  align-items: start;
  padding-top: 2px;
}

.loader-journey-line {
  position: absolute;
  top: 19px;
  right: calc(100% / 14);
  left: calc(100% / 14);
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.loader-journey-line span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  box-shadow: 0 0 12px rgba(216, 255, 56, 0.42);
  transition: width 380ms ease;
}

.loader-round {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #58718f;
  transition: color 250ms ease, transform 250ms ease;
}

.loader-round > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #294766;
  border-radius: 11px;
  background: #071d3b;
  box-shadow: 0 0 0 5px rgba(3, 15, 34, 0.94);
  font-size: 0.55rem;
  font-weight: 1000;
  transition: inherit;
}

.loader-round small {
  margin-top: 10px;
  font-size: 0.43rem;
  font-weight: 1000;
  letter-spacing: 0.09em;
}

.loader-round.completed {
  color: #9bc6dd;
}

.loader-round.completed > span {
  color: #09213e;
  border-color: var(--cyan);
  background: var(--cyan);
}

.loader-round.active {
  color: var(--lime);
  transform: translateY(-3px);
}

.loader-round.active > span {
  color: var(--ink);
  border-color: var(--lime);
  background: var(--lime);
  box-shadow:
    0 0 0 5px rgba(3, 15, 34, 0.94),
    0 0 22px rgba(216, 255, 56, 0.48);
  animation: loader-stage-pulse 1.1s ease-in-out infinite;
}

.tournament-loader.complete .loader-trophy {
  fill: rgba(255, 222, 105, 0.3);
  stroke: #ffe475;
  filter: drop-shadow(0 0 18px rgba(255, 218, 91, 0.65));
}

.tournament-loader.complete .loader-trophy-glow {
  background: rgba(255, 218, 91, 0.3);
}

.tournament-loader.complete .loader-live {
  color: #ffe475;
}

.tournament-loader.complete .loader-live i {
  background: #ffe475;
  box-shadow: 0 0 12px rgba(255, 218, 91, 0.9);
}

.overlay-kicker {
  position: relative;
  color: var(--lime);
  font-size: 0.62rem;
  font-weight: 1000;
  letter-spacing: 0.22em;
}

.simulation-overlay h2 {
  position: relative;
  margin: 12px 0 7px;
  font-size: clamp(2rem, 6vw, 4.7rem);
  letter-spacing: -0.06em;
  text-align: center;
  text-transform: uppercase;
}

.simulation-overlay p {
  position: relative;
  color: var(--muted);
}

.overlay-progress {
  position: relative;
  width: min(500px, 80vw);
  height: 4px;
  margin-top: 25px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.overlay-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  transition: width 300ms ease;
}

#overlayPercent {
  position: relative;
  margin-top: 10px;
  color: var(--lime);
  font-size: 0.76rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  max-width: 380px;
  padding: 15px 18px;
  border: 1px solid rgba(255, 96, 96, 0.3);
  border-radius: 12px;
  color: #ffd0d0;
  background: rgba(56, 11, 25, 0.96);
  box-shadow: var(--shadow);
  font-size: 0.8rem;
}

@keyframes pulse {
  50% { opacity: 0.45; }
}

@keyframes float {
  50% { transform: translateY(-15px) rotate(1deg); }
}

@keyframes rotate {
  to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes match-in {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes trophy-float {
  50% { transform: translateY(-7px); }
}

@keyframes loader-glow {
  50% { opacity: 0.48; transform: scale(1.12); }
}

@keyframes loader-live {
  50% { opacity: 0.32; }
}

@keyframes loader-stage-pulse {
  50% {
    box-shadow:
      0 0 0 5px rgba(3, 15, 34, 0.94),
      0 0 30px rgba(216, 255, 56, 0.68);
  }
}

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

  .hero-copy {
    position: relative;
    z-index: 4;
  }

  .hero-visual {
    position: absolute;
    right: -8%;
    bottom: -4%;
    width: 50%;
    opacity: 0.45;
  }

  .dashboard-strip {
    grid-template-columns: 1fr;
  }

  .groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .champion-stage {
    grid-template-columns: 1fr 1fr;
  }

  .story-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 66px;
    padding: 0 18px;
  }

  .nav-links {
    display: none;
  }

  .model-live span:last-child {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .language-toggle {
    min-height: 34px;
    padding: 6px 10px;
  }

  .hero {
    min-height: 650px;
    padding: 80px 22px 45px;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 17vw, 5.5rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .simulate-button,
  .seed-control {
    width: 100%;
  }

  .hero-meta {
    gap: 24px;
  }

  .hero-visual {
    right: -20%;
    width: 72%;
  }

  .dashboard-strip,
  .probabilities-section,
  .simulation-empty,
  .story-header,
  .champion-stage,
  .phase-nav-wrap,
  .groups-section,
  .bracket-section,
  .storylines-section {
    margin-right: 14px;
    margin-left: 14px;
  }

  .favorites-track {
    grid-template-columns: repeat(5, 150px);
    overflow-x: auto;
  }

  .probability-controls {
    width: 100%;
    flex-direction: column;
  }

  .probability-controls label,
  .probability-controls label:last-child {
    width: 100%;
    min-width: 0;
  }

  .probability-table-shell {
    max-height: 640px;
    border-radius: 15px;
  }

  .simulation-empty {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .story-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .story-id {
    text-align: left;
  }

  .champion-stage {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .story-stats {
    grid-column: auto;
    grid-template-columns: 1fr;
    text-align: left;
  }

  .groups-grid,
  .storyline-grid {
    grid-template-columns: 1fr;
  }

  .bracket-shell {
    padding: 10px;
  }

  .bracket {
    grid-template-columns: repeat(var(--bracket-column-count, 5), 250px);
    gap: 42px;
  }

  .bracket-connector {
    stroke-width: 1.35;
  }

  .bracket-column {
    padding: 0 7px 8px;
  }

  .bracket-column-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .round-match-count {
    display: none;
  }

  .match-team-row {
    grid-template-columns: 24px minmax(0, 1fr) 30px;
  }

  .match-modal-grid {
    grid-template-columns: 1fr;
  }

  .tournament-loader {
    width: 96vw;
  }

  .loader-round > span {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    box-shadow: 0 0 0 3px rgba(3, 15, 34, 0.94);
  }

  .loader-journey-line {
    top: 15px;
  }

  .loader-round small {
    max-width: 48px;
    font-size: 0.35rem;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .modal-scoreboard {
    gap: 10px;
    padding: 18px 10px;
  }

  .modal-team-flag {
    font-size: 2.35rem;
  }

  .phase-nav-wrap {
    top: 66px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  footer p {
    text-align: left;
  }
}

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