* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #fff;
  background:
    linear-gradient(rgba(2,6,23,0.92), rgba(2,6,23,0.92)),
    url("https://i.imgur.com/gkrPPRp.png") no-repeat center center fixed;
  background-size: cover;
}

/* HEADER */
.top-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #0f766e;
}

.logo-altv {
  height: 42px;
}

.header-text h1 {
  margin: 0;
  font-size: 22px;
}

.header-text span {
  font-size: 13px;
  opacity: 0.8;
}

/* SEÇÕES */
section {
  padding: 16px;
}

section h2 {
  color: #22c55e;
  font-size: 14px;
  margin-bottom: 10px;
}

/* LINHA */
.row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

/* CARD */
.card {
  min-width: 340px;
  background: #0f172a;
  border-radius: 18px;
  padding: 16px;
  position: relative;
}

/* LIGA */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #fff;
  background:
    linear-gradient(rgba(2,6,23,0.92), rgba(2,6,23,0.92)),
    url("https://i.imgur.com/gkrPPRp.png") no-repeat center center fixed;
  background-size: cover;
}

/* HEADER */
.top-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid #0f766e;
}

.logo-altv {
  height: 42px;
}

.header-text h1 {
  margin: 0;
  font-size: 22px;
}

.header-text span {
  font-size: 13px;
  opacity: 0.8;
}

/* SEÇÕES */
section {
  padding: 16px;
}

section h2 {
  color: #22c55e;
  font-size: 14px;
  margin-bottom: 10px;
}

/* LINHA */
.row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

/* CARD */
.card {
  min-width: 380px;
  background: linear-gradient(180deg, #0b1224, #0f172a);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,0.08);
}

/* 🔥 HEADER DA LIGA (MELHORADO) */
.liga-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(34,197,94,0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #22c55e;
  max-width: fit-content;
}

.liga-info img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(34,197,94,0.6));
}

/* STATUS */
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
}

.badge.ao_vivo {
  background: #e50914;
  box-shadow: 0 0 10px #e50914;
}

.badge.agendado {
  background: #22c55e;
}

.badge.encerrado {
  background: #555;
}

/* TIMES */
.times {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 32px;
}

.time {
  text-align: center;
}

.time img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.time span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
}

/* PLACAR */
.placar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 28px;
  font-weight: bold;
}

.placar.vazio {
  min-width: 40px;
}

/* INFO */
.hora {
  margin-top: 8px;
  text-align: center;
  color: #22c55e;
  font-size: 12px;
}

.canal {
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  opacity: 0.7;
}

.card.encerrado {
  opacity: 0.55;
}

/* STATUS */
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: bold;
}

.badge.ao_vivo {
  background: #e50914;
  box-shadow: 0 0 10px #e50914;
}

.badge.agendado {
  background: #22c55e;
}

.badge.encerrado {
  background: #555;
}

/* TIMES */
.times {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 28px;
}

.time {
  text-align: center;
}

.time img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.time span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
}

/* PLACAR */
.placar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 34px;
  font-weight: bold;
}

.placar.vazio {
  min-width: 40px;
}

/* INFO */
.hora {
  margin-top: 8px;
  text-align: center;
  color: #22c55e;
  font-size: 12px;
}

.canal {
  margin-top: 6px;
  text-align: center;
  font-size: 11px;
  opacity: 0.7;
}

.card.encerrado {
  opacity: 0.55;
}

/* ===== DIFERENCIAÇÃO POR STATUS ===== */

.card.ao_vivo {
  box-shadow:
    0 0 0 1px rgba(229, 9, 20, 0.6),
    0 0 18px rgba(229, 9, 20, 0.45);
  border: 1px solid rgba(229, 9, 20, 0.6);
}

.card.agendado {
  box-shadow:
    inset 0 0 0 1px rgba(34, 197, 94, 0.35);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.card.encerrado {
  box-shadow:
    inset 0 0 0 1px rgba(148, 163, 184, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.25);
  filter: grayscale(0.2);
}

/* ===== animação ao vivo ===== */

@keyframes pulsarPlacar {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.card.ao_vivo .placar {
  color: #e50914;
  animation: pulsarPlacar 1.4s infinite ease-in-out;
}

.badge {
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.card.ao_vivo .badge {
  animation: pulsarPlacar 1.6s infinite;
}

/* ===== DESTAQUE BRASILEIRÃO ===== */

.card.brasileirao {
  border: 1px solid rgba(250, 204, 21, 0.7);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.4),
    0 0 22px rgba(250, 204, 21, 0.25);
}

/* Header da liga diferente */
.card.brasileirao .liga-info {
  background: linear-gradient(
    135deg,
    rgba(250, 204, 21, 0.25),
    rgba(34, 197, 94, 0.18)
  );
  color: #facc15;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.35);
}

/* Logo da liga com mais destaque */
.card.brasileirao .liga-info img {
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.8));
}

/* ===== INDICADOR DE ATUALIZAÇÃO ===== */

.updated-at {
  font-size: 11px;
  margin-top: 4px;
  color: #94a3b8;
}

/* ===== DESTAQUE CLÁSSICO ===== */

.card.classico {
  box-shadow:
    0 0 0 2px rgba(239, 68, 68, 0.6),
    0 0 22px rgba(239, 68, 68, 0.4);
}

.classico-nome {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

  body {
    background-attachment: scroll;
  }

  .top-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .logo-altv {
    height: 36px;
  }

  section {
    padding: 12px;
  }

  section h2 {
    font-size: 13px;
  }

  .row {
    gap: 10px;
  }

  .card {
    min-width: 85vw;
    padding: 16px;
  }

  .liga-info {
    font-size: 11px;
    padding: 5px 10px;
  }

  .liga-info img {
    width: 18px;
    height: 18px;
  }

  .times {
    margin-top: 22px;
  }

  .time img {
    width: 42px;
    height: 42px;
  }

  .time span {
    font-size: 12px;
  }

  .placar {
    font-size: 26px;
  }

  .badge {
    font-size: 10px;
    padding: 3px 10px;
  }

  .classico-nome {
    font-size: 10px;
    padding: 3px 8px;
  }

  .canal {
    font-size: 10px;
  }
}

/* ===== BARRA AO VIVO ===== */

.live-bar {
  position: fixed;
  bottom: 14px;
  right: 14px;
  width: 320px;
  max-height: 60vh;
  background: #020617;
  border: 1px solid rgba(229, 9, 20, 0.6);
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.5);
  border-radius: 14px;
  padding: 12px;
  z-index: 9999;
  overflow-y: auto;
}

.live-bar.hidden {
  display: none;
}

.live-bar h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #e50914;
  text-transform: uppercase;
}

.live-item {
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.live-item strong {
  color: #fff;
}

/* Mobile */
@media (max-width: 768px) {
  .live-bar {
    left: 10px;
    right: 10px;
    width: auto;
  }
}

/* ===== LOADING OVERLAY ===== */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #22c55e;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid rgba(34,197,94,0.2);
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== BARRA NEON POR TIME ===== */

.card {
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 6px;
  border-radius: 6px;
  opacity: 0.85;
}

/* ===== BRASIL ===== */
.card.time-flamengo::before {
  background: linear-gradient(180deg, #c4161c, #000);
  box-shadow: 0 0 12px #c4161c;
}

.card.time-palmeiras::before {
  background: #046a38;
  box-shadow: 0 0 12px #046a38;
}

.card.time-corinthians::before,
.card.time-vasco::before,
.card.time-botafogo::before,
.card.time-santos::before {
  background: linear-gradient(180deg, #fff, #000);
  box-shadow: 0 0 10px #aaa;
}

.card.time-saopaulo::before {
  background: linear-gradient(180deg, #c4161c, #000, #fff);
}

.card.time-fluminense::before {
  background: linear-gradient(180deg, #006341, #7a263a);
}

.card.time-gremio::before {
  background: linear-gradient(180deg, #00a3e0, #000);
}

.card.time-internacional::before {
  background: #c4161c;
}

.card.time-cruzeiro::before {
  background: #003da5;
}

/* ===== EUROPA ===== */
.card.time-real-madrid::before {
  background: #fff;
  box-shadow: 0 0 10px #fff;
}

.card.time-barcelona::before {
  background: linear-gradient(180deg, #004d98, #a50044);
}

.card.time-bayern::before {
  background: #dc052d;
}

.card.time-dortmund::before {
  background: linear-gradient(180deg, #fde100, #000);
}

.card.time-psg::before {
  background: linear-gradient(180deg, #004170, #e30613);
}

.card.time-milan::before {
  background: linear-gradient(180deg, #a50010, #000);
}

.card.time-inter::before {
  background: linear-gradient(180deg, #00529f, #000);
}
