/* ==========================================================================
   osu!family Interactive Tournament Bracket Stylesheet
   ========================================================================== */
.bracket-wrapper {
  overflow-x: auto;
  padding: 30px 10px 50px;
  min-height: 580px;
  position: relative;
}

.bracket-container {
  display: flex;
  align-items: stretch;
  gap: 60px;
  min-width: 980px;
  margin: 0 auto;
}

.bracket-round-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 250px;
  position: relative;
}

.round-header {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.round-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.round-subtitle {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: var(--color-accent-osu);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.round-matches-list {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  height: 100%;
  gap: 32px;
}

/* Match Card */
.bracket-match-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
}

.bracket-match-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(168, 85, 247, 0.2);
}

.bracket-match-card.is-live {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.35);
}

.match-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.match-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.match-status-badge.live {
  color: #EF4444;
  font-weight: 800;
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.match-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

.match-team-row:last-child {
  border-bottom: none;
}

.team-main-info {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 170px;
}

.team-name-text {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #E2E8F0;
}

.team-name-text.tbd {
  color: #64748B;
  font-style: italic;
}

.team-score-box {
  width: 32px;
  height: 28px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff;
  font-family: monospace;
}

/* Winner Highlight */
.match-team-row.winner {
  background: rgba(245, 158, 11, 0.12);
}

.match-team-row.winner .team-name-text {
  color: #FCD34D;
}

.match-team-row.winner .team-score-box {
  background: linear-gradient(135deg, var(--color-gold), #D97706);
  color: #000;
}

.crown-icon {
  color: var(--color-gold);
  font-size: 0.85rem;
  margin-right: 4px;
}

/* Champion Presentation Card */
.champion-round-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 260px;
}

.champion-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%), var(--bg-surface);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 35px rgba(245, 158, 11, 0.25);
  width: 100%;
}

.trophy-icon-large {
  font-size: 4rem;
  display: block;
  margin-bottom: 12px;
  animation: shine-trophy 3s ease-in-out infinite;
}

@keyframes shine-trophy {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.4)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.8)); }
}

.champion-title-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.champion-team-name {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.champion-waiting {
  color: var(--text-muted);
  font-style: italic;
  font-size: 1.1rem;
}
