:root {
  --bg-color: #111;
  --card-bg: #252525;
  --text-main: #eee;
  --border-color: #807c7c;
  --highlight: #00e676;
  --line-color: #807c7c;
  --line-width: 2px;
  
  --match-width: 190px;
  --match-height: 80px;
  
  --team-gap: 20px; 
}
.match-time {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #ccc;
  padding: 2px 6px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  width: fit-content;
  background: rgba(255,255,255,0.05); 
}
  

* { box-sizing: border-box; margin: 0; padding: 0; }

  /* body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px;
  } */

.scroll-wrapper {
  overflow-x: auto;
  padding: 20px;
}

.bracket {
  display: flex;
  flex-direction: row;
  align-items: center; 
  gap: 50px;
}

.round {
  display: flex;
  flex-direction: column;
  justify-content: center; 
  gap: 20px; 
}


.round-1 {
  --team-gap: 20px;
  gap: 20px; 
}

.round-2 {
  --team-gap: 120px; 
  gap: 120px;
}

.round-3 {
  --team-gap: 320px;
}


.match-pair {
  display: flex;
  flex-direction: column;
  
  gap: var(--team-gap); 
  position: relative;
  margin: 0; 
}

.match {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: var(--match-width);
  height: var(--match-height);
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: 0.2s;
}

.match:hover {
  border-color: var(--highlight);
  transform: scale(1.02);
  z-index: 5;
}

.team {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 3px 0;
}

.match .team:first-child {
  border-bottom: 1px solid #fffdfd;
  margin-bottom: 3px;
  padding-bottom: 3px;
}

.team.winner { color: var(--highlight); font-weight: bold; }
.score { font-family: monospace; font-size: 1.1em; }

.match-pair::after {
  content: '';
  position: absolute;
  border-right: var(--line-width) solid var(--line-color);
  border-top: var(--line-width) solid var(--line-color);
  border-bottom: var(--line-width) solid var(--line-color);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  width: 25px; 
  right: -25px;
  
  top: calc(var(--match-height) / 2);
  
  height: calc(var(--match-height) + var(--team-gap));
  z-index: 1;
}

.round:last-child .match-pair::after {
  display: none;
}

.match::before {
  content: '';
  position: absolute;
  background: var(--line-color);
  height: var(--line-width);
  width: 25px;
  left: -25px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.round-1 .match::before {
  display: none;
}

.winner-cup {
  border-color: #ffd700 !important;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15) !important;
}