.lsp-root{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  --bg:#0b1220; --card:#0f172a; --muted:#94a3b8; --text:#e5e7eb;
  --line: rgba(148,163,184,.25);
  --accent:#22c55e; --bad:#ef4444;
}

.lsp-tv{
  background: var(--bg);
  color: var(--text);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
}

.lsp-tv-top{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  margin-bottom: 14px;
}
.lsp-titlewrap{ min-width: 0; }
.lsp-table{ font-size: 20px; font-weight: 800; }
.lsp-sub{ font-size: 12px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing:.08em; }

.lsp-conn{
  display:flex; align-items:center; gap:10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: 12px;
}
.lsp-conn .dot{ width:10px; height:10px; border-radius:999px; background: var(--accent); display:inline-block; }
.lsp-conn.bad .dot{ background: var(--bad); }
.lsp-conn .muted{ color: var(--muted); font-weight:600; }

.lsp-players{
  display:grid; grid-template-columns: 1fr auto 1fr;
  gap: 14px; align-items: stretch;
}
@media (max-width: 900px){
  .lsp-players{ grid-template-columns: 1fr; }
}

.pcard{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.pcard.turn::before{
  content:"";
  position:absolute; inset:0;
  border:2px solid rgba(34,197,94,.75);
  border-radius: 18px;
  pointer-events:none;
}
.pname{ font-size: 18px; font-weight: 800; color: var(--text); overflow-wrap:anywhere; }
.pscore{
  font-size: clamp(48px, 6vw, 90px);
  font-weight: 900;
  line-height: 1;
}
.scoreline{
  display:flex;
  align-items:baseline;
  justify-content:center;
  gap:10px;
  margin-top:10px;
}
.break-points{
  color:#22c55e;
  font-size:clamp(24px, 3vw, 44px);
  font-weight:900;
  line-height:1;
  text-shadow:0 0 10px rgba(34,197,94,.35);
}
.ptarget{
  color: var(--muted);
  margin-top: 8px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.mid{
  display:flex; flex-direction:column; justify-content:center; gap:12px;
  padding: 10px 0;
}
.meta{ display:flex; flex-direction:column; gap:10px; }
.chip{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  text-align:center;
}
.chip strong{ margin-left: 6px; }

.avgs{
  display:grid; gap:10px;
}
.avg{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  text-align:center;
  color: var(--muted);
}
.avg strong{ color: var(--text); margin-left: 6px; }

.lsp-bottom{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin-top: 14px;
  color: var(--muted);
  font-weight:700;
}
.lsp-video-slot{
  margin-top: 16px;
}
.lsp-video-frame{
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #000;
}
.lsp-video-frame iframe{
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.lsp-sponsor{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 800;
}

.lsp-tables{
  background: var(--bg);
  color: var(--text);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
}
.lsp-tables .head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:14px; }
.lsp-tables .title{ font-size: 20px; font-weight: 900; }
.lsp-tables .sub{ color: var(--muted); font-weight:700; margin-top:4px; }

.lsp-tables .conn{
  display:flex; align-items:center; gap:10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  padding: 8px 12px; border-radius: 999px; font-weight: 800; font-size: 12px;
}
.lsp-tables .conn .dot{ width:10px; height:10px; border-radius:999px; background: var(--accent); display:inline-block; }
.lsp-tables .conn.bad .dot{ background: var(--bad); }

.lsp-tables .grid{
  display:grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px){ .lsp-tables .grid{ grid-template-columns: 1fr; } }

.tcard{
  display:block; text-decoration:none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  color: var(--text);
}
.tcard:hover{ transform: translateY(-1px); }
.tname{ font-weight: 900; font-size: 16px; }
.tslug{ color: var(--muted); margin-top: 4px; font-weight: 800; font-size: 12px; }
.tupd{ color: var(--muted); margin-top: 10px; font-weight: 700; font-size: 12px; }

.lsp-tables .hint{ margin-top: 12px; color: var(--muted); font-weight: 700; }
.lsp-tables code{ background: rgba(255,255,255,.06); border:1px solid var(--line); padding:2px 6px; border-radius:10px; }

/* ===== Mini Scoreboard Wall – FINAL ===== */

.mini-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

/* === Mini Card Layout === */
.mini-card {
  background: #0b1220;
  border: 2px solid #334155;
  border-radius: 20px;
  padding: 14px;

  display: grid;
  grid-template-rows: auto 1fr auto; /* head | body | footer */
  gap: 14px;

  color: #e5e7eb;
}

/* === Header === */
.mini-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  min-width: 0;
}

.table-name {
  font-size: 16px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-link {
  margin-left: auto;
  appearance: none;
  background: transparent;
  color: #bae6fd;
  border: 1px solid rgba(186,230,253,.35);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.video-link:hover {
  background: rgba(186,230,253,.12);
}

.mini-video-slot {
  margin-bottom: 18px;
}

.mini-video-panel {
  background: #0b1220;
  border: 2px solid #334155;
  border-radius: 20px;
  padding: 14px;
  color: #e5e7eb;
}

.mini-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 900;
}

.mini-video-close {
  appearance: none;
  border: 1px solid rgba(148,163,184,.45);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #e5e7eb;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
}

.mini-video-close:hover {
  background: rgba(255,255,255,.12);
}

.live-badge {
  background: #d40000;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .5px;
  animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(212,0,0,.6); }
  70% { box-shadow: 0 0 0 6px rgba(212,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,0,0,0); }
}

.offline-badge {
  background: #555;
  color: #eee;
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 999px;
}

/* === Body === */
.mini-body {
  display: grid;
  gap: 12px;
}

.player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid transparent;
  overflow: hidden;
}

/* Player A – White */
.player-a {
  background: #f9fafb;
  color: #0f172a;
}

/* Player B – Yellow */
.player-b {
  background: #fde047;
  color: #422006;
}

.player.turn {
  border-color: #22c55e;
}

.left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.names {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.name {
  font-weight: 900;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
}

.player-goal {
  display: flex;
  flex-wrap: wrap;
  column-gap: 9px;
  row-gap: 2px;
  font-size: 11px;
  font-weight: 900;
  color: #475569;
}

.player-goal strong {
  font-weight: 900;
}

.player-b .player-goal {
  color: #713f12;
}

.score {
  font-size: 38px;
  font-weight: 900;
}

@media (max-width: 480px) {
  .score {
    font-size: 34px;
  }
}

.mini-scoreline {
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  flex: 0 0 auto;
  gap:8px;
  min-width:82px;
}

.mini-scoreline .break-points {
  color:#16a34a;
  font-size:22px;
  text-shadow:none;
}

/* Turn ball */
.turn-ball {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #94a3b8;
  opacity: .3;
}

.turn-ball.on {
  background: #22c55e;
  opacity: 1;
  box-shadow: 0 0 10px #22c55e;
}

/* === MINI FOOTER – NUCLEAR FIX === */
.mini-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;

  font-size: 12px;
  min-height: 22px;
  width: 100%;
}

.mini-footer .footer-left {
  color: #cbd5e1 !important;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-footer .footer-right {
  color: #ffffff !important;
  font-weight: 900;
  font-size: 16px;
  white-space: nowrap;
}
