/* Broadcast overlay — SRS FR-BRD-02.
   Designed for a 1920x1080 browser source over live pictures. */

:root {
  --ink: #ffffff;
  --dim: rgba(255, 255, 255, .72);
  --panel: rgba(11, 15, 20, .90);
  --panel2: rgba(11, 15, 20, .78);
  --accent: #f59e0b;
  --line: rgba(255, 255, 255, .16);
  --shadow: 0 6px 28px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

/* No background anywhere on the page: the switcher composites this over the
   programme feed, so any paint here would appear as a solid rectangle. */
html, body {
  margin: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
  font: 500 16px/1.35 "Inter", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* Every graphic animates in. A hard cut looks like a glitch on air. */
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes wipeIn { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes popIn  { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- scorebug ---------- */
.scorebug {
  position: absolute; top: 46px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: stretch;
  background: var(--panel); border-radius: 10px; box-shadow: var(--shadow);
  overflow: hidden; animation: riseIn .35s ease-out;
  border: 1px solid var(--line);
}
.scorebug .team { display: flex; align-items: center; gap: 18px; padding: 12px 22px; }
.scorebug .abbr { font-weight: 800; font-size: 30px; letter-spacing: .06em; }
.scorebug .score {
  font: 800 40px/1 ui-monospace, "SF Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums; min-width: 62px; text-align: center;
}
.scorebug .centre {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 26px; background: rgba(0, 0, 0, .34);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.scorebug .period { font-size: 14px; letter-spacing: .14em; color: var(--dim); font-weight: 700; }
.scorebug .clock {
  font: 800 30px/1.1 ui-monospace, "SF Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums; color: var(--accent);
}
.scorebug .bonus {
  position: absolute; bottom: -13px; left: 0; right: 0;
  display: flex; justify-content: space-between; padding: 0 26px; pointer-events: none;
}
.chip {
  background: var(--accent); color: #201400; font-size: 11px; font-weight: 800;
  letter-spacing: .1em; padding: 2px 9px; border-radius: 4px;
}

/* ---------- lower third ---------- */
.lower { position: absolute; left: 120px; bottom: 150px; animation: wipeIn .4s ease-out; }
.lower .bar {
  display: flex; background: var(--panel); border-radius: 8px;
  box-shadow: var(--shadow); overflow: hidden; min-width: 620px;
  border: 1px solid var(--line);
}
.lower .accent { width: 10px; background: var(--accent); }
.lower .text { padding: 16px 28px; }
.lower .title { font-size: 34px; font-weight: 800; letter-spacing: .01em; }
.lower .sub { font-size: 18px; color: var(--dim); margin-top: 4px; }

/* ---------- player stat card ---------- */
.card {
  position: absolute; right: 120px; bottom: 150px; width: 470px;
  background: var(--panel); border-radius: 10px; box-shadow: var(--shadow);
  border: 1px solid var(--line); overflow: hidden; animation: riseIn .38s ease-out;
}
.card-head { display: flex; align-items: center; gap: 18px; padding: 20px 24px 14px; }
.card .jersey {
  font: 800 40px/1 ui-monospace, Consolas, monospace;
  background: rgba(255, 255, 255, .10); border-radius: 8px; padding: 8px 14px;
  min-width: 74px; text-align: center;
}
.card .name { font-size: 26px; font-weight: 800; }
.card .team { font-size: 15px; color: var(--dim); margin-top: 2px; }
.card .stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); background: rgba(0, 0, 0, .26);
}
.card .stat { padding: 13px 8px; text-align: center; border-right: 1px solid var(--line); }
.card .stat:nth-child(3n) { border-right: 0; }
.card .stat .k { display: block; font-size: 11px; letter-spacing: .12em; color: var(--dim); }
.card .stat .v {
  display: block; font: 800 27px/1.15 ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.card .nostat { padding: 16px; color: var(--dim); text-align: center; }

/* ---------- team comparison ---------- */
.compare {
  position: absolute; left: 50%; bottom: 130px; transform: translateX(-50%);
  width: 720px; background: var(--panel); border-radius: 10px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  overflow: hidden; animation: riseIn .38s ease-out;
}
.compare-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 26px; background: rgba(0, 0, 0, .3);
  font-weight: 800; font-size: 20px; letter-spacing: .04em;
}
.compare-head .vs { font-size: 12px; letter-spacing: .18em; color: var(--dim); }
.cmp-row {
  display: grid; grid-template-columns: 1fr 150px 1fr; align-items: center;
  padding: 10px 26px; border-top: 1px solid var(--line);
}
.cmp-row .k { text-align: center; font-size: 12px; letter-spacing: .14em; color: var(--dim); }
.cmp-row .v {
  font: 700 24px/1 ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums; color: var(--dim);
}
.cmp-row .v:first-child { text-align: right; }
.cmp-row .v.lead { color: var(--ink); }

/* ---------- top performers ---------- */
.leaders {
  position: absolute; left: 120px; bottom: 150px; width: 520px;
  background: var(--panel); border-radius: 10px; box-shadow: var(--shadow);
  border: 1px solid var(--line); overflow: hidden; animation: wipeIn .4s ease-out;
}
.leaders-head {
  padding: 13px 24px; background: rgba(0, 0, 0, .3);
  font-size: 13px; letter-spacing: .18em; font-weight: 800; color: var(--dim);
}
.leader {
  display: grid; grid-template-columns: 12px 1fr auto 54px;
  gap: 14px; align-items: center; padding: 13px 24px;
  border-top: 1px solid var(--line);
}
.leader .dot { width: 12px; height: 12px; border-radius: 3px; }
.leader .nm { font-size: 20px; font-weight: 700; }
.leader .val {
  font: 800 26px/1 ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums;
}
.leader .lbl { font-size: 11px; letter-spacing: .12em; color: var(--dim); }

/* ---------- milestone ---------- */
.milestone {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
}
.milestone-inner {
  background: var(--panel2); border: 2px solid var(--accent); border-radius: 14px;
  padding: 34px 68px; text-align: center; box-shadow: var(--shadow);
  animation: popIn .45s cubic-bezier(.2, 1.4, .4, 1);
}
.ms-title { font-size: 46px; font-weight: 800; letter-spacing: .01em; }
.ms-sub { font-size: 20px; color: var(--dim); margin-top: 8px; }

/* ---------- connection notice ----------
   Deliberately small and dim: if the feed drops mid-broadcast this must not
   become the most prominent thing on air. */
.offline {
  position: absolute; left: 18px; bottom: 14px;
  font-size: 11px; letter-spacing: .1em; color: rgba(255, 255, 255, .38);
  background: rgba(0, 0, 0, .38); padding: 4px 10px; border-radius: 4px;
}
