/* Pantalla de TV (/tv): monitor gran, només lectura, fons fosc, lletra grossa. Mides en vw/vh perquè s'adaptin a qualsevol resolució. */
.tv-pantalla { min-height: 100vh; background: #0b1530; color: #f4f7ff; overflow: hidden; cursor: none; }
.tv-arrel { height: 100vh; display: flex; flex-direction: column; padding: 1.6vh 2vw; gap: 1.6vh; font-size: 1.6vw; }
.tv-capcalera { display: flex; align-items: center; justify-content: space-between; gap: 2vw; border-bottom: .3vh solid #f2b705; padding-bottom: 1.2vh; }
.tv-marca { display: flex; align-items: center; gap: 1.4vw; min-width: 0; }
.tv-logo { height: 8vh; width: auto; }
.tv-titol { margin: 0; font-size: 2.6vw; line-height: 1.1; font-weight: 800; }
.tv-data { margin: .3vh 0 0; font-size: 1.5vw; color: #b9c6e6; }
.tv-data::first-letter { text-transform: uppercase; }
.tv-progres { flex: 1 1 22vw; max-width: 30vw; display: flex; flex-direction: column; gap: .8vh; font-size: 1.3vw; color: #b9c6e6; }
.tv-progres-barra { display: block; height: 1.4vh; border-radius: 1vh; background: #22345f; overflow: hidden; }
.tv-progres-barra span { display: block; height: 100%; background: #2ecc71; transition: width .8s ease; }
.tv-rellotge-bloc { display: flex; flex-direction: column; align-items: flex-end; }
.tv-rellotge { font-size: 5vw; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-connexio { display: inline-flex; align-items: center; gap: .6vw; font-size: 1.2vw; margin-top: .6vh; }
.tv-simulacio { margin-top: .6vh; background: #f2b705; color: #1a1a1a; font-weight: 900; font-size: 1.2vw; letter-spacing: .12em; text-transform: uppercase; padding: .1vh 1vw; border-radius: 1vw; }
.tv-punt { display: inline-block; width: 1vw; height: 1vw; border-radius: 50%; background: currentColor; }
.tv-online { color: #2ecc71; }
.tv-offline { color: #ff6b6b; }
.tv-online .tv-punt { animation: tv-pols 2s ease-in-out infinite; }
.tv-punt-verd { color: #2ecc71; margin-right: .8vw; animation: tv-pols 1.6s ease-in-out infinite; }

.tv-cos { flex: 1 1 0; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 1.7fr 1fr; gap: 2vw; }
.tv-principal, .tv-costat { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 1.4vh; }
.tv-seccio { margin: 0; font-size: 2vw; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #f2b705; display: flex; align-items: center; }
.tv-buida { color: #b9c6e6; font-size: 1.8vw; margin: 1vh 0; }
.tv-missatge { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; font-size: 2vw; color: #b9c6e6; text-align: center; }
.tv-missatge-gran { font-size: 4vw; font-weight: 800; color: #f4f7ff; }

.tv-targetes { flex: 1; min-height: 0; display: grid; gap: 1.6vh 1.4vw; align-content: stretch; }
.tv-partit { background: #14234a; border: .25vh solid #2a3f73; border-radius: 1.2vw; padding: 1.6vh 1.6vw; display: flex; flex-direction: column; justify-content: space-between; gap: 1vh; min-width: 0; }
.tv-partit-joc { border-color: #2ecc71; box-shadow: 0 0 2.4vw rgba(46, 204, 113, .35); animation: tv-brill 2.4s ease-in-out infinite; }
.tv-partit-cap { display: flex; align-items: center; gap: 1vw; font-size: 1.5vw; color: #b9c6e6; }
.tv-partit-comp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-insignia { background: #f2b705; color: #1a1a1a; font-weight: 800; padding: .2vh .8vw; border-radius: 1vw; font-size: 1.2vw; }
.tv-partit-cos { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.2vw; text-align: center; }
.tv-equip { font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.tv-marcador { font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; background: #0b1530; border-radius: 1vw; padding: .4vh 1.2vw; white-space: nowrap; }
.tv-partit { overflow: hidden; }
.tv-equip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tv-dens-1 .tv-partit-gran .tv-equip { font-size: min(2.6vw, 4.6vh); }
.tv-dens-1 .tv-partit-gran .tv-marcador { font-size: min(5.4vw, 9vh); }
.tv-dens-2 .tv-partit-gran .tv-equip { font-size: min(2vw, 3.4vh); }
.tv-dens-2 .tv-partit-gran .tv-marcador { font-size: min(3.8vw, 6.4vh); }
.tv-dens-3 .tv-partit-gran { padding: .8vh .9vw; gap: .4vh; }
/* Amb tres columnes no hi caben els noms al costat del marcador: els dos equips van un sobre l'altre i el marcador a la dreta. */
.tv-dens-3 .tv-partit-gran .tv-partit-cos { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: .2vh 1vw; text-align: left; }
.tv-dens-3 .tv-partit-gran .tv-partit-cos > :nth-child(1) { grid-column: 1; grid-row: 1; }
.tv-dens-3 .tv-partit-gran .tv-partit-cos > :nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
.tv-dens-3 .tv-partit-gran .tv-partit-cos > :nth-child(3) { grid-column: 1; grid-row: 2; }
.tv-dens-3 .tv-partit-gran .tv-equip { font-size: min(1.4vw, 2.5vh); overflow-wrap: normal; -webkit-line-clamp: 2; }
.tv-dens-3 .tv-partit-gran .tv-marcador { font-size: min(2.4vw, 4.2vh); padding: .3vh .8vw; }
.tv-dens-3 .tv-partit-gran .tv-partit-cap, .tv-dens-3 .tv-partit-gran .tv-partit-peu { font-size: min(1.1vw, 1.9vh); }
.tv-partit-petit .tv-equip { font-size: 1.6vw; }
.tv-partit-petit .tv-marcador { font-size: 2.6vw; }
.tv-partit-petit .tv-partit-cap { font-size: 1.2vw; }
.tv-partit-peu { display: flex; justify-content: space-between; gap: 1vw; font-size: 1.4vw; color: #b9c6e6; }
.tv-espera { display: flex; flex-direction: column; gap: 1.4vh; }
.tv-espera-etiqueta { font-size: 2.2vw; font-weight: 800; }
.tv-espera-compte { font-size: 1.8vw; color: #f2b705; }

.tv-propers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1vh; flex: 1 1 0; min-height: 0; overflow: hidden; }
.tv-propers li { flex: 0 0 auto; }
.tv-propers li { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 1vw; background: #14234a; border-radius: .9vw; padding: 1vh 1vw; min-width: 0; }
.tv-proper-proxim { outline: .3vh solid #f2b705; }
.tv-proper-hora { font-size: 2.2vw; font-weight: 800; font-variant-numeric: tabular-nums; color: #f2b705; }
.tv-proper-text { display: flex; flex-direction: column; min-width: 0; }
.tv-proper-comp { font-size: 1.1vw; color: #b9c6e6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-proper-equips { font-size: 1.3vw; font-weight: 700; line-height: 1.15; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tv-proper-equips em { color: #b9c6e6; font-style: normal; font-weight: 400; }
.tv-proper-lloc { font-size: 1.2vw; color: #b9c6e6; text-align: right; white-space: nowrap; }

.tv-cos-planol { grid-template-columns: minmax(0, 2fr) minmax(26vw, 1fr); }
.tv-planol-marc { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.tv-planol { position: relative; max-width: 100%; max-height: 100%; height: 100%; border-radius: 1vw; overflow: hidden; background: #1a2a52; line-height: 0; }
.tv-planol img, .tv-planol svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tv-poligon { stroke-width: 3px; vector-effect: non-scaling-stroke; }
.tv-poligon.tv-estat-joc { fill: #2ecc71; fill-opacity: .55; stroke: #2ecc71; animation: tv-parpelleig 1.8s ease-in-out infinite; }
.tv-poligon.tv-estat-pendent { fill: #f2b705; fill-opacity: .45; stroke: #f2b705; }
.tv-poligon.tv-estat-acabat { fill: #5b7bd5; fill-opacity: .4; stroke: #5b7bd5; }
.tv-poligon.tv-estat-buit { fill: #7a828f; fill-opacity: .25; stroke: #7a828f; stroke-opacity: .5; }
.tv-etiqueta { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; background: rgba(11, 21, 48, .88); border-radius: .8vw; padding: .2vh .5vw; line-height: 1.1; max-width: 9vw; text-align: center; border: .2vh solid #f2b705; }
.tv-etiqueta.tv-estat-joc { border-color: #2ecc71; }
.tv-etiqueta-nom { font-size: .85vw; color: #b9c6e6; white-space: nowrap; }
.tv-etiqueta-marcador { font-size: 1.6vw; font-weight: 900; font-variant-numeric: tabular-nums; }
.tv-etiqueta-equips { font-size: .85vw; white-space: nowrap; }
.tv-etiqueta-joc { font-size: 1.1vw; font-weight: 900; letter-spacing: .08em; color: #2ecc71; }
.tv-llegenda { list-style: none; margin: 0; padding: 0; display: flex; gap: 2vw; font-size: 1.2vw; color: #b9c6e6; }
.tv-llegenda li { display: flex; align-items: center; gap: .5vw; }
.tv-mostra { width: 1.4vw; height: 1.4vw; border-radius: .3vw; display: inline-block; }
.tv-mostra.tv-estat-joc { background: #2ecc71; }
.tv-mostra.tv-estat-pendent { background: #f2b705; }
.tv-mostra.tv-estat-acabat { background: #5b7bd5; }
.tv-mostra.tv-estat-buit { background: #7a828f; }

.tv-resultats { display: flex; align-items: center; gap: 1.4vw; background: #14234a; border-radius: 1vw; padding: 1.2vh 1.4vw; overflow: hidden; }
.tv-resultats-titol { flex: 0 0 auto; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #f2b705; font-size: 1.4vw; }
.tv-cinta { flex: 1; overflow: hidden; }
.tv-cinta-pista { list-style: none; margin: 0; padding: 0; display: flex; gap: 4vw; width: max-content; animation: tv-cinta 70s linear infinite; }
.tv-cinta-pista li { display: flex; align-items: center; gap: .9vw; font-size: 1.7vw; white-space: nowrap; }
.tv-res-comp { font-size: 1.1vw; color: #b9c6e6; text-transform: uppercase; }
.tv-res-marcador { background: #0b1530; border-radius: .6vw; padding: 0 .8vw; font-variant-numeric: tabular-nums; }
.tv-guanya { font-weight: 800; color: #2ecc71; }

@keyframes tv-pols { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes tv-brill { 0%, 100% { box-shadow: 0 0 1.2vw rgba(46, 204, 113, .25); } 50% { box-shadow: 0 0 2.8vw rgba(46, 204, 113, .55); } }
@keyframes tv-parpelleig { 0%, 100% { fill-opacity: .35; } 50% { fill-opacity: .7; } }
@keyframes tv-cinta { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .tv-online .tv-punt, .tv-punt-verd, .tv-partit-joc, .tv-poligon.tv-estat-joc { animation: none; }
    .tv-cinta-pista { animation: none; width: auto; flex-wrap: wrap; }
    .tv-cinta-pista li[aria-hidden="true"] { display: none; }
}

.tv-compacte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6vh; flex: 1 1 0; min-height: 0; overflow: hidden; }
.tv-compacte li { flex: 0 0 auto; display: flex; align-items: center; gap: .7vw; background: #14234a; border: .2vh solid #2ecc71; border-radius: .7vw; padding: .4vh .8vw; min-width: 0; }
.tv-compacte-text { display: flex; flex-direction: column; min-width: 0; }
.tv-compacte-lloc { font-size: min(.95vw, 1.7vh); color: #b9c6e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-compacte-equips { font-size: min(1.2vw, 2.2vh); font-weight: 700; line-height: 1.1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.tv-guia { stroke: #f4f7ff; stroke-width: 2px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; opacity: .8; }
