body {
  margin: 0;
  padding: 0;
  background-color: #000;
  background-image: url('assets/22.webp');
  background-size: auto;
  background-position: top;
  color: white;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

.bracket-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 24px;
}

.page-bottom-spacer {
  width: 100%;
  margin-top: 206px;
  height: 88px;
}

.header-titles {
  text-align: center;
  margin-bottom: 10px;
  z-index: 10;
}

.bracket-scroll {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 1180px;
}

.mobile-swipe-hint {
  display: none;
}

.grand-prix-img {
  max-width: 600px;
  display: block;
  margin: 0 auto 10px;
}

.heavyweight-title {
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  font-size: 65px;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.tournament-title {
  font-family: 'Antonio', sans-serif;
  font-weight: 300;
  font-size: 30px;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 5px;
}

.bracket-grid {
  position: relative;
  display: grid;
  grid-template-columns: 130px 130px 130px 155px 130px 130px 130px;
  gap: 20px;
  width: 100%;
  max-width: 1055px;
  min-height: 1120px;
  flex-grow: 1;
  margin-top: 10px;
  margin-bottom: 42px;
  left: -11px;
}

.col {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.col-4-center {
  position: relative;
  width: 100%;
  height: 100%;
}

#col-2 {
  transform: translateX(50px);
}

#col-3 {
  transform: translateX(-20px);
}

#col-5 {
  transform: translateX(25px);
}

#col-6 {
  transform: translateX(-50px);
}

/* SVG Connectors */
.connectors {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.connector-line {
  fill: none;
  stroke: #ee0a05;
  stroke-width: 2.5px;
}

.fighter-box {
  width: 158px;
  height: 58px;
  background: black;
  border: 2px solid #ee0a05;
  border-radius: 29px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  /* For absolute positioning by Y */
  z-index: 2;
  box-sizing: border-box;

  line-height: 0.95;
  font-size: 20px;
  padding: 0;
}

.fighter-first {
  font-weight: 400;
}

.fighter-last {
  font-weight: 700;
}

#center-block {
  position: absolute;
  left: calc(50% + 4px);
  transform: translateX(-50%);
  width: 360px;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.center-trophy-block {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.trophy {
  width: 198px;
  height: auto;
  margin-bottom: -18px;
  /* Pull the winner box precisely under the word WINNER on the trophy image */
  z-index: 5;
}

.winner-box {
  position: relative;
  /* Override absolute so it flows in flex */
  left: auto;
  transform: none;
  font-family: 'Poppins', sans-serif;
  font-size: 34px;
  text-transform: uppercase;
  line-height: 0.95;
  margin-top: -28px;
  margin-bottom: 42px;
  width: 215px;
  height: 84px;
  border-width: 2px;
  border-radius: 22px;
  border-color: #ffac24;
  color: #ffac24;
  z-index: 5;
}

.final-fighters-container {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: space-between;
  width: 339px;
  pointer-events: auto;
}

.final-box-left {
  position: relative;
  left: auto;
  transform: none;
}

.final-box-right {
  position: relative;
  left: auto;
  transform: none;
}

.heavyweight-final-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  white-space: nowrap;
  color: #ee0a05;
  margin-top: 6px;
  letter-spacing: 1px;
}

/* Base Spacing for mobile */
@media (max-width: 900px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .bracket-container {
    width: 100%;
    box-sizing: border-box;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 22px;
    padding-bottom: 20px;
  }

  .page-bottom-spacer {
    margin-top: 140px;
    height: 40px;
  }

  .header-titles {
    margin-bottom: 16px;
  }

  .bracket-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    min-height: 1180px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .mobile-swipe-hint {
    display: block;
    margin: 8px 0 0;
    font-size: 13px;
    letter-spacing: 0.4px;
    color: #d7d7d7;
    text-align: center;
  }

  .grand-prix-img {
    max-width: min(86vw, 390px);
    margin: 0 auto 6px;
  }

  .heavyweight-title {
    font-size: clamp(34px, 9.5vw, 46px);
    letter-spacing: 1px;
  }

  .tournament-title {
    font-size: clamp(15px, 4.2vw, 20px);
    letter-spacing: 3px;
  }

  .bracket-grid {
    --mobile-bracket-scale: 0.9;
    width: 1055px;
    max-width: none;
    padding-left: 28px;
    padding-right: 28px;
    box-sizing: content-box;
    left: 0;
    margin-top: 10px;
    margin-bottom: 24px;
    flex: 0 0 auto;
    transform-origin: top left;
    transform: scale(var(--mobile-bracket-scale));
  }

  .fighter-box {
    width: 146px;
    height: 52px;
    border-radius: 26px;
    font-size: 16px;
    line-height: 0.95;
  }

  .trophy {
    width: 164px;
    margin-bottom: -12px;
  }

  .winner-box {
    width: 184px;
    height: 72px;
    font-size: 16px;
    margin-top: -20px;
    margin-bottom: 26px;
    border-radius: 18px;
    line-height: 0.95;
  }

  .final-fighters-container {
    width: 304px;
  }

  .final-box-left,
  .final-box-right {
    width: 136px;
    height: 50px;
    border-radius: 24px;
  }
}
@media (max-width: 767px) {
  .heavyweight-final-label {
    position: absolute;
    left: 48%;
    transform: translateX(-50%);
    font-family: 'Antonio', sans-serif;
    font-weight: 700;
    font-size: 27px;
    line-height: 1;
    white-space: nowrap;
    color: #ee0a05;
    margin-top: 6px;
    letter-spacing: 1px;
  }
}