/* ==========================================================================
   VALORANT CHAMPIONS SHANGHAI 2026 — PLAYOFFS BRACKET STYLESHEET
   Aesthetics: Riot Esports Bracket System, VLR Dual-Tree Dark UI
   ========================================================================== */

.playoff-hero {
  padding: 80px 24px 40px;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.playoff-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.playoff-title-wrap h1 {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
  line-height: 1.05;
  color: var(--ink-bright);
}

.playoff-title-wrap h1 span {
  color: var(--red);
}

.playoff-subtitle {
  color: var(--muted);
  max-width: 720px;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

/* Champion Banner */
.champion-spotlight-card {
  background: linear-gradient(135deg, rgba(255, 70, 85, 0.12) 0%, rgba(13, 19, 26, 0.95) 100%);
  border: 1px solid rgba(255, 70, 85, 0.4);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.champion-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.champion-trophy-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid rgba(245, 176, 65, 0.3);
  display: inline-block;
  margin-bottom: 6px;
}

.champion-team-name {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink-bright);
  margin: 0;
}

.champion-desc {
  color: var(--muted);
  font-size: 14px;
  margin: 4px 0 0;
  max-width: 600px;
}

.champion-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 70, 85, 0.4));
}

/* Bracket Container */
.bracket-section {
  padding: 48px 24px;
  max-width: 1560px;
  margin: 0 auto;
}

.bracket-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.bracket-tabs {
  display: flex;
  gap: 8px;
}

.bracket-tab-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.bracket-tab-btn:hover {
  border-color: var(--line-highlight);
  color: var(--ink);
}

.bracket-tab-btn.active {
  background: var(--red);
  color: #000;
  border-color: var(--red);
}

/* Bracket Grid */
.bracket-scroll-wrapper {
  overflow-x: auto;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-highlight) var(--panel);
}

.bracket-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.bracket-scroll-wrapper::-webkit-scrollbar-track {
  background: var(--panel);
  border-radius: 4px;
}

.bracket-scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--line-highlight);
  border-radius: 4px;
}

.bracket-tree-title {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--red);
  text-transform: uppercase;
  margin: 40px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bracket-tree-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.bracket-columns-grid {
  display: grid;
  grid-template-columns: repeat(4, 320px);
  gap: 36px;
  min-width: 1380px;
}

.bracket-column {
  display: flex;
  flex-direction: column;
}

.round-header {
  margin-bottom: 20px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}

.round-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-bright);
  margin: 0;
  text-transform: uppercase;
}

.round-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-dim);
  margin-top: 2px;
}

.match-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100%;
}

.match-list.spaced-center {
  justify-content: space-around;
}

.match-list.spaced-final {
  justify-content: center;
}

/* Match Card */
.match-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-highlight);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.match-card.grand-final-card {
  border-color: rgba(245, 176, 65, 0.4);
  background: linear-gradient(180deg, rgba(245, 176, 65, 0.05) 0%, var(--panel) 100%);
}

.match-header {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.match-time {
  display: flex;
  align-items: center;
  gap: 6px;
}

.match-format-tag {
  font-weight: 700;
  color: var(--cyan);
}

.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;
}

.team-row:last-of-type {
  border-bottom: none;
}

.team-row.winner {
  background: rgba(255, 70, 85, 0.08);
}

.team-row.champion-winner {
  background: rgba(245, 176, 65, 0.12);
}

.team-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-logo-small {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.team-name-text {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.team-row.winner .team-name-text {
  color: var(--ink-bright);
  font-weight: 700;
}

.team-row.champion-winner .team-name-text {
  color: var(--gold);
  font-weight: 700;
}

.team-score-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.win-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--red);
  color: #000;
  padding: 2px 6px;
  border-radius: 2px;
}

.champion-pill {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--gold);
  color: #000;
  padding: 2px 6px;
  border-radius: 2px;
}

.score-num {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  min-width: 18px;
  text-align: right;
}

.team-row.winner .score-num {
  color: var(--ink-bright);
}

.team-row.champion-winner .score-num {
  color: var(--gold);
}

.match-footer {
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-footer span.maps-preview {
  color: var(--muted);
}

.match-click-hint {
  color: var(--red);
  opacity: 0.8;
  font-weight: 600;
}

/* Match Dossier Modal */
.playoff-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.playoff-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.playoff-modal {
  background: var(--night-surface);
  border: 1px solid var(--line-highlight);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  position: relative;
  padding: 32px;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: var(--red);
  color: #000;
  border-color: var(--red);
}

.modal-round-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-match-title {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink-bright);
  margin: 6px 0 16px;
}

.modal-teams-banner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}

.modal-team-side {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-team-side.right {
  flex-direction: row-reverse;
  text-align: right;
}

.modal-team-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.modal-team-info h4 {
  font-family: var(--display);
  font-size: 18px;
  margin: 0;
  color: var(--ink-bright);
}

.modal-team-info span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.modal-score-center {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  color: var(--red);
  padding: 0 20px;
  letter-spacing: 2px;
}

.modal-maps-flow {
  background: var(--panel-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.modal-maps-flow h5 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 12px;
}

.map-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-score-pill {
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
}

.map-score-pill strong {
  color: var(--ink-bright);
  font-size: 13px;
}

.map-score-pill span {
  color: var(--red);
  font-weight: 700;
  margin-left: 8px;
}

.modal-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.modal-analysis-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.modal-analysis-box h5 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  margin: 0 0 8px;
  letter-spacing: 0.05em;
}

.modal-analysis-box p {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

/* Placements Table */
.placements-section {
  padding: 48px 24px;
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.placements-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
}

.placements-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
}

.placements-table th {
  background: var(--panel-elevated);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid var(--line-highlight);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.placements-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.placements-table tr:hover td {
  background: var(--panel-elevated);
}

.place-badge {
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  display: inline-block;
}

.place-1st {
  background: var(--gold);
  color: #000;
}

.place-2nd {
  background: #c0c0c0;
  color: #000;
}

.place-3rd {
  background: #cd7f32;
  color: #000;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .modal-analysis-grid {
    grid-template-columns: 1fr;
  }

  .champion-spotlight-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
