/* Big-screen, D-pad-first layout. The original mobile website is unchanged. */
:root{--green:#a9ff2c}
html{scroll-behavior:auto}
body{font-size:18px}
header{padding:15px 3.4vw;gap:20px;min-height:86px}
main{max-width:1900px;min-height:100vh;padding:24px 3.5vw 45px}
#search{width:190px;font-size:15px;padding:8px 11px;min-height:40px}
#download-full,#download-playlist{display:none!important}
/* Search stays after Motorsport in the sports row. Refresh is now before
   YOUR MATCHDAY STARTS HERE above the row. */
.heading{justify-content:flex-start;align-items:center;gap:12px;margin-bottom:14px}
.heading #refresh{flex:0 0 auto;font-size:22px;line-height:1;padding:6px 11px;min-width:44px;min-height:40px;margin:0}
.heading small{display:block;line-height:1.4}
#filter-bar .search-actions{display:flex;align-items:center;gap:7px;margin:0 4px 0 2px;min-width:0;flex:0 0 auto;white-space:nowrap}
#filter-bar .search-actions #search{width:190px;min-width:140px;flex:0 0 190px}

.chips{padding:4px 2px 12px;gap:7px}.chips button{font-size:14px;padding:7px 12px;min-height:40px}
/* One TV filter strip: All, Live, Upcoming, then Football and other sports. */
#filter-bar{display:flex;align-items:center;gap:0;margin:8px 0 20px;min-width:0;flex-wrap:nowrap}
#filter-bar .chips{display:flex;align-items:center;flex-wrap:nowrap;gap:7px;margin:0;padding:5px 2px;min-width:0}
#filter-bar .chips button{flex:0 0 auto;white-space:nowrap}
#filter-bar #sports{flex:1 1 auto;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior-x:contain}
#filter-bar #sports::-webkit-scrollbar{display:none}
#filter-bar #filters{display:flex;flex:0 0 auto;overflow:visible;gap:7px;border:0;margin:0;padding:0}
#filter-bar #filters[hidden]{display:none!important}
/* Exactly four compact event tiles per row on the TV display. */
.grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:stretch}
/* Tighten the contents as well, so more rows fit vertically on screen. */
.card{padding:12px;border-radius:12px;min-height:206px}
.cardtop{font-size:10px;gap:5px}
.card .star{font-size:21px}
.card h2{font-size:16px;line-height:1.2;margin:6px 0;overflow-wrap:anywhere}
.card p{font-size:12px;margin:3px 0 10px}
.teams{gap:7px;margin:9px 0 5px}
.teams>div{font-size:11px;min-width:0;overflow-wrap:anywhere}
.teams img{width:43px;height:43px;margin-bottom:5px}
.card>img{width:52px;height:52px;margin:9px auto}
/* Compact Watch now buttons; do not make the D-pad focus highlight smaller. */
.watch{font-size:13px;line-height:1.2;padding:6px 12px;min-height:36px;width:min(72%,160px);align-self:center;border-radius:7px}
button:focus,a:focus,input:focus,.category:focus{
  outline:4px solid #a9ff2c!important;outline-offset:3px!important;
  border-color:#a9ff2c!important;box-shadow:0 0 0 6px #a9ff2c25;
}
.category{min-height:220px}.category span{font-size:16px}
dialog{width:min(1000px,92vw);max-height:85vh;padding:24px}
.playerhead h2{font-size:23px}#close{font-size:22px}
#video{display:none!important}#play-message{font-size:17px}
/* Fixed-width link columns prevent direction-dependent jumps on a TV D-pad. */
#sources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-height:46vh;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scroll-behavior:auto;padding:6px 5px 12px;align-content:start}
#sources button{font-size:19px;padding:14px 16px;min-height:58px;width:100%;text-align:left;overflow-wrap:anywhere;line-height:1.25}
@media(max-width:850px){#sources{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){#sources{grid-template-columns:minmax(0,1fr)}}
@media(max-width:1100px){
  .grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
  main{padding:18px 2.5vw}
  header{gap:12px;padding:12px 2.5vw}
  #filter-bar .search-actions #search{width:165px;flex-basis:165px}
  .card{padding:10px}.card h2{font-size:15px}
  .teams img{width:38px;height:38px}
  .watch{font-size:12px;padding:5px 10px;min-height:34px;width:min(78%,145px)}
}

/* On Android TV a tile has only one selectable control: its Watch button. */
.card .star:focus{outline:none!important;box-shadow:none!important;border-color:transparent!important}

/* Keep filter row single-line even at smaller TV resolutions. D-pad scrolling
   brings overflowed controls into view; no second navigation row is created. */
@media(max-width:650px){
  #filter-bar .search-actions{width:auto;margin:0 3px;flex:0 0 auto}
  #filter-bar .search-actions #search{flex:0 0 145px;width:145px;min-width:120px}
}

/* Phone-size preview fallback; Android TV landscape keeps four columns. */
@media(max-width:700px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:390px){.grid{grid-template-columns:minmax(0,1fr)}}

/* Standalone CFY: visible modes, remote instructions and selected view. */
.heading .mode-switch{margin-left:14px;display:flex;gap:8px;align-items:center}
.heading .mode-switch button{font-size:15px;padding:9px 18px;min-height:42px;white-space:nowrap}
.remote-help{font-size:12px;color:#a7b5c8;margin:-9px 0 16px;letter-spacing:.2px}
.category:focus{outline:4px solid #a9ff2c!important;outline-offset:2px!important}
#back{font-size:15px;min-height:42px;margin:5px 0 12px}
@media(max-width:740px){.heading .mode-switch{margin-left:0}.heading .mode-switch button{padding:8px 11px}}

#video { display:block; width:100%; max-height:54vh; object-fit:contain; background:#000; }
#video:fullscreen { width:100%; height:100%; max-height:none; object-fit:contain; }
