/* MLS playoff bracket — fixed 3000x1800 canvas (3 panels of 1000px). */
:root {
  --font: "Oswald", "Bebas Neue", "Barlow Condensed", "Roboto Condensed", "Arial Narrow",
          "Liberation Sans Narrow", "Nimbus Sans Narrow", "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  font-family: var(--font);
  font-stretch: condensed;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 3000px;
  height: 1800px;
  overflow: hidden;
  transform-origin: 0 0;
  background: #05070d;
}

/* ---------- background ---------- */
.bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 700px at 50% 52%, rgba(70, 90, 130, .45), transparent 70%),
    radial-gradient(ellipse 1800px 1000px at 50% 30%, #18203a 0%, #0a0e1c 50%, #03050a 100%);
}

.streak {
  position: absolute;
  left: -700px;
  width: 4400px;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.streak.s1 {
  top: 760px;
  height: 300px;
  transform: rotate(9deg);
  filter: blur(34px);
  opacity: .62;
  background: linear-gradient(180deg,
    transparent 0%, #ff2d55 22%, #ff9500 36%, #ffd60a 47%,
    #34c759 58%, #0a84ff 72%, #5e5ce6 84%, transparent 100%);
}

.streak.s2 {
  top: 860px;
  height: 60px;
  transform: rotate(9deg);
  filter: blur(14px);
  opacity: .55;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .9), transparent);
}

.streak.s3 {
  top: 380px;
  height: 220px;
  transform: rotate(-16deg);
  filter: blur(50px);
  opacity: .35;
  background: linear-gradient(180deg,
    transparent 0%, #0a84ff 30%, #64d2ff 50%, #bf5af2 70%, transparent 100%);
}

.glow {
  position: absolute;
  left: 900px;
  top: 380px;
  width: 1200px;
  height: 1200px;
  background: radial-gradient(circle, rgba(255, 255, 255, .22) 0%, rgba(160, 190, 255, .08) 35%, transparent 65%);
}

.floor {
  position: absolute;
  left: 0;
  right: 0;
  top: 1540px;
  bottom: 0;
  background:
    radial-gradient(ellipse 700px 90px at 50% 70px, rgba(255, 255, 255, .22), transparent 70%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, .55));
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 1800px 1100px at 50% 50%, transparent 55%, rgba(0, 0, 0, .7) 100%);
}

/* ---------- bracket lines ---------- */
#lines {
  position: absolute;
  left: 0;
  top: 0;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, .35));
}

#lines path {
  fill: none;
  stroke: rgba(255, 255, 255, .92);
  stroke-width: 4;
  stroke-linejoin: miter;
}

/* ---------- conference columns ---------- */
.conf {
  position: absolute;
  left: 0;
  top: 0;
  width: 3000px;
  height: 1800px;
}

.conf-head {
  position: absolute;
  top: 46px;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 3px 12px rgba(0, 0, 0, .8);
}

.west .conf-head { left: 44px; }
.east .conf-head { right: 44px; }

.card {
  position: absolute;
  width: 520px;
  height: 150px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c, #333);
  color: var(--t, #fff);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .65), inset 0 0 0 2px rgba(255, 255, 255, .22);
  transition: opacity .6s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .22) 100%);
  pointer-events: none;
}

.card.out { opacity: .38; }

.crestbox {
  position: absolute;
  left: 0;
  top: 0;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .28);
}

.crestbox svg,
.crestbox img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
}

.seed {
  position: absolute;
  left: 162px;
  top: 16px;
  width: 50px;
  height: 58px;
  background: #fff;
  color: #0b1020;
  font-size: 44px;
  font-weight: 700;
  line-height: 58px;
  text-align: center;
  border-radius: 3px;
}

.name,
.pts {
  position: absolute;
  left: 228px;
  right: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: var(--ts, 0 2px 4px rgba(0, 0, 0, .45));
}

.name { top: 18px; font-size: 50px; }
.pts { top: 84px; font-size: 38px; opacity: .95; }

.card.dark { --ts: none; }

/* wild card side label */
.wclabel {
  position: absolute;
  width: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wclabel span {
  display: block;
  white-space: nowrap;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 2px;
  transform: rotate(-90deg);
}

.east .wclabel span { transform: rotate(90deg); }

/* winner badges on bracket nodes */
.badge {
  position: absolute;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: var(--c, #222);
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .6);
}

.badge svg,
.badge img { width: 52px; height: 52px; object-fit: contain; }

/* ---------- centre panel ---------- */
.center {
  position: absolute;
  left: 1000px;
  top: 0;
  width: 1000px;
  height: 1800px;
}

.title {
  position: absolute;
  left: 0;
  right: 0;
  top: 36px;
  text-align: center;
  text-shadow: 0 6px 24px rgba(0, 0, 0, .7);
}

.t1, .t2 {
  width: 840px;
  margin: 0 auto;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 800;
  line-height: 1.02;
  text-transform: uppercase;
}

.t1 { font-size: 168px; letter-spacing: 2px; }

.t2 {
  font-size: 196px;
  font-style: italic;
  letter-spacing: 4px;
  transform: skewX(-6deg);
  padding: 0 24px;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 55%, #d7dde6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .7));
  text-shadow: none;
}

.brand {
  position: absolute;
  left: 0;
  right: 0;
  top: 440px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.mls-shield { width: 112px; height: 134px; }
.mls-shield text { font-family: var(--font); }

.divider {
  width: 3px;
  height: 130px;
  background: rgba(255, 255, 255, .85);
}

.cupmark {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rings { width: 210px; height: 66px; }

.cuptext span {
  display: block;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 1px;
  white-space: nowrap;
}

.trophy {
  position: absolute;
  left: 188px;
  top: 570px;
  width: 624px;
  height: 1040px;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .7));
}

.trophy svg { width: 100%; height: 100%; display: block; }
.trophy text { font-family: var(--font); }

/* centre wild card boxes */
.wcmini {
  position: absolute;
  left: 60px;
  top: 1420px;
  width: 210px;
}

.wcmini.right { left: auto; right: 60px; }

.wcmini .lbl {
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}

.mini {
  position: relative;
  height: 136px;
  margin-bottom: 8px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--c, #333);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 255, 255, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s;
}

.mini.out { opacity: .38; }

.mini svg,
.mini img { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }

.mini .seed {
  left: 10px;
  top: 10px;
  width: 40px;
  height: 46px;
  font-size: 34px;
  line-height: 46px;
}

/* champion plate */
.champ {
  position: absolute;
  left: 290px;
  width: 420px;
  top: 1640px;
  text-align: center;
  display: none;
}

.champ.show { display: block; }

.champ .k {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f7dc8a;
  white-space: nowrap;
}

.champ .v {
  width: 420px;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-shadow: 0 4px 16px rgba(0, 0, 0, .8);
}

/* panel guides (?guides=1) */
.guide {
  position: absolute;
  top: 0;
  width: 0;
  height: 1800px;
  border-left: 3px dashed rgba(255, 0, 0, .8);
  z-index: 99;
}
