.gbv2-view-switch {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.gbv2-view-switch .gbv2-btn {
  border: 1px solid #c9d1d9;
  background: #fff;
  color: #1f2a37;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.gbv2-view-switch .gbv2-btn.active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.gbv2-bracket-wrap {
  overflow-x: auto;
  padding-bottom: 12px;
}

.bracket-viewport {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: min(78vh, 920px);
  max-height: min(78vh, 920px);
  position: relative;
  outline: none;
}

.bracket-viewport:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(13, 110, 253, 0.45);
}

.bracket-zoom-scroll {
  overflow: auto;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.bracket-zoom-toolbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin: 0 0 8px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
  flex-shrink: 0;
}

.bracket-zoom-toolbar .btn {
  line-height: 1.1;
  min-width: 2rem;
}

.bracket-zoom-label {
  min-width: 3.2rem;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  padding: 0 4px;
  user-select: none;
}

.bracket-zoom-spacer {
  display: inline-block;
  vertical-align: top;
  line-height: 0;
  min-width: min-content;
}

.bracket-zoom-wrapper {
  transform-origin: top left;
  display: inline-block;
  line-height: normal;
  vertical-align: top;
}

.bracket-zoom-wrapper .gbv2-bracket-wrap {
  overflow: visible;
  padding-bottom: 12px;
}

.gbv2-rounds {
  position: relative;
  min-height: 200px;
}

.gbv2-round {
  position: absolute;
  top: 0;
  width: 260px;
}

.gbv2-round-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #3c4a57;
}

.gbv2-match {
  position: absolute;
  width: 248px;
  height: 152px;
  background: #fff;
  border: 1px solid #d8dee4;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.06);
  z-index: 2;
  box-sizing: border-box;
  overflow: hidden;
}

.gbv2-match-bye {
  border-style: dashed;
  background: #f8fafc;
}

.gbv2-match-meta {
  padding: 7px 10px 6px;
  border-bottom: 1px solid #eef2f6;
  font-size: 11px;
  color: #5f6b7a;
  line-height: 1;
}

.gbv2-match-meta.gbv2-fight-no {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  background: #dbeafe;
  border-bottom-color: #bfdbfe;
}

.gbv2-fight-no-label {
  flex: 1;
  min-width: 0;
}

.gbv2-video-link {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.gbv2-video-link .fa {
  margin-right: 2px;
}

.gbv2-match-finished {
  cursor: pointer;
}

.gbv2-match-finished.is-result-open,
.gbv2-rr-card.gbv2-match-finished.is-result-open {
  z-index: 50;
  height: auto;
  min-height: 152px;
  overflow: visible;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.gbv2-result-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  color: #1d4ed8;
  cursor: pointer;
  border: 0;
  padding: 2px 6px;
  background: rgba(29, 78, 216, 0.1);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.gbv2-result-label {
  letter-spacing: 0.02em;
}

.gbv2-result-info:hover,
.gbv2-result-info:focus-visible,
.gbv2-match-finished.is-result-open .gbv2-result-info {
  background: rgba(29, 78, 216, 0.2);
  outline: none;
}

.gbv2-result-popover {
  display: none;
  border-top: 1px solid #dbeafe;
  background: #f8fafc;
}

.gbv2-match-finished.is-result-open .gbv2-result-popover,
.gbv2-rr-card.gbv2-match-finished.is-result-open .gbv2-result-popover {
  display: block;
}

.gbv2-result-popover .gbv2-result-panel {
  position: relative;
}

.gbv2-result-panel {
  display: block;
  background: #fff;
  border: 1px solid #d8dee4;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  text-align: left;
  color: #111827;
}

.gbv2-result-time {
  display: block;
  padding: 6px 10px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f6;
}

.gbv2-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #eef2f6;
}

.gbv2-result-row:first-of-type {
  border-top: 0;
}

.gbv2-result-row.is-winner {
  background: #ecfdf3;
}

.gbv2-result-row-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.gbv2-result-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gbv2-result-row-text strong,
.gbv2-result-row-text em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
}

.gbv2-result-row-text em {
  font-size: 10px;
  color: #64748b;
}

.gbv2-result-scores {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.gbv2-result-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.gbv2-result-score--pts {
  background: #0f9d58;
}

.gbv2-result-score--adv {
  background: #eab308;
  color: #1f2937;
}

.gbv2-result-score--pen {
  background: #dc2626;
}

.gbv2-result-submission {
  display: block;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #c2410c;
  background: #fff7ed;
  border-top: 1px solid #fed7aa;
}

.gbv2-result-submission a {
  margin-left: 6px;
  color: #dc2626;
}

.gbv2-match-no-meta .gbv2-match-lines {
  height: 100%;
}

.gbv2-match-lines {
  display: grid;
  grid-template-rows: 1fr 1fr;
  height: calc(100% - 28px);
}

.gbv2-line {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 6px;
  padding: 5px 8px 5px 12px;
  border-top: 1px solid #f4f6f8;
  min-height: 58px;
  color: #111827;
}

.gbv2-line:first-child {
  border-top: 0;
}

.gbv2-line-main {
  display: grid;
  grid-template-columns: 16px 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.gbv2-flag {
  grid-row: 1 / 3;
  margin-top: 2px;
}

.gbv2-name {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gbv2-team {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.25;
  color: #374151;
  word-break: break-word;
}

.gbv2-winner {
  background: #dff7e8;
}

.gbv2-winner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #0f9d58;
}

.gbv2-line-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
}

.gbv2-advance {
  color: #0b8f3f;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
}

.gbv2-winner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 11px;
  color: #065f46;
  background: #bbf7d0;
  border: 1px solid #86efac;
  border-radius: 999px;
}

.gbv2-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.gbv2-connector {
  stroke: #94a3b8;
  stroke-width: 1.5;
  fill: none;
}

.gbv2-bronze-wrap {
  margin-top: 14px;
}

.gbv2-bronze-card {
  max-width: 248px;
}

.gbv2-match-standalone {
  position: relative;
  top: auto;
  left: auto;
}

.gbv2-rr-wrap {
  display: grid;
  gap: 16px;
}

.gbv2-pool {
  background: #fff;
  border: 1px solid #d8dee4;
  border-radius: 10px;
  padding: 12px;
}

.gbv2-pool-title {
  margin: 0 0 10px;
}

.gbv2-rr-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

.gbv2-rr-matches {
  display: grid;
  gap: 10px;
}

.gbv2-rr-card {
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: 8px 10px;
}

.gbv2-rr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: #677285;
  margin-bottom: 4px;
  position: relative;
}

.gbv2-rr-card.gbv2-match-finished.is-result-open {
  position: relative;
  z-index: 40;
}

.gbv2-rr-head span:first-child {
  font-weight: 700;
  color: #1e3a8a;
}

.gbv2-status {
  font-weight: 600;
}

.gbv2-rr-row {
  font-size: 14px;
}

.gbv2-rr-winner {
  margin-top: 6px;
  font-size: 12px;
  color: #166534;
}

.gbv2-rr-standings table {
  width: 100%;
  border-collapse: collapse;
}

.gbv2-rr-standings th,
.gbv2-rr-standings td {
  text-align: left;
  padding: 6px;
  border-bottom: 1px solid #eef2f6;
  font-size: 12px;
}

.gbv2-rr-meta {
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
}

.gbv2-empty {
  color: #6b7280;
  font-size: 13px;
}

@media (max-width: 900px) {
  .gbv2-rr-grid {
    grid-template-columns: 1fr;
  }
}
