/* ============================================
   BRACKET BUILDER - Step-by-step wizard
   ============================================ */

/* Progress bar */
.bb-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 4px;
}

.bb-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}

.bb-progress-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--outline-variant);
  margin: 0 12px;
}

.bb-progress-step.active:not(:last-child)::after,
.bb-progress-step.completed:not(:last-child)::after {
  background: var(--accent);
}

.bb-progress-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  transition: all 0.3s ease;
}

.bb-progress-step.active .bb-progress-dot {
  background: var(--accent);
  color: white;
}

.bb-progress-step.completed .bb-progress-dot {
  background: var(--success);
  color: white;
}

.bb-progress-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface-variant);
  white-space: nowrap;
}

.bb-progress-step.active .bb-progress-label {
  color: var(--accent);
  font-weight: 600;
}

.bb-progress-step.completed .bb-progress-label {
  color: var(--success);
}

/* Wizard container */
.bb-wizard {
  max-width: 600px;
  margin: 0 auto;
}

/* Step panels */
.bb-step {
  display: none;
}

.bb-step.active {
  display: block;
}

/* Group phase */
.bb-group-header {
  text-align: center;
  margin-bottom: 24px;
}

.bb-group-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.bb-group-counter {
  font-size: 14px;
  color: var(--on-surface-variant);
}

.bb-group-nav {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
}

.bb-group-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface-variant);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.bb-group-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface-variant);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bb-group-dot:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bb-group-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.bb-group-dot.complete {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* Team pick cards */
.bb-team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.bb-team-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 2px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.bb-team-flag {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.bb-team-name {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--on-surface);
}

.bb-team-picks {
  display: flex;
  gap: 6px;
}

.bb-pick-btn {
  width: 40px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface-variant);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-pick-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bb-pick-btn.selected-1st {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
}

.bb-pick-btn.selected-2nd {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.bb-pick-btn.selected-3rd {
  background: #f97316;
  border-color: #f97316;
  color: white;
}

.bb-pick-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Third-place ranked list */
.bb-tp-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  margin: 16px 0 8px;
}

.bb-tp-ranked,
.bb-tp-unranked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.bb-tp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1.5px solid var(--outline-variant);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.bb-tp-item-ranked {
  border-color: var(--accent);
  background: #f8faff;
}

.bb-tp-item-unranked {
  cursor: pointer;
}

.bb-tp-item-unranked:hover {
  border-color: var(--accent);
  background: var(--primary-container);
}

.bb-tp-item-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bb-tp-item-disabled:hover {
  border-color: var(--outline-variant);
  background: var(--surface);
}

.bb-tp-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bb-tp-drag {
  color: var(--on-surface-variant);
  cursor: grab;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.bb-tp-drag:hover {
  opacity: 1;
}

.bb-tp-item .bb-team-flag {
  font-size: 22px;
  flex-shrink: 0;
}

.bb-tp-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
}

.bb-tp-group {
  font-size: 12px;
  color: var(--on-surface-variant);
  flex-shrink: 0;
}

.bb-tp-arrows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.bb-tp-arrow {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--on-surface-variant);
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.bb-tp-arrow:hover:not(:disabled) {
  background: var(--primary-container);
  color: var(--accent);
}

.bb-tp-arrow:disabled {
  opacity: 0.2;
  cursor: default;
}

.bb-tp-remove {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--on-surface-variant);
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.bb-tp-remove:hover {
  background: #fee2e2;
  color: var(--error);
}

.bb-tp-add {
  color: var(--accent);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

/* Drag states */
.bb-tp-dragging {
  opacity: 0.4;
  border-style: dashed;
}

.bb-tp-dragover {
  border-color: var(--success);
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Group navigation buttons */
.bb-nav-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.bb-btn {
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bb-btn-primary {
  background: var(--accent);
  color: white;
}

.bb-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.bb-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.bb-btn-secondary {
  background: var(--surface-variant);
  color: var(--on-surface);
}

.bb-btn-secondary:hover {
  background: var(--outline);
}

.bb-btn-success {
  background: var(--success);
  color: white;
}

.bb-btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
}

.bb-btn-success:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Status badge */
.bb-status {
  text-align: center;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-md);
}

.bb-status.complete {
  background: #ecfdf5;
  color: #065f46;
}

.bb-status.incomplete {
  background: #fef3c7;
  color: #92400e;
}

/* Knockout phase */
.bb-knockout-header {
  text-align: center;
  margin-bottom: 24px;
}

.bb-knockout-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.bb-round-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--primary-container);
  color: var(--primary);
  margin-bottom: 8px;
}

.bb-match-counter {
  font-size: 14px;
  color: var(--on-surface-variant);
}

/* Knockout list view */
.bb-round-section {
  margin-bottom: 20px;
}

.bb-round-section .bb-round-badge {
  margin-bottom: 10px;
}

.bb-ko-matches {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bb-ko-match {
  display: grid;
  grid-template-columns: 36px 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.bb-ko-match.waiting {
  opacity: 0.5;
}

.bb-ko-team {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--surface);
  border: 2px solid var(--outline-variant);
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.bb-ko-team:hover:not(.waiting) {
  border-color: var(--accent);
  background: var(--primary-container);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.bb-ko-team:active:not(.waiting) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.bb-ko-team.winner {
  background: #dbeafe;
  border-color: var(--accent);
}

.bb-ko-team.loser {
  opacity: 0.3;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.bb-ko-team .bb-team-flag {
  font-size: 24px;
}

.bb-ko-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--on-surface);
}

.bb-ko-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-variant);
  opacity: 0.5;
  min-width: 32px;
  flex-shrink: 0;
}

.bb-ko-vs {
  font-size: 11px;
  font-weight: 700;
  color: var(--on-surface-variant);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Knockout match card (legacy, kept for reference) */
.bb-match-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  margin-bottom: 24px;
  border: 2px solid var(--outline-variant);
}

.bb-match-vs {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}

.bb-match-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  text-align: center;
}

.bb-match-team:hover {
  background: var(--primary-container);
  border-color: var(--accent);
}

.bb-match-team.selected {
  background: #dbeafe;
  border-color: var(--accent);
}

.bb-match-team .bb-team-flag {
  font-size: 48px;
}

.bb-match-team .bb-team-name {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  flex: unset;
}

.bb-match-team .bb-team-code {
  font-size: 12px;
  color: var(--on-surface-variant);
  font-weight: 500;
}

.bb-vs-divider {
  font-size: 18px;
  font-weight: 700;
  color: var(--on-surface-variant);
  flex-shrink: 0;
}

/* Champion card — Bola style */
.bb-champion {
  text-align: center;
  padding: 28px 24px 24px;
  background: var(--primary);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.bb-champion::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,215,0,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.bb-champion-flag {
  font-size: 56px;
  margin-bottom: 8px;
  position: relative;
}

.bb-champion-name {
  font-size: 24px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  position: relative;
}

.bb-champion-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #FFD700;
  margin-top: 6px;
  position: relative;
}

/* Summary / Save step */
.bb-save-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.bb-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bb-input-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
}

.bb-input {
  padding: 12px 16px;
  border: 1.5px solid var(--outline);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--on-surface);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.bb-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bb-input::placeholder {
  color: var(--on-surface-variant);
  opacity: 0.6;
}

/* Saved state */
.bb-saved-card {
  background: #ecfdf5;
  border: 2px solid #10b981;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 24px;
}

.bb-saved-title {
  font-size: 20px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 16px;
}

.bb-code-display {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.bb-code-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bb-code-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
}

.bb-code-value {
  font-size: 28px;
  font-weight: 800;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 3px;
  color: var(--primary);
  background: var(--surface);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--outline);
}

.bb-screenshot-reminder {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #92400e;
  margin-bottom: 20px;
}

.bb-action-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.bb-action-buttons .bb-btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* Bracket summary grid */
.bb-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.bb-summary-group {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.bb-summary-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
}

.bb-summary-team {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 2px 0;
}

.bb-summary-team .rank {
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-variant);
  width: 18px;
}

.bb-summary-team .flag {
  font-size: 16px;
}

.bb-summary-team .name {
  font-weight: 500;
  color: var(--on-surface);
}

/* Knockout summary path */
.bb-knockout-path {
  margin-bottom: 24px;
}

.bb-knockout-path h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.bb-path-round {
  margin-bottom: 12px;
}

.bb-path-round-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
}

.bb-path-matches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bb-path-match {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 13px;
}

.bb-path-match .winner {
  font-weight: 600;
}

.bb-path-match .loser {
  opacity: 0.5;
}

/* Group brackets section */
.bb-groups-section {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.bb-groups-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.bb-group-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Leaderboard table */
.bb-leaderboard {
  width: 100%;
  border-collapse: collapse;
}

.bb-leaderboard th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  border-bottom: 2px solid var(--outline-variant);
}

.bb-leaderboard td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--outline-variant);
}

.bb-leaderboard tr:hover td {
  background: var(--primary-container);
}

.bb-leaderboard .rank-cell {
  font-weight: 700;
  color: var(--primary);
  width: 48px;
}

.bb-leaderboard .name-cell {
  font-weight: 500;
}

.bb-leaderboard .points-cell {
  font-weight: 700;
  color: var(--accent);
}

/* Bracket preview */
.bb-bracket-preview {
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bb-bracket-grid {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 800px;
  padding: 8px 0;
}

.bb-bracket-round {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.bb-bracket-round-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  text-align: center;
  padding: 4px 6px;
  background: var(--surface-variant);
  border-radius: 4px;
  margin-bottom: 6px;
}

.bb-bracket-matches {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.bb-bracket-match {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: 4px;
  overflow: hidden;
  width: 100px;
}

.bb-bracket-team-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  font-size: 11px;
}

.bb-bracket-team-row:first-child {
  border-bottom: 1px solid var(--outline-variant);
}

.bb-bracket-team-row.winner {
  font-weight: 700;
  background: rgba(16, 185, 129, 0.08);
}

.bb-bracket-team-row .flag {
  font-size: 12px;
  flex-shrink: 0;
}

.bb-bracket-team-row .code {
  flex: 1;
  font-weight: 500;
  color: var(--on-surface);
}

.bb-bracket-team-row .code.tbd {
  color: var(--on-surface-variant);
  opacity: 0.5;
}

.bb-bracket-connector {
  width: 16px;
  flex-shrink: 0;
  align-self: stretch;
}

/* Final match highlight */
.bb-bracket-match.final-match {
  border-color: var(--primary);
  border-width: 1.5px;
}

.bb-bracket-match.final-match .bb-bracket-team-row.winner {
  background: rgba(12, 26, 61, 0.08);
}

/* Group standings summary in bracket */
.bb-bracket-groups {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 16px;
}

.bb-bracket-group-card {
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: 4px;
  padding: 6px 8px;
}

.bb-bracket-group-header {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--on-surface-variant);
  margin-bottom: 4px;
}

.bb-bracket-group-team {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 1px 0;
}

.bb-bracket-group-team .pos {
  font-size: 10px;
  font-weight: 600;
  color: var(--on-surface-variant);
  width: 14px;
}

.bb-bracket-group-team .flag {
  font-size: 12px;
}

.bb-bracket-group-team .name {
  font-weight: 500;
}

@media (max-width: 768px) {
  .bb-bracket-groups {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* App CTA */
.bb-app-cta {
  background: var(--primary);
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}

.bb-app-cta-text {
  font-size: 15px;
  font-weight: 500;
}

.bb-app-cta .bb-btn {
  background: white;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.bb-app-cta .bb-btn:hover {
  background: var(--primary-container);
}

/* Toast notification */
.bb-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.bb-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* PIN modal */
.bb-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  display: none;
}

.bb-modal-overlay.show {
  display: flex;
}

.bb-modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.bb-modal h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.bb-modal .bb-input {
  width: 100%;
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-weight: 700;
  margin-bottom: 16px;
}

.bb-modal-error {
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 12px;
  display: none;
}

/* Shimmer loading */
.bb-shimmer {
  width: 100%;
  aspect-ratio: 1800 / 1300;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--surface-variant) 25%, var(--background) 50%, var(--surface-variant) 75%);
  background-size: 200% 100%;
  animation: bbShimmer 1.5s ease-in-out infinite;
}

@keyframes bbShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .bb-progress {
    justify-content: space-between;
  }

  .bb-progress-step {
    flex: 1;
    min-width: 0;
  }

  .bb-progress-label {
    display: none;
  }

  .bb-progress-dot {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .bb-progress-step:not(:last-child)::after {
    margin: 0 4px;
  }

  .bb-match-team .bb-team-flag {
    font-size: 36px;
  }

  .bb-match-team .bb-team-name {
    font-size: 14px;
  }

  .bb-champion-flag {
    font-size: 48px;
  }

  .bb-champion-name {
    font-size: 22px;
  }

  .bb-code-display {
    flex-direction: column;
    align-items: center;
  }

  .bb-app-cta {
    flex-direction: column;
    text-align: center;
  }

  .bb-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
