
:root {
  --linecolor: #000;
  --thickness: 3px;
  --match-bg: #fff;
  --match-col: #000;
}



section {
  position: relative;
  padding: 20px;
  transform: scale(0.9);
}

.tournament-logo {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: absolute;
  top: -9%; left: 0; right: 0;
  z-index: 999;
}

.logo {
  text-align: center;
  animation: popIn 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.logo img {
  width: 100%;
  max-width: 250px;
  height: auto;
}


.division {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: absolute;
  bottom: 7%; left: 2%; right: 0;
  z-index: 999;
}

.division span {
  font: normal 400 40px Roboto-Black;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  animation: fadeIn 1.5s ease-in-out forwards;

}



.tournament {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 0 auto; 
  margin-left: -10px;
}


.tournament .round {
  font-size: .75em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 200px;
  list-style: none;
  padding: 0;
}

.tournament .round .spacer { flex-grow: 2; }
.tournament .round .spacer:first-child,
.tournament .round .spacer:last-child { flex-grow: 1; }

body[data-top="2"] .tournament .round .spacer { height: 330px; }
body[data-top="2"] .tournament .round {  width: 300px; }
body[data-top="2"] li.game-top, body[data-top="2"] li.game-bottom { 
  font: normal 400 22px Roboto-Black; padding: 12px 3px 6px 3px; }

body[data-top="4"] .tournament .round .spacer { height: 200px; }
body[data-top="4"] .tournament .round {  width: 250px; }
body[data-top="4"] li.game-top, body[data-top="4"] li.game-bottom { 
  font: normal 400 18px Roboto-Black; padding: 12px 3px 6px 3px; }

body[data-top="8"] .tournament .round .spacer { height: 100px; }
body[data-top="8"] .tournament .round {  width: 210px; }
body[data-top="8"] li.game-top, body[data-top="8"] li.game-bottom { 
  font: normal 400 18px Roboto-Black; padding: 12px 3px 6px 3px; }

body[data-top="16"] .tournament .round .spacer { height: 46px; }
body[data-top="16"] .tournament .round {  width: 200px; }
body[data-top="16"] li.game-top, body[data-top="16"] li.game-bottom { 
  font: normal 400 16px Roboto-Black; padding: 8px 3px 3px 3px; }



.tournament-header {
  font: normal 400 24px Roboto-Black;
  text-transform: uppercase;
  text-align: center;
  border-radius: 1em;
  background: #111;
  color: #ddd;
  animation: popIn 0.9s ease-out forwards;
}


.first-four-winner li.game-left,
.first-four-winner li.game-right,
.top32 li.game-left, .top32 li.game-right,
.top16 li.game-left, .top16 li.game-right,
.top8 li.game-left, .top8 li.game-right,
.round-4 li.game-left, .round-4 li.game-right,
.semi-final li.game-left, .semi-final li.game-right, .final   {
  display: inline-block;
  transform-origin: left; 
  transform: rotateX(-90deg);
  animation: flipDown 0.9s ease-in-out forwards;
  opacity: 0;
  padding-left: 0.7em;
}


.region {
    font-size: 1.5em;
    font-weight:bold;
}
.region-right {
    text-align:right;
  padding-right: 5px;
}
.region-left {
    text-align:left;
  padding-left: 5px;
}


li.game-top, li.game-bottom {  
  background: var(--match-bg);
  color: var(--match-col);
  font: normal 400 14px Roboto-Black;
  text-transform: uppercase;
  text-align: center;
  padding: 5px 3px 3px 3px;
  border: 2px solid #111; 
  margin-left: 10px;
  z-index:99;
}

li.red-corner { background: #ED1B24; color: #fff; }
li.blue-corner { background: #0058A8; color: #fff;  }


li.game-right {
  border-left: 2px solid #000;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}


li.game-left {
  border-right: var(--thickness) solid var(--linecolor);
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}


li.game-left.spacer {
    border-right: var(--thickness) solid var(--linecolor);
    min-height: 5px;
    padding-right:.25em;
}

li.game-right.spacer {
  border-left: var(--thickness) solid var(--linecolor);
  min-height: 5px;
  padding-left:.25em;
  margin-left: 11px;
}


li.game-left.spacer::after {
  content: "";
  position: absolute;
  top: 50%; right: -20px; 
  width: 20px; height: calc(var(--thickness) - 1px); 
  background: var(--linecolor); 
  transform: translateY(-50%);
}

li.game-right.spacer::before {
  content: "";
  position: absolute;
  top: 50%; left: -20px;
  width: 20px; height: calc(var(--thickness) - 1px);
  background: var(--linecolor);
  transform: translateY(-50%);
}

.final {
  font: normal 700 22px Roboto-Black;
  background: gold;
  text-align: center;
  border: 2px solid #111;
  border-radius: 4px; 
  padding: 15px 4px 4px 4px;
  margin: -120px 0 0 10px;
}



@keyframes flipDown {
  0%     { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

@keyframes popIn {
  0% {
    transform: scale(0.3); /* Start small */
    opacity: 0; /* Start with no opacity */
  }
  50% {
    transform: scale(1.1); /* Slightly grow the logo */
    opacity: 1; /* Full opacity */
  }
  100% {
    transform: scale(1); /* Final size */
    opacity: 1; /* Full opacity */
  }
}



@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }





