/* ¿Cuándo juega Boca? — azul y oro, mobile-first.
   Los valores replican el mockup de Claude Design (Cuando Juega Boca.dc.html). */

:root {
  --azul-alto: #0a2347;
  --azul: #0d2c54;
  --azul-bajo: #0a1f3e;
  --oro: #f6b40e;
  --oro-claro: #ffd75e;
  --crema: #fdfaf2;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--azul);
}

body {
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--crema);
}

a { color: var(--oro); }
a:hover { color: var(--oro-claro); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  background: linear-gradient(180deg, var(--azul-alto) 0%, var(--azul) 55%, var(--azul-bajo) 100%);
  color: var(--crema);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
  box-sizing: border-box;
  text-align: center;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 560px;
}

/* ---------- Encabezado ---------- */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand__bar {
  width: 72px;
  height: 10px;
  background: var(--oro);
}

.brand__title {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 5px;
  color: var(--oro);
  margin: 0;
}

/* ---------- Equipos ---------- */

.teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.team__crest {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  flex-shrink: 0;
  background-color: rgba(246, 180, 14, 0.08);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: inset 0 0 0 2px rgba(246, 180, 14, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Marcador de posición mientras el cron todavía no bajó el escudo. */
.team__crest:not(.team__crest--filled)::after {
  content: attr(data-initial);
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: 34px;
  line-height: 1;
  color: rgba(246, 180, 14, 0.55);
}

.team__crest--filled {
  background-color: transparent;
  box-shadow: none;
  /* El círculo es solo para el placeholder; al PNG real no hay que recortarlo. */
  border-radius: 0;
}

.team__name {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 7vw, 40px);
  line-height: 1.02;
  text-transform: uppercase;
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: auto;
}

.team__name--boca { color: var(--oro); }

/* Nombres largos (Independiente, Atlético Tucumán…) no deben romper la fila. */
.team__name--largo { font-size: clamp(19px, 5vw, 30px); }
.team__name--xl    { font-size: clamp(15px, 4vw, 24px); }

.teams__vs {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: clamp(16px, 4vw, 20px);
  color: rgba(253, 250, 242, 0.5);
  flex-shrink: 0;
}

/* ---------- Competencia ---------- */

.competition {
  background: var(--oro);
  color: var(--azul);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  padding: 8px 18px;
  text-transform: uppercase;
}

/* ---------- Estados ---------- */

.live {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: clamp(24px, 8vw, 34px);
  color: var(--oro);
  animation: pulse 1.6s ease-in-out infinite;
}

.notice {
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(253, 250, 242, 0.6);
  max-width: 34ch;
}

@media (prefers-reduced-motion: reduce) {
  .live { animation: none; }
}

/* ---------- Contador ---------- */

.countdown {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.unit {
  flex: 1;
  max-width: 118px;
  background: rgba(246, 180, 14, 0.08);
  border: 2px solid var(--oro);
  padding: 16px 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.unit__value {
  font-family: 'Archivo Black', 'Archivo', sans-serif;
  font-size: clamp(30px, 9vw, 46px);
  line-height: 1;
  color: var(--crema);
  font-variant-numeric: tabular-nums;
}

.unit__label {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--oro);
  text-transform: uppercase;
}

/* ---------- Ficha del partido ---------- */

.details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  border-top: 1px solid rgba(246, 180, 14, 0.35);
  padding-top: 24px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
}

.row__key {
  color: rgba(253, 250, 242, 0.6);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 12px;
  align-self: center;
  flex-shrink: 0;
}

.row__val {
  font-weight: 700;
  text-align: right;
}

/* ---------- Próximos partidos ---------- */

.upcoming {
  width: 100%;
  border-top: 1px solid rgba(246, 180, 14, 0.35);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upcoming__title {
  color: rgba(246, 180, 14, 0.75);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.upcoming__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upcoming__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 14px;
}

.upcoming__fecha {
  color: rgba(253, 250, 242, 0.6);
  font-size: 13px;
  flex-shrink: 0;
  text-align: right;
}

.upcoming__rival {
  font-weight: 700;
}

.upcoming__torneo {
  color: rgba(253, 250, 242, 0.45);
  font-weight: 400;
  font-size: 12px;
}

/* ---------- Pie ---------- */

.updated {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(253, 250, 242, 0.35);
}

.credit {
  font-size: 12px;
  color: rgba(253, 250, 242, 0.45);
}

.credit a {
  color: rgba(246, 180, 14, 0.85);
  text-decoration: none;
  font-weight: 600;
}

.credit a:hover {
  text-decoration: underline;
}

[hidden] { display: none !important; }
