html, body{
  margin:0;
  padding:0;
  width:1920px;
  height:1080px;
  background: transparent;
  overflow:hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

.stage{ position:relative; width:1920px; height:1080px; }

/* Shared show/hide */
.on{ opacity:1 !important; pointer-events:auto !important; }

/* =========================
   BIG SCORE (bottom center)
   ========================= */
#BigScore{
  position:absolute;
  left:50%;
  bottom:70px;
  transform:translateX(-50%) translateY(30px);
  width:1500px;
  opacity:0;
  pointer-events:none;
  transition: opacity 280ms ease, transform 280ms ease;
}
#BigScore.on{ opacity:1; transform:translateX(-50%) translateY(0); }

.headerSlot{ height: 36px; position: relative; margin: 0 0 10px 0; }
.footerSlot{ height: 22px; position: relative; margin: 10px 0 0 0; }

.matchBox{
  position:absolute;
  left:50%;
  top:0;
  transform: translateX(-50%);
  max-width: 1300px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--labelBg);
  border: 1px solid var(--labelStroke);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  color: var(--textMain);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  opacity: 0;
  clip-path: inset(0 50% 0 50% round 999px);
  transition: clip-path 320ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
}
.matchBox.isOn{ opacity: 1; clip-path: inset(0 0 0 0 round 999px); }

.panel{
  height:110px;
  border-radius:22px;
  background:var(--panelBg);
  border:1px solid var(--panelStroke);
  box-shadow:0 25px 70px var(--panelShadow);
  overflow:hidden;
  position: relative;
}
.panel::after{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:16px;
  background:var(--panelInsetBg);
  border:1px solid rgba(255,255,255,0.07);
  backdrop-filter:blur(10px);
}

/* In DARK: brandLine hidden; teamLine acts as the original topline */
.brandLine{ display:none; }
.teamLine{
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  background:linear-gradient(90deg,var(--t1),rgba(255,255,255,0.15),var(--t2));
}

.content{
  position:absolute;
  inset:0 34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:2;
}

.colorBar{ width:12px; height:70px; border-radius:8px; }
#bigColor1{ background:var(--t1); }
#bigColor2{ background:var(--t2); }

.logoSlot{
  width: 70px;
  height: 70px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.logoCircle{
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: #ffffff;
  border: 3px solid #000000;
  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
  overflow: hidden;
  display:none;
}
.logoCircle.isOn{ display:block; }
.logoCircle img{
  width:100%;
  height:100%;
  object-fit: contain;
  display:block;
  padding:6px;
  box-sizing: border-box;
}

.teamName{
  width: 390px;
  font-size:32px;
  font-weight:800;
  color:var(--textMain);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.leftName{ text-align:left; }
.rightName{ text-align:right; }

.scoreCenter{ display:flex; align-items:center; gap:30px; }

.score{
  font-variant-numeric: tabular-nums;
  font-size:70px;
  font-weight:900;
  color:var(--textMain);
  min-width:90px;
  text-align:center;
  padding:6px 16px;
  border-radius:14px;
  background:var(--scoreChipBg);
  border:1px solid var(--scoreChipStroke);
}

.separator{ font-size:36px; font-weight:700; opacity:0.7; }

.league{
  position:absolute;
  left:50%;
  top:0;
  transform: translateX(-50%);
  max-width: 1400px;
  text-align:center;
  color: var(--textMuted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-shadow: 0 10px 26px rgba(0,0,0,0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  clip-path: inset(0 50% 0 50%);
  transition: clip-path 320ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
}
.league.isOn{ opacity: 1; clip-path: inset(0 0 0 0); }

/* =========================
   SCORE BUG (top-left)
   ========================= */
#ScoreBug{
  position:absolute;
  left:40px;
  top:40px;
  width: 560px;
  opacity:0;
  pointer-events:none;
  transform: translateX(-18px);
  transition: opacity 220ms ease, transform 260ms ease;
}
#ScoreBug.on{ opacity:1; transform: translateX(0); }

.bugShell{
  border-radius:18px;
  background: rgba(10,12,18,0.78);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 55px rgba(0,0,0,0.55);
  overflow:hidden;
  position:relative;
}
.bugShell::after{
  content:"";
  position:absolute;
  inset:6px;
  border-radius:14px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

/* Dark: brandLine hidden; teamLine is the old bugTopLine */
.bugBrandLine{ display:none; }
.bugTeamLine{
  position:absolute;
  top:0; left:0; right:0;
  height:3px;
  background:linear-gradient(90deg,var(--t1),rgba(255,255,255,0.18),var(--t2));
}

.bugRow{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
}

.bugColor{
  width: 8px;
  height: 44px;
  border-radius: 999px;
  opacity: 0.95;
}
#bugColor1{ background: var(--t1); }
#bugColor2{ background: var(--t2); }

.bugLogoCircle{
  width: 34px;
  height: 34px;
  border-radius:999px;
  background:#fff;
  border:2px solid #000;
  overflow:hidden;
  display:none;
  box-shadow: 0 10px 18px rgba(0,0,0,0.35);
}
.bugLogoCircle.isOn{ display:block; }
.bugLogoCircle img{
  width:100%;
  height:100%;
  object-fit:contain;
  padding:4px;
  box-sizing:border-box;
}

.bugName{
  flex:1;
  min-width:0;
  font-size: 16px;
  font-weight: 900;
  color: var(--textMain);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bugName.right{ text-align:right; }

.bugScore{
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 950;
  color: var(--textMain);
  background: var(--scoreChipBg);
  border: 1px solid var(--scoreChipStroke);
  border-radius: 12px;
  padding: 6px 10px;
  min-width: 40px;
  text-align:center;
}
.bugSep{ font-size: 16px; font-weight: 900; opacity: 0.7; }

/* =========================
   LOWERTHIRD
   ========================= */
#Lowerthird{
  position:absolute;
  left:50%;
  bottom:70px;
  transform: translateX(-50%) translateY(24px);
  width: 1180px;
  opacity:0;
  pointer-events:none;
  transition: opacity 240ms ease, transform 280ms ease;
}
#Lowerthird.on{ opacity:1; transform: translateX(-50%) translateY(0); }

.lowerPanel{
  height: 118px;
  border-radius:22px;
  background:var(--panelBg);
  border:1px solid var(--panelStroke);
  box-shadow:0 25px 70px var(--panelShadow);
  overflow:hidden;
  position: relative;
}
.lowerPanel::after{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:16px;
  background:var(--panelInsetBg);
  border:1px solid rgba(255,255,255,0.07);
  backdrop-filter:blur(10px);
}

/* Dark: brandLine hidden; teamLine is topline */
.lowerBrandLine{ display:none; }
.lowerTeamLine{
  position:absolute;
  top:0; left:0; right:0;
  height:4px;
  background:linear-gradient(90deg,var(--t1),rgba(255,255,255,0.14),var(--t2));
}

.lowerContent{
  position:absolute;
  inset:0 34px;
  z-index:2;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
}

.lowerTitle{
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0.2px;
  color: var(--textMain);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lowerSubtitle{
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: rgba(255,255,255,0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small animations */
@keyframes pop{ 0%{transform:scale(1)} 40%{transform:scale(1.15)} 100%{transform:scale(1)} }
.pop{ animation: pop 0.25s ease; }
@keyframes tick{ 0%{opacity:.8; transform:translateY(2px)} 100%{opacity:1; transform:translateY(0)} }
.tick{ animation: tick 0.2s ease; }
