/* ============================================
   PLACAR DO FUTEBOL — style.css
   Mobile-first | GE-inspired | Leve & Moderno
   ============================================ */

/* --- FONTES --- */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@400;500;600&display=swap');

/* --- VARIÁVEIS --- */
:root {
  --verde:        #1a7a30;
  --verde-escuro: #145e25;
  --verde-claro:  #e8f5ec;
  --amarelo:      #f5c800;
  --vermelho:     #d32f2f;
  --cinza-bg:     #f2f4f3;
  --cinza-card:   #ffffff;
  --cinza-borda:  #e4e8e6;
  --cinza-texto:  #5a6672;
  --preto:        #111314;
  --dark-pef:     #12151e;

  --radius-card:  12px;
  --radius-sm:    8px;
  --sombra:       0 2px 8px rgba(0,0,0,0.07);
  --sombra-hover: 0 4px 16px rgba(0,0,0,0.12);

  --font-titulo:  'Barlow Condensed', sans-serif;
  --font-corpo:   'Barlow', sans-serif;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-corpo);
  background: var(--cinza-bg);
  color: var(--preto);
  min-height: 100vh;
  padding-bottom: 70px; /* espaço nav bottom */
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ============================================
   HEADER
   ============================================ */
header {
  background: var(--verde);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 900px;
  margin: 0 auto;
}
.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-principal {
  font-family: var(--font-titulo);
  font-size: 22px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.logo-principal span {
  color: var(--amarelo);
}
.logo-sub {
  font-family: var(--font-corpo);
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}
.header-ao-vivo {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-corpo);
  font-size: 11px;
  font-weight: 600;
  color: #7fff00;
  letter-spacing: 0.5px;
}
.dot-vivo {
  width: 7px; height: 7px;
  background: #7fff00;
  border-radius: 50%;
  animation: piscando 1.2s ease infinite;
}

/* ============================================
   NAV LIGAS (abas horizontais)
   ============================================ */
.nav-ligas {
  background: var(--verde-escuro);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 52px;
  z-index: 90;
}
.nav-ligas::-webkit-scrollbar { display: none; }
.nav-ligas-inner {
  display: flex;
  padding: 0 12px;
  min-width: max-content;
  max-width: 900px;
  margin: 0 auto;
}
.liga-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-family: var(--font-corpo);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  user-select: none;
}
.liga-tab:hover { color: rgba(255,255,255,0.9); }
.liga-tab.ativa {
  color: white;
  border-bottom-color: var(--amarelo);
}
.liga-tab img {
  width: 16px; height: 16px;
  object-fit: contain;
  border-radius: 2px;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 12px;
}

/* ============================================
   SEÇÃO TÍTULO
   ============================================ */
.secao-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.secao-titulo {
  font-family: var(--font-titulo);
  font-size: 20px;
  font-weight: 700;
  color: var(--preto);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.secao-titulo span {
  color: var(--verde);
}
.secao-data {
  font-family: var(--font-corpo);
  font-size: 12px;
  color: var(--cinza-texto);
}

/* ============================================
   FILTRO STATUS
   ============================================ */
.filtro-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filtro-status::-webkit-scrollbar { display: none; }
.filtro-btn {
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-corpo);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--cinza-borda);
  background: white;
  color: var(--cinza-texto);
  white-space: nowrap;
  transition: all 0.2s;
}
.filtro-btn.ativo {
  background: var(--verde);
  color: white;
  border-color: var(--verde);
}
.filtro-btn:hover:not(.ativo) {
  border-color: var(--verde);
  color: var(--verde);
}

/* ============================================
   GRUPO LIGA (dentro dos cards)
   ============================================ */
.grupo-liga {
  margin-bottom: 20px;
}
.grupo-liga-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--verde-claro);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-left: 3px solid var(--verde);
}
.grupo-liga-header img {
  width: 18px; height: 18px;
  object-fit: contain;
}
.grupo-liga-nome {
  font-family: var(--font-titulo);
  font-size: 13px;
  font-weight: 700;
  color: var(--verde-escuro);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}
.grupo-liga-pais {
  font-family: var(--font-corpo);
  font-size: 11px;
  color: var(--cinza-texto);
}

/* ============================================
   JOGO CARD
   ============================================ */
.jogo-card {
  background: var(--cinza-card);
  padding: 12px 14px;
  border-bottom: 1px solid var(--cinza-borda);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.jogo-card:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.jogo-card:hover { background: #f8faf9; }

.jogo-linha {
  display: grid;
  grid-template-columns: 52px 1fr auto 1fr 52px;
  align-items: center;
  gap: 8px;
}

/* escudo */
.escudo {
  width: 22px; height: 22px;
  object-fit: contain;
  display: block;
}
.escudo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.escudo-wrap.direita { align-items: flex-end; }

/* nome do time */
.time-nome {
  font-family: var(--font-corpo);
  font-size: 11px;
  font-weight: 700;
  color: var(--preto);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  width: 100%;
}


/* placar central */
.placar-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 80px;
  width: 80px;
  text-align: center;
}
.placar-numeros {
  font-family: var(--font-titulo);
  font-size: 22px;
  font-weight: 800;
  color: var(--preto);
  letter-spacing: 2px;
  line-height: 1;
  display: block;
  text-align: center;
  width: 100%;
}
.placar-status {
  font-family: var(--font-corpo);
  font-size: 10px;
  font-weight: 600;
  color: var(--cinza-texto);
  letter-spacing: 0.5px;
}
.placar-status.ao-vivo {
  color: var(--vermelho);
  animation: piscando 1.2s ease infinite;
}
.placar-status.encerrado { color: #999; }
.placar-status.em-breve {
  color: #e67e00;
  font-weight: 700;
  animation: piscando 1.2s ease infinite;
}

/* coluna time esquerda */
.time-esquerda {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  width: 100%;
}
.time-direita {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  width: 100%;
}

/* ============================================
   LOADING / ERRO / VAZIO
   ============================================ */
.estado-loading,
.estado-erro,
.estado-vazio {
  text-align: center;
  padding: 48px 20px;
  color: var(--cinza-texto);
  font-family: var(--font-corpo);
}
.estado-loading .spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--cinza-borda);
  border-top-color: var(--verde);
  border-radius: 50%;
  animation: girar 0.8s linear infinite;
  margin: 0 auto 12px;
}
.estado-loading p, .estado-vazio p {
  font-size: 14px;
}
.estado-erro p {
  font-size: 14px;
  color: var(--vermelho);
}

/* ============================================
   NAV BOTTOM MOBILE
   ============================================ */
.nav-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--cinza-borda);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 0 8px;
  z-index: 200;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: none;
  color: var(--cinza-texto);
  transition: color 0.2s;
}
.nav-item.ativo { color: var(--verde); }
.nav-icon {
  font-size: 20px;
  line-height: 1;
}
.nav-label {
  font-family: var(--font-corpo);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ============================================
   PEFINHO
   ============================================ */
#pef-mini {
  position: fixed;
  bottom: 74px;
  right: 16px;
  width: 46px; height: 46px;
  background: var(--dark-pef);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 150;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
#pef-mini.oculto {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}
#pef-grande {
  position: fixed;
  bottom: 74px;
  right: 12px;
  left: 12px;
  max-width: 360px;
  margin-left: auto;
  background: var(--dark-pef);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 150;
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
#pef-grande.visivel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.pef-notif-info { flex: 1; min-width: 0; }
.pef-badge {
  display: inline-block;
  background: #16a34a;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.pef-times {
  font-family: var(--font-titulo);
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pef-detalhe {
  font-family: var(--font-corpo);
  font-size: 11px;
  color: #64748b;
  margin: 0;
}
.pef-barra {
  height: 2px;
  background: #39ff14;
  border-radius: 2px;
  width: 100%;
  margin-top: 6px;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--verde-escuro);
  color: white;
  text-align: center;
  padding: 28px 20px;
  margin-top: 20px;
}
.footer-logo {
  font-family: var(--font-titulo);
  font-size: 18px;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-logo span { color: var(--amarelo); }
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 14px;
}
.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes piscando {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
@keyframes girar {
  to { transform: rotate(360deg); }
}
@keyframes pular {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  70% { transform: translateY(-4px); }
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(57,255,20,0.45); }
  70% { box-shadow: 0 0 0 10px rgba(57,255,20,0); }
  100% { box-shadow: 0 0 0 0 rgba(57,255,20,0); }
}
@keyframes entrar {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pulsando { animation: pulseRing 1.8s ease infinite; }
.anim-pular { animation: pular 0.65s ease infinite; }
.anim-entrar { animation: entrar 0.3s ease forwards; }

/* ============================================
   RESPONSIVO DESKTOP
   ============================================ */
@media (min-width: 640px) {
  .header-inner { padding: 14px 24px; }
  .logo-principal { font-size: 26px; }
  .container { padding: 20px 24px; }
  .jogo-linha { grid-template-columns: 36px 1fr 90px 1fr 36px; }
  .time-nome { 
    font-size: 13px;
    max-width: 100%;
      } 
   .data-header {
  font-family: var(--font-titulo);
  font-size: 16px;
  font-weight: 700;
  color: var(--preto);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 4px 8px;
  border-bottom: 2px solid var(--verde);
  margin-bottom: 12px;
  margin-top: 8px;
}
 @media (min-width: 640px) {
  .header-inner { padding: 14px 24px; }
  .logo-principal { font-size: 26px; }
  .container { padding: 20px 24px; }
 .jogo-linha { grid-template-columns: 60px 1fr 120px 1fr 60px; }
  .time-nome { 
  font-size: 13px;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}
  .escudo {
    width: 28px; height: 28px;
  }
  .placar-numeros { font-size: 26px; }
  .placar-centro {
    width: 100%;
    margin: 0 auto;
  }
  body { padding-bottom: 0; }
  .nav-bottom { display: none; }
  #pef-mini { bottom: 24px; right: 24px; }
  #pef-grande { bottom: 24px; right: 24px; left: auto; width: 320px; }
}
.filtro-completo {
  background: var(--verde-escuro);
  color: white;
  border-color: var(--verde-escuro);
}
.filtro-completo:hover {
  background: var(--verde);
  border-color: var(--verde);
  color: white;
}
