/* ===================================================
   COPA 2026 — Custom Styles
   =================================================== */

/* --- Font Anton (headings) --- */
.font-anton {
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.05em;
}

/* --- Animações de entrada --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(254, 223, 0, 0.4); }
  50%      { box-shadow: 0 0 40px rgba(254, 223, 0, 0.8); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}
.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}
.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}
.animate-campeao {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Scroll reveal */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.animate-on-scroll.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* --- Partículas flutuantes --- */
.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}
.particle-delay-1 { top: 20%; left: 10%; animation-delay: 0s; width: 12px; height: 12px; }
.particle-delay-2 { top: 60%; left: 80%; animation-delay: 1s; width: 6px; height: 6px; }
.particle-delay-3 { top: 30%; left: 60%; animation-delay: 2s; width: 10px; height: 10px; }
.particle-delay-4 { top: 70%; left: 20%; animation-delay: 3s; width: 14px; height: 14px; }
.particle-delay-5 { top: 40%; left: 40%; animation-delay: 4s; width: 8px; height: 8px; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50%      { transform: translateY(-30px) scale(1.5); opacity: 0.8; }
}

/* --- Smooth scroll --- */
html {
  scroll-behavior: smooth;
}

/* --- Cards de grupo --- */
.grupo-card {
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.grupo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

/* --- Tabela de classificação --- */
.tabela-classif th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.4rem;
}
.tabela-classif td {
  padding: 0.4rem;
  font-size: 0.85rem;
}
.tabela-classif .pos-1 { background: linear-gradient(90deg, rgba(0,151,57,0.15) 0%, transparent 100%); }
.tabela-classif .pos-2 { background: linear-gradient(90deg, rgba(0,39,118,0.1) 0%, transparent 100%); }

/* --- Bracket (Mata-Mata) --- */
.bracket-round {
  min-width: 200px;
}
.bracket-match {
  background: oklch(var(--b1));
  border: 1.5px solid oklch(var(--bc) / 0.15);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  cursor: default;
}
.bracket-match:hover {
  border-color: oklch(var(--p));
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.bracket-match .team-winner {
  font-weight: 700;
  color: oklch(var(--suc));
}
.bracket-match .team-loser {
  opacity: 0.5;
}

/* --- Timeline cards --- */
.timeline-card {
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-card:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}
.timeline-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 4px solid oklch(var(--p));
  background: oklch(var(--b1));
  z-index: 10;
}

/* --- Responsivo --- */
@media (max-width: 767px) {
  .timeline-dot {
    left: 0 !important;
    right: auto !important;
  }
  .timeline-card {
    margin-left: 2rem;
  }
}

/* --- Grupo select --- */
select.grupo-select {
  background: oklch(var(--b2));
  border: 1.5px solid oklch(var(--bc) / 0.2);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
select.grupo-select:focus {
  outline: none;
  border-color: oklch(var(--p));
  box-shadow: 0 0 0 2px oklch(var(--p) / 0.2);
}

/* --- Resultado Simular --- */
.btn-simular-grupo {
  transition: all 0.2s ease;
}
.btn-simular-grupo:hover {
  transform: scale(1.05);
}

/* --- Bandeiras inline --- */
.flag-icon {
  display: inline-block;
  width: 1.2em;
  height: 0.8em;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 0.25rem;
  background-size: cover;
  background-position: center;
}

/* --- Loading Overlay --- */
#loadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
#loadingOverlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- Inputs de placar --- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.placar-input {
  transition: all 0.15s ease;
}
.placar-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px oklch(var(--p) / 0.3);
  border-color: oklch(var(--p));
}

/* --- Grupo card inputs hover --- */
.grupo-card input[type="number"]:hover {
  border-color: oklch(var(--p) / 0.5);
}

/* --- Animação ao atualizar classificação --- */
@keyframes highlightRow {
  0% { background-color: oklch(var(--suc) / 0.3); }
  100% { background-color: transparent; }
}
.classif-atualizada {
  animation: highlightRow 1s ease-out;
}

/* --- Badge de classificado --- */
.badge-classificado {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
}

/* --- Scroll horizontal no bracket (mata-mata) --- */
#mataMataContainer {
  scrollbar-width: thin;
  scrollbar-color: oklch(var(--p) / 0.3) transparent;
}
#mataMataContainer::-webkit-scrollbar {
  height: 6px;
}
#mataMataContainer::-webkit-scrollbar-track {
  background: transparent;
}
#mataMataContainer::-webkit-scrollbar-thumb {
  background: oklch(var(--p) / 0.3);
  border-radius: 3px;
}

/* --- Ajustes responsivos para os inputs --- */
@media (max-width: 480px) {
  .bracket-round {
    min-width: 140px;
  }
  .bracket-round input[type="number"] {
    width: 28px !important;
    font-size: 0.7rem;
  }
}