/* =========================================================
   Cuevas Live Score — Overlay para Streamlabs / OBS
   Fondo transparente · sin scroll · escena 1920x1080
   ========================================================= */

:root {
  --bg-1: rgba(10, 12, 11, 0.92);
  --bg-2: rgba(20, 24, 22, 0.92);
  --border: rgba(255, 255, 255, 0.06);
  --neon: #2bff88;
  --neon-soft: rgba(43, 255, 136, 0.18);
  --red: #ff3b46;
  --text: #f2f5f3;
  --text-dim: #8a938d;
  --yellow: #ffd23f;
  --radius: 16px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  font-family: "Inter", "Rajdhani", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Contenedor pegado a la esquina superior izquierda de la escena */
body {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 28px;
}

/* ---------------------------------------------------------
   Tarjeta principal del marcador
   --------------------------------------------------------- */
.scoreboard {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px 12px;
  background: linear-gradient(150deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(-14px);
  opacity: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.scoreboard[data-state="visible"] {
  opacity: 1;
  transform: translateY(0);
}

/* Filo neón sutil superior */
.scoreboard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: 0.7;
}

/* Detalle rojo sutil en la esquina */
.scoreboard::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(255, 59, 70, 0.22), transparent 70%);
  pointer-events: none;
}

/* ---------------------------------------------------------
   Marca / cabecera
   --------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

.brand__text {
  font-family: "Rajdhani", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--text-dim);
}

/* ---------------------------------------------------------
   Fila del partido
   --------------------------------------------------------- */
.match {
  display: flex;
  align-items: center;
  gap: 16px;
}

.team {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 120px;
}

.team--home {
  justify-content: flex-end;
  flex-direction: row;
  text-align: right;
}

.team--away {
  justify-content: flex-start;
  text-align: left;
}

.team--home .team__name {
  order: 1;
}

.team__badge {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.team__badge img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.team__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
  white-space: nowrap;
}

/* ---------------------------------------------------------
   Núcleo: marcador + estado
   --------------------------------------------------------- */
.core {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
}

.core__scores {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Rajdhani", sans-serif;
  line-height: 1;
}

.score {
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  min-width: 24px;
  text-align: center;
  text-shadow: 0 0 12px rgba(43, 255, 136, 0.25);
  transition: transform 0.2s ease;
}

.score.bump {
  animation: bump 0.4s ease;
}

.score__sep {
  font-size: 26px;
  font-weight: 600;
  color: var(--text-dim);
  transform: translateY(-2px);
}

.core__status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--neon-soft);
  border: 1px solid rgba(43, 255, 136, 0.28);
  border-radius: 999px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
  animation: pulse 1.4s infinite ease-in-out;
}

.core__status[data-live="false"] .live-dot {
  background: var(--text-dim);
  box-shadow: none;
  animation: none;
}

.minute {
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--neon);
}

.status-sep {
  color: var(--text-dim);
  font-size: 11px;
}

.status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  text-transform: uppercase;
}

/* ---------------------------------------------------------
   Tarjetas
   --------------------------------------------------------- */
.cards {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding-top: 2px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.cards__group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cards__group[hidden] {
  display: none;
}

.card {
  width: 11px;
  height: 15px;
  border-radius: 2px;
  display: inline-block;
}

.card--yellow {
  background: var(--yellow);
  box-shadow: 0 0 6px rgba(255, 210, 63, 0.4);
}

.card--red {
  background: var(--red);
  box-shadow: 0 0 6px rgba(255, 59, 70, 0.4);
}

.cards__count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.cards__count i {
  color: var(--text-dim);
  font-style: normal;
}

/* ---------------------------------------------------------
   Animaciones
   --------------------------------------------------------- */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

@keyframes bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.35);
    color: var(--neon);
  }
  100% {
    transform: scale(1);
  }
}

/* Ajuste fino para escenas 1080p */
@media (min-width: 1600px) {
  .team__name {
    font-size: 17px;
  }
  .score {
    font-size: 36px;
  }
}
