/* TV Mode — big, readable, fullscreen */
.tv-body{background:#0b1220;color:#e8eef5;margin:0}
.tv-wrap{min-height:100vh;display:flex;flex-direction:column;padding:18px 20px}
.tv-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.tv-brand{display:flex;align-items:center;gap:12px}
.tv-brand img{width:42px;height:42px}
.tv-title{font-size:28px;font-weight:950;letter-spacing:-.03em;line-height:1.1;margin:0}
.tv-sub{font-size:14px;color:rgba(232,238,245,.75);margin-top:4px}
.tv-actions{display:flex;gap:10px;align-items:center}
.tv-btn{display:inline-flex;align-items:center;gap:10px;padding:12px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.06);color:#e8eef5;text-decoration:none;cursor:pointer}
.tv-btn:hover{background:rgba(255,255,255,.10)}

.tv-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:16px;flex:1;min-height:0}
@media(max-width:980px){.tv-grid{grid-template-columns:1fr}}

/* Mobile segmented bar (TV mode) */
.tv-segbar{display:none;gap:10px;align-items:center;margin:0 0 12px}
.tv-seg{appearance:none;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#e8eef5;
  border-radius:14px;padding:10px 14px;font-weight:950;letter-spacing:-.01em;cursor:pointer;line-height:1}
.tv-seg:hover{background:rgba(255,255,255,.10)}
.tv-seg.is-active{background:rgba(79,140,255,.16);border-color:rgba(79,140,255,.25)}
.tv-segdot{margin-left:auto;width:10px;height:10px;border-radius:999px;background:rgba(255,255,255,.25)}
.tv-segdot[data-active="live"]{background:#ff5a6b}
.tv-segdot[data-active="standings"]{background:#4f8cff}

.tv-card{border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);border-radius:22px;padding:16px;overflow:hidden}
.tv-card h2{margin:0 0 10px;font-size:18px;font-weight:950;letter-spacing:-.02em;display:flex;align-items:center;gap:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-card h2 .i{flex:0 0 auto}

.tv-live-list{display:flex;flex-direction:column;gap:10px}
.tv-match{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;border-radius:18px;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.15)}
.tv-match.is-live{border-color:rgba(255,90,107,.22);background:rgba(255,90,107,.08)}
.tv-side{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.tv-side.right{justify-content:flex-end}
.tv-logo{width:38px;height:38px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);object-fit:cover;flex-shrink:0}
.tv-init{width:38px;height:38px;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);display:grid;place-items:center;font-weight:950;color:rgba(232,238,245,.80);flex-shrink:0}
.tv-team{font-size:18px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tv-score{font-size:22px;font-weight:950;padding:8px 14px;border-radius:18px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);white-space:nowrap}
.tv-badge{font-size:12px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;color:#ff5a6b}

.tv-table{width:100%;border-collapse:collapse;font-size:16px}
.tv-table th{font-size:12px;color:rgba(232,238,245,.70);text-align:right;padding:10px 8px;border-bottom:1px solid rgba(255,255,255,.10)}
.tv-table th:nth-child(2){text-align:left}
.tv-table td{padding:12px 8px;border-bottom:1px solid rgba(255,255,255,.08);text-align:right}
.tv-table td:nth-child(2){text-align:left}
.tv-pos{color:rgba(232,238,245,.70);font-weight:900}
.tv-pts{color:#4f8cff;font-weight:950}
.tv-row-top td{background:rgba(79,140,255,.07)}

/* Team name cell helper */
.tv-teamname{font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px;display:inline-block;vertical-align:middle}

/* Mobile standings list (TV) */
.tv-slist{display:none;flex-direction:column;gap:10px}
.tv-srow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:18px;border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.15)}
.tv-srow.tv-row-top{border-color:rgba(79,140,255,.22);background:rgba(79,140,255,.08)}
.tv-sleft{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.tv-spos{width:22px;text-align:center;font-weight:950;color:rgba(232,238,245,.70)}
.tv-smeta{min-width:0;display:flex;flex-direction:column;gap:2px}
.tv-sname{font-size:16px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
.tv-ssub{font-size:12px;color:rgba(232,238,245,.68)}
.tv-sright{text-align:right;flex-shrink:0}
.tv-spts{font-size:18px;font-weight:950;color:#4f8cff;line-height:1}
.tv-sm{font-size:11px;color:rgba(232,238,245,.65);margin-top:3px}

/* Small screens: make TV mode readable */
@media(max-width:560px){
  .tv-wrap{padding:14px 12px}
  .tv-top{flex-direction:column;align-items:stretch;gap:10px}
  .tv-brand img{width:34px;height:34px}
  .tv-title{font-size:22px}
  .tv-sub{font-size:13px}
  .tv-actions{justify-content:flex-start}
  .tv-btn{padding:10px 12px;border-radius:14px;gap:8px}
  .tv-btn-label{display:none}
  .tv-segbar{display:flex}

  /* One section at a time on mobile (auto-rotate) */
  .tv-grid{position:relative;flex:1}
  .tv-slide{position:absolute;inset:0;opacity:0;transform:translateX(10px);pointer-events:none;transition:opacity .22s ease,transform .22s ease}
  .tv-slide.is-active{opacity:1;transform:none;pointer-events:auto}

  .tv-card{padding:12px;border-radius:18px}
  .tv-card h2{font-size:16px}
  .tv-match{padding:12px;border-radius:16px;gap:10px}
  .tv-logo,.tv-init{width:34px;height:34px;border-radius:12px}
  .tv-team{font-size:16px}
  .tv-score{font-size:20px;padding:7px 12px}

  /* Reduce clutter: show fewer matches on small screens */
  #tvLiveList .tv-match:nth-child(n+5){display:none}

  /* Standings: show top 6 on small screens */
  #tvSList .tv-srow:nth-child(n+7){display:none}

  /* Standings: use list instead of table */
  .tv-table{display:none}
  .tv-slist{display:flex}
}
