body {
  color: #FFFFFF;
  background-color: #05081a;
  overflow-y: auto;
  overflow-x: hidden;
}

/* container dos botões do topo */
.top-actions {
  position: fixed;
  top: 30px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

.top-actions #btnLang {
  position: static;
  top: unset;
  right: unset;
  height: 30px;
  padding: 0 13px;
  font-size: 12px;
}

/* botão de reiniciar */
.refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #F4C542, #D4A017);
  color: #0A1F44;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(244, 197, 66, 0.35),
    0 0 18px rgba(244, 197, 66, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.refresh-button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.refresh-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(244, 197, 66, 0.50),
    0 0 24px rgba(244, 197, 66, 0.22);
  filter: brightness(1.08);
}

.refresh-button:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(244, 197, 66, 0.25);
}

.refresh-button:active svg {
  animation: spin_357 0.5s linear;
}

@keyframes spin_357 {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* modal de reiniciar */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 26, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 2000;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(420px, calc(100% - 40px));
  background: rgba(9, 12, 30, 0.92);
  border: 1px solid rgba(244, 197, 66, 0.35);
  border-radius: 18px;
  padding: 26px 26px 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(244, 197, 66, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.22s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFD966;
  text-shadow: 0 0 14px rgba(244, 197, 66, 0.35);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.modal-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 22px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-btn {
  padding: 9px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.modal-btn-cancel {
  background: linear-gradient(135deg, #e05555, #c0392b);
  color: #fff;
  border-color: transparent;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 4px 14px rgba(220, 60, 60, 0.30);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.modal-btn-cancel:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 60, 60, 0.50);
}

.modal-btn-cancel:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(220, 60, 60, 0.25);
}

.modal-btn-cancel::after {
  content: "";
  position: absolute;
  top: 0;
  left: -20%;
  width: 40%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.16), transparent);
  transform: translateX(-100%) rotate(25deg);
  z-index: 1;
}

.modal-btn-cancel:hover::after {
  animation: shine 0.9s ease;
}

.modal-btn-confirm {
  background: linear-gradient(135deg, #F4C542, #D4A017);
  color: #0A1F44;
  box-shadow:
    0 4px 14px rgba(244, 197, 66, 0.35),
    0 0 18px rgba(244, 197, 66, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.modal-btn-confirm:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(244, 197, 66, 0.50),
    0 0 24px rgba(244, 197, 66, 0.22);
}

.modal-btn-confirm::after {
  content: "";
  position: absolute;
  top: 0;
  left: -20%;
  width: 40%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.16), transparent);
  transform: translateX(-100%) rotate(25deg);
  z-index: 1;
}

.modal-btn-confirm:hover::after {
  animation: shine 0.9s ease;
}

.modal-btn:active {
  transform: scale(0.96);
}

.modal-btn-confirm:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(244, 197, 66, 0.25);
}

/* botão de voltar */
.top-actions-left {
  position: fixed;
  top: 30px;
  left: 24px;
  display: flex;
  align-items: center;
  z-index: 1000;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #F4C542, #D4A017);
  color: #0A1F44;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(244, 197, 66, 0.35),
    0 0 18px rgba(244, 197, 66, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.back-button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(244, 197, 66, 0.50),
    0 0 24px rgba(244, 197, 66, 0.22);
  filter: brightness(1.08);
}

.back-button:active {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(244, 197, 66, 0.25);
}

@keyframes back_arrow {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

.back-button:active svg {
  animation: back_arrow 0.35s ease;
}

@media (max-width: 992px) {
  .top-actions { top: 26px; right: 16px; }
  .top-actions-left { top: 26px; left: 16px; }
}

@media (max-width: 768px) {
  .top-actions { top: 24px; right: 14px; }
  .top-actions-left { top: 24px; left: 14px; }
}

@media (max-width: 480px) {
  .top-actions { top: 22px; right: 12px; }
  .top-actions-left { top: 22px; left: 12px; }
}

/* fundos por aba */
body.bg-groups,
body.bg-knockout {
  background-image:
    radial-gradient(
      circle at center,
      rgba(5,10,26,0.30) 0%,
      rgba(5,10,26,0.55) 48%,
      rgba(5,10,26,0.85) 100%
    ),
    url("../img/bg-groups-knockout.png");
}

body.bg-matches,
body.bg-performance {
  background-image:
    radial-gradient(
      circle at center,
      rgba(5,10,26,0.45) 0%,
      rgba(5,10,26,0.72) 48%,
      rgba(5,10,26,0.96) 100%
    ),
    url("../img/bg-ball.png");
}

/* navbar */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1360px, calc(100% - 48px));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.navbar-tabs {
  display: flex;
  gap: 4px;
  background: rgba(9, 12, 30, 0.68);
  border: 1px solid rgba(255,196,70,0.16);
  border-radius: 18px;
  padding: 5px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 12px 28px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.tab {
  min-width: 148px;
  padding: 11px 20px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.62);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #F4C542, #FFD966, #F4C542, transparent);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
  color: #FFD966;
  background: rgba(244, 197, 66, 0.07);
  text-shadow: 0 0 12px rgba(244, 197, 66, 0.35);
}

.tab:hover::after {
  width: 72%;
}

.tab.active {
  background: rgba(244, 197, 66, 0.08);
  color: #FFD966;
  border: 1px solid rgba(244, 197, 66, 0.55);
  text-shadow: 0 0 14px rgba(244, 197, 66, 0.45);
  box-shadow:
    0 0 12px rgba(244, 197, 66, 0.12),
    inset 0 0 12px rgba(244, 197, 66, 0.05);
}

.tab.active::after {
  display: none;
}

/* páginas */
.page {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 118px 24px 44px;
  position: relative;
  z-index: 2;
}

.page.active {
  display: flex;
}

#page-matches.active,
#page-performance.active {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.page-header {
  width: 100%;
  max-width: 1360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 2rem;
  text-align: center;
}

.page-title {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  color: #F5F5F5;
  text-shadow:
    0 4px 12px rgba(0,0,0,0.6),
    0 0 18px rgba(255, 200, 80, 0.25),
    0 0 36px rgba(255, 200, 80, 0.15);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-weight: 500;
}

.page-filter-wrap {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.round-filter {
  margin: 0 auto;
}

.page-filter-wrap::-webkit-scrollbar {
  display: none;
}

.round-filter {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  background: rgba(9, 12, 30, 0.62);
  border: 1px solid rgba(255,196,70,0.16);
  border-radius: 16px;
  padding: 5px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 10px 24px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.round-btn {
  padding: 9px 22px;
  border-radius: 11px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.round-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #F4C542, #FFD966, #F4C542, transparent);
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.round-btn:hover {
  color: #FFD966;
  background: rgba(244, 197, 66, 0.07);
  text-shadow: 0 0 12px rgba(244, 197, 66, 0.35);
}

.round-btn:hover::after {
  width: 72%;
}

.round-btn.active {
  background: rgba(244, 197, 66, 0.08);
  color: #FFD966;
  border: 1px solid rgba(244, 197, 66, 0.5);
  text-shadow: 0 0 14px rgba(244, 197, 66, 0.4);
  box-shadow: 0 0 10px rgba(244, 197, 66, 0.1), inset 0 0 10px rgba(244, 197, 66, 0.05);
}

.round-btn.active::after {
  display: none;
}

.loading {
  color: rgba(255,255,255,0.42);
  font-size: 14px;
}

/* groups */
.groups-grid {
  width: 100%;
  max-width: 1360px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.group-card {
  position: relative;
  background: rgba(0,0,0,0.46);
  border: 1px solid rgba(255,196,70,0.22);
  border-radius: 18px;
  padding: 1.15rem 1.15rem 0.95rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 12px 30px rgba(0,0,0,0.32),
    0 0 20px rgba(255,180,60,0.05),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.group-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0) 24%
  );
}

.group-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,200,80,0.5);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.36),
    0 0 18px rgba(255,200,80,0.15);
}

.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255,196,70,0.14);
}

.group-card-header h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #FFD966;
  letter-spacing: -0.02em;
  text-shadow: 0 0 14px rgba(244, 197, 66, 0.35);
}


.group-stats-header {
  display: flex;
  gap: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}

.group-stats-header span {
  width: 32px;
  text-align: center;
}

.group-team {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s ease;
}

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

.group-team:hover {
  background: rgba(255, 200, 80, 0.05);
}

.group-team-pos {
  width: 16px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.group-team-pos.pos-1 { color: #FFD966; text-shadow: 0 0 8px rgba(255, 210, 60, 0.5); }
.group-team-pos.pos-2 { color: #C0C0C0; text-shadow: 0 0 8px rgba(192, 192, 192, 0.4); }
.group-team-pos.pos-3 { color: #CD7F32; text-shadow: 0 0 8px rgba(205, 127, 50, 0.4); }
.group-team-pos.pos-4 { color: rgba(255, 255, 255, 0.28); }

.group-team-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.group-team-name span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-team-flag {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(255, 200, 80, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.group-team-pts {
  display: flex;
  gap: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  flex-shrink: 0;
}

.group-team-pts span {
  width: 32px;
  text-align: center;
}

/* matches */
.matches-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 1360px;
  max-height: 68vh;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 197, 66, 0.4) rgba(255,255,255,0.05);
}

.matches-list.single-match {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.matches-list.single-match .match-card {
  width: 100%;
}

.matches-list::-webkit-scrollbar {
  width: 4px;
}

.matches-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 99px;
}

.matches-list::-webkit-scrollbar-thumb {
  background: rgba(244, 197, 66, 0.4);
  border-radius: 99px;
}

.matches-list::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 197, 66, 0.65);
}

.match-card {
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,196,70,0.18);
  border-radius: 18px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 24px rgba(0,0,0,0.18);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,200,80,0.5);
  box-shadow:
    0 0 18px rgba(255,200,80,0.15),
    0 12px 28px rgba(0,0,0,0.22);
}

.match-meta {
  font-size: 0.98rem;
  color: rgba(255,255,255,0.68);
}

.match-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.match-team {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
}

.match-team.away {
  flex-direction: row-reverse;
  text-align: right;
}

.match-team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-flag {
  width: 34px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 8px rgba(255,200,80,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.match-score {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  min-width: 160px;
  text-align: center;
  text-shadow: 0 0 10px rgba(255,200,80,0.3);
}

.match-events {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
}

.match-goals {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.match-goals span::before {
  content: "⚽";
  font-size: 0.72rem;
  margin-right: 4px;
  filter: sepia(1) saturate(4) hue-rotate(-10deg) brightness(1.2);
}

.home-goals {
  align-items: flex-start;
}

.away-goals {
  align-items: flex-end;
  text-align: right;
}

.page-footer {
  margin-top: 2rem;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

#btnNextRound {
  display: none;
}

@media (max-width: 768px) {
  #btnNextRound {
    display: flex;
  }
}

/* ===== pênaltis ===== */
.match-penalties {
  border-top: 1px solid rgba(255, 196, 70, 0.14);
  padding-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: start;
}

.pk-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}

.pk-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: rgba(255, 200, 80, 0.75);
}

.pk-score {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.pk-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pk-col-home {
  align-items: flex-start;
}

.pk-col-away {
  align-items: flex-end;
}

.pk-kick {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

.pk-col-away .pk-kick {
  flex-direction: row-reverse;
}

.pk-kick .pk-ball::before {
  content: "⚽";
  font-size: 0.72rem;
}

.pk-kick.pk-scored .pk-ball::before {
  filter: sepia(1) saturate(6) hue-rotate(80deg) brightness(1.1);
}

.pk-kick.pk-missed .pk-ball::before {
  filter: sepia(1) saturate(6) hue-rotate(-30deg) brightness(0.9);
}

.pk-kick.pk-scored .pk-name {
  color: rgba(110, 220, 130, 0.85);
}

.pk-kick.pk-missed .pk-name {
  color: rgba(220, 100, 100, 0.75);
  text-decoration: line-through;
  text-decoration-color: rgba(220, 100, 100, 0.5);
}

/* knockout */
.knockout-wrap {
  width: 100%;
  max-width: 1360px;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.knockout-placeholder {
  font-size: 1rem;
  color: #ffffff;
  text-align: center;
}

/* performance */
.performance-filter-wrap {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  overflow: visible;
}

.performance-filter-spacer {
  /* mirror da largura do search para manter o filtro centrado */
}

.performance-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: end;
  width: 100%;
  max-width: 260px;
}

.performance-search-icon {
  position: absolute;
  left: 11px;
  fill: #F4C542;
  width: 14px;
  height: 14px;
  pointer-events: none;
  flex-shrink: 0;
  z-index: 2;
}

.performance-search-input {
  width: 100%;
  height: 36px;
  line-height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid rgba(255,196,70,0.22);
  border-radius: 8px;
  background: rgba(0,0,0,0.42);
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  position: relative;
  z-index: 1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.performance-search-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.performance-search-input:focus,
.performance-search-input:hover {
  border-color: rgba(244, 197, 66, 0.55);
  background: rgba(0,0,0,0.55);
  box-shadow: 0 0 0 3px rgba(244,197,66,0.1);
}

.performance-search-input::-webkit-search-cancel-button {
  filter: invert(1) opacity(0.4);
  cursor: pointer;
}

.performance-list {
  width: 100%;
  max-width: 1360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 68vh;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 197, 66, 0.4) rgba(255,255,255,0.05);
}

.performance-list::-webkit-scrollbar {
  width: 4px;
}

.performance-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 99px;
}

.performance-list::-webkit-scrollbar-thumb {
  background: rgba(244, 197, 66, 0.4);
  border-radius: 99px;
}

.performance-list::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 197, 66, 0.65);
}

.performance-card {
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,196,70,0.18);
  border-radius: 18px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 70px minmax(0, 1.3fr) minmax(0, 1fr) 110px 120px;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 24px rgba(0,0,0,0.18);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.performance-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,200,80,0.5);
  box-shadow:
    0 0 18px rgba(255,200,80,0.15),
    0 12px 28px rgba(0,0,0,0.22);
}

.performance-rank {
  font-size: 1.05rem;
  font-weight: 700;
  color: #F4C542;
}

.performance-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.performance-player-info {
  min-width: 0;
}

.performance-player-name {
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.performance-player-meta {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.62);
}

.performance-team {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: rgba(255,255,255,0.88);
  font-size: 0.96rem;
}

.performance-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 8px rgba(255,200,80,0.12);
  flex-shrink: 0;
}

.performance-pos {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.performance-value {
  justify-self: end;
  font-size: 1.12rem;
  font-weight: 700;
  color: #FFFFFF;
}

/* ===== knockout bracket ===== */
#page-knockout {
  padding-top: 90px;
}

#page-knockout .page-header {
  margin-bottom: 0.5rem;
}

.knockout-wrap {
  width: 100%;
  max-width: 1360px;
  min-height: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.knockout-bracket {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(9, minmax(90px, 1fr));
  gap: 12px;
  align-items: center;
  justify-items: stretch;
  padding: 8px 10px;
  min-height: 560px;
}

.bracket-col {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 10px;
  height: 100%;
}

.bracket-col.final-col {
  justify-content: center;
  align-items: stretch;
  position: relative;
}

@keyframes champion-pulse {
  0%, 100% { text-shadow: 0 0 8px #ffd700, 0 0 20px rgba(255,215,0,0.5); }
  50%       { text-shadow: 0 0 18px #ffd700, 0 0 45px rgba(255,215,0,0.8), 0 0 70px rgba(255,165,0,0.4); }
}

@keyframes champion-appear {
  from { opacity: 0; transform: translateX(-50%) scale(0.6); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes trophy-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.bracket-champion {
  position: absolute;
  bottom: calc(50% + 117px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.55);
  border-radius: 14px;
  padding: 12px 20px 10px;
  box-shadow:
    0 0 20px rgba(255, 215, 0, 0.25),
    0 0 60px rgba(255, 215, 0, 0.1),
    inset 0 0 20px rgba(255, 215, 0, 0.04);
  animation: champion-appear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.champion-trophy {
  font-size: 1.8rem;
  line-height: 1;
  animation: trophy-bounce 1.8s ease-in-out infinite;
}

.champion-label {
  font-size: 1.1rem;
  font-weight: 800;
  color: rgba(255, 200, 100, 0.75);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.champion-team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.champion-flag {
  width: 36px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.bracket-match {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 165, 0, 0.4);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 0 12px rgba(255, 140, 0, 0.15);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.bracket-match:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 200, 80, 0.5);
  box-shadow:
    0 0 18px rgba(255, 200, 80, 0.15),
    0 12px 28px rgba(0, 0, 0, 0.22);
}

.bracket-match.played {
  border-color: rgba(255, 200, 100, 0.7);
  box-shadow: 0 0 16px rgba(255, 180, 80, 0.3);
}

.bracket-team {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #ddd;
  padding: 2px 0;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.bracket-team:hover {
  background: rgba(255, 200, 80, 0.05);
}

.bracket-team.winner {
  color: #fff;
  font-weight: 600;
}

.bracket-team.loser {
  opacity: 0.55;
}

.bracket-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.bracket-team-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bracket-pk {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 200, 80, 0.75);
  margin-left: 3px;
}

.bracket-score {
  font-weight: 600;
  min-width: 16px;
  text-align: right;
}

.bracket-tbd {
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
  font-size: 0.75rem;
  text-align: center;
}

.bracket-third {
  width: calc((100% - 8 * 12px) / 9);
  margin: -300px auto 0;
}

@media (max-width: 992px) and (min-width: 769px) {
  .bracket-champion {
    display: none;
  }

  .bracket-third {
    width: 100%;
    margin: 16px auto 0;
  }

  .knockout-bracket {
    min-height: 0;
  }

  .bracket-team {
    font-size: 0.8rem;
  }

  .bracket-match-label {
    font-size: 0.65rem;
  }

  .bracket-score {
    font-size: 0.85rem;
  }
}

.bracket-match-label {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 200, 100, 0.75);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 200, 100, 0.15);
}

.knockout-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: #ffffff;
  font-size: 1.1rem;
  font-style: italic;
  text-shadow: 0 0 18px rgba(255, 200, 80, 0.3);
}

@media (max-width: 768px) {
  .knockout-bracket {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
  }

  .bracket-col {
    height: auto;
  }

  .bracket-team {
    font-size: 1.05rem;
  }

  .bracket-match-label {
    font-size: 0.85rem;
  }

  .bracket-score {
    font-size: 1.15rem;
  }

  .bracket-flag {
    width: 28px;
    height: 20px;
  }

  .bracket-match {
    padding: 12px 14px;
  }

  /* Reordena cronologicamente: 16avos → oitavas → quartas → semis → final */
  .knockout-bracket > .bracket-col:nth-child(1) { order: 1; } /* r32 esq */
  .knockout-bracket > .bracket-col:nth-child(9) { order: 2; } /* r32 dir */
  .knockout-bracket > .bracket-col:nth-child(2) { order: 3; } /* r16 esq */
  .knockout-bracket > .bracket-col:nth-child(8) { order: 4; } /* r16 dir */
  .knockout-bracket > .bracket-col:nth-child(3) { order: 5; } /* quartas esq */
  .knockout-bracket > .bracket-col:nth-child(7) { order: 6; } /* quartas dir */
  .knockout-bracket > .bracket-col:nth-child(4) { order: 7; } /* semis esq */
  .knockout-bracket > .bracket-col:nth-child(6) { order: 8; } /* semis dir */
  .knockout-bracket > .bracket-col:nth-child(5) { order: 9; } /* final */

  .bracket-third {
    width: 100%;
    margin: 16px auto 0;
  }
}

/* =========================
  RESPONSIVO
========================= */

@media (max-width: 1400px) {
  .groups-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .performance-card {
    grid-template-columns: 60px minmax(0, 1.2fr) minmax(0, 1fr) 90px 110px;
  }
}

@media (max-width: 1100px) {
  .match-team-name {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    overflow: visible;
    text-overflow: unset;
    font-size: 0.91rem;
    line-height: 1.2;
  }

  .match-team,
  .match-team.away {
    min-height: 40px;
    align-items: center;
  }
}

@media (max-width: 992px) {
  body {
    align-items: flex-start;
    overflow-y: auto;
  }

  .bracket-champion {
    display: none;
  }

  .navbar {
    top: 14px;
    left: 60px;
    right: 220px;
    width: auto;
    transform: none;
  }

  .back-button span {
    display: none;
  }

  .back-button {
    padding: 0 10px;
    gap: 0;
    min-width: 30px;
  }

  .round-btn {
    font-size: 16px;
    padding: 9px 20px;
  }

  .bracket-team {
    font-size: 0.95rem;
  }

  .bracket-match-label {
    font-size: 0.75rem;
  }

  .bracket-score {
    font-size: 1rem;
  }

  .bracket-flag {
    width: 24px;
    height: 16px;
  }


  .tab {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    font-size: 13px;
  }

  .tab[data-tab="performance"] {
    font-size: 13px;
    letter-spacing: 0;
  }

  .page {
    padding: 106px 16px 36px;
  }

  .groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance-card {
    grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr);
  }

  .performance-pos,
  .performance-value {
    justify-self: start;
  }

  .performance-search-wrap {
    max-width: 210px;
  }
}

@media (max-width: 768px) {
  .navbar {
    left: 60px;
    right: 216px;
    width: auto;
    transform: none;
    justify-content: center;
    padding-top: 0;
  }

  .back-button span {
    display: none;
  }

  .back-button {
    padding: 0 10px;
    gap: 0;
    min-width: 30px;
  }



  .navbar-tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .navbar-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    text-align: center;
  }

  .page-title {
    font-size: clamp(1.55rem, 7vw, 2.2rem);
    line-height: 1.08;
  }

  .performance-filter-wrap {
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 12px;
  }

  .performance-filter-spacer {
    display: none;
  }

  .performance-search-wrap {
    justify-self: center;
    max-width: 260px;
    width: 100%;
  }

  .round-btn {
    padding: 7px 10px;
    font-size: 11px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matches-list {
    grid-template-columns: 1fr;
  }

  .match-card {
    padding: 14px 12px;
  }

  .match-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .match-team {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    min-height: 28px;
  }

  .match-team.away {
    flex-direction: row-reverse;
    justify-content: flex-start;
    text-align: right;
  }

  .match-flag {
    width: 22px;
    height: 16px;
    display: block;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 2px;
  }

  .match-team-name {
    display: block;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: keep-all;
    overflow-wrap: break-word;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .match-score {
    min-width: 42px;
    font-size: 1.5rem;
    line-height: 1;
    text-align: center;
  }

  .performance-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .performance-value {
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .navbar {
    left: 68px;
    right: 122px;
    width: auto;
    transform: none;
  }

  .refresh-button span,
  .back-button span {
    display: none;
  }

  .refresh-button,
  .back-button {
    padding: 0 10px;
    gap: 0;
    min-width: 30px;
  }

  .top-actions #btnLang {
    padding: 0 11px;
  }

  .round-btn {
    padding: 6px 8px;
    font-size: 10.5px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .tab {
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
    padding: 7px 10px;
    font-size: 11px;
  }


  .groups-grid {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 100px 10px 24px;
  }

  .group-card,
  .match-card,
  .performance-card {
    border-radius: 14px;
  }

  .group-card {
    padding: 1rem;
  }

  .match-card,
  .performance-card {
    padding: 14px;
  }

  .group-team-name,
  .group-team-pts,
  .match-team,
  .performance-player-name,
  .performance-team {
    font-size: 0.92rem;
  }

  .match-main {
    gap: 8px;
  }

  .match-team {
    gap: 6px;
  }

  .match-flag {
    width: 20px;
    height: 14px;
  }

  .match-team-name {
    font-size: 0.76rem;
    line-height: 1.1;
  }

  .match-score {
    min-width: 36px;
    font-size: 1.35rem;
  }
}