@import url("/shared/design-system.css");

:root { color-scheme: dark; --tv-transition: 400ms; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body { margin: 0; color: var(--yns-white); background: var(--yns-black); font-family: var(--yns-font-body); }
#tv-stage { position: relative; width: 100vw; height: 100vh; overflow: hidden; background: radial-gradient(circle at 82% 18%, #3a3100, transparent 28%), var(--yns-black); }
.tv-screen { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; gap: min(2.6vh, 28px); padding: min(5vh, 54px) min(4.5vw, 86px); opacity: 1; transition: opacity var(--tv-transition) ease; }
.tv-screen.is-fading { opacity: 0; }
.tv-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.tv-brand { display: flex; align-items: center; gap: 1rem; font: 900 clamp(1rem, 1.5vw, 1.65rem)/1 var(--yns-font-display); text-transform: uppercase; }
.tv-brand-mark { display: grid; width: clamp(48px, 4vw, 74px); aspect-ratio: 1; place-items: center; color: var(--yns-black); background: var(--yns-yellow); border-radius: 50%; font-size: .65em; }
.tv-kicker { color: var(--yns-yellow); font-size: clamp(.7rem, .85vw, 1rem); font-weight: 950; letter-spacing: .18em; text-transform: uppercase; }
.tv-title { margin: .35rem 0 0; font: 900 clamp(2.3rem, 5vw, 6rem)/.95 var(--yns-font-display); letter-spacing: -.055em; text-transform: uppercase; }
.tv-content { display: grid; min-height: 0; align-content: center; }
.tv-footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-top: 1rem; color: #b7b7bc; border-top: 1px solid #3a3a3f; font-size: clamp(.72rem, .9vw, 1rem); }
.tv-live { display: inline-flex; align-items: center; gap: .55rem; color: var(--yns-white); font-weight: 900; text-transform: uppercase; }
.tv-live::before { width: .7rem; height: .7rem; content: ""; background: var(--yns-red); border-radius: 50%; }
.tv-leaderboard { display: grid; gap: min(1.3vh, 14px); }
.tv-row { display: grid; min-height: clamp(82px, 10vh, 116px); grid-template-columns: clamp(75px, 7vw, 125px) minmax(0, 1fr) minmax(120px, 14vw) minmax(145px, 14vw); align-items: center; overflow: hidden; background: #17171a; border: 1px solid #3a3a3f; border-radius: clamp(12px, 1.2vw, 22px); }
.tv-row:first-child { background: linear-gradient(90deg, #2d2700, #17171a 58%); border-color: #7f6a00; }
.tv-rank { align-self: stretch; display: grid; place-items: center; color: var(--yns-black); background: var(--yns-yellow); font: 900 clamp(2.2rem, 4vw, 4.8rem)/1 var(--yns-font-display); }
.tv-team { display: flex; align-items: center; gap: clamp(.75rem, 1.5vw, 1.6rem); padding-inline: clamp(1rem, 2vw, 2.2rem); min-width: 0; }
.tv-team-badge { display: grid; width: clamp(54px, 5vw, 86px); aspect-ratio: 1; flex: 0 0 auto; place-items: center; color: var(--yns-black); background: var(--yns-white); border: 5px solid var(--yns-yellow); border-radius: 50%; font: 900 clamp(.85rem, 1.3vw, 1.35rem)/1 var(--yns-font-display); }
.tv-team-name { display: block; overflow: hidden; padding-block: .08em; font: 900 clamp(1.35rem, 2.5vw, 3rem)/1.25 var(--yns-font-display); text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.tv-movement { color: #b6b6bc; font-size: clamp(.8rem, 1.2vw, 1.25rem); font-weight: 900; text-align: center; text-transform: uppercase; }
.tv-movement.up { color: #6ee7a8; }
.tv-movement.down { color: #ff7d8b; }
.tv-points { padding-right: clamp(1rem, 2vw, 2rem); font: 900 clamp(2.2rem, 4vw, 4.7rem)/1 var(--yns-font-display); text-align: right; }
.tv-points small { display: block; margin-top: .25rem; color: #9c9ca2; font: 800 clamp(.62rem, .75vw, .85rem)/1 var(--yns-font-body); letter-spacing: .12em; text-transform: uppercase; }
.tv-notice { margin-bottom: min(1.5vh, 16px); padding: .65rem 1rem; color: #ffd7dc; background: #3b1218; border-left: 7px solid var(--yns-red); font-size: clamp(.8rem, 1vw, 1.05rem); font-weight: 800; }
.tv-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2vw; }
.tv-card { padding: clamp(1.25rem, 2.5vw, 2.5rem); background: #17171a; border: 1px solid #3a3a3f; border-radius: clamp(14px, 1.3vw, 24px); }
.tv-card h2 { margin: .5rem 0 1.2rem; font: 900 clamp(1.5rem, 2.7vw, 3.3rem)/1 var(--yns-font-display); text-transform: uppercase; }
.tv-result-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.tv-result-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: .8rem; align-items: center; padding-top: .55rem; border-top: 1px solid #38383d; }
.tv-result-list strong { color: var(--yns-yellow); font: 900 1.3rem/1 var(--yns-font-display); }
.tv-result-list b { font: 900 1.2rem/1 var(--yns-font-display); }
.tv-state { display: grid; width: 100%; height: 100%; place-content: center; padding: 3rem; text-align: center; }
.tv-state h1 { margin: 1rem 0 .5rem; font: 900 clamp(2.3rem, 5vw, 5rem)/1 var(--yns-font-display); text-transform: uppercase; }
.tv-state p { color: #b8b8bd; font-size: clamp(1rem, 1.4vw, 1.4rem); }

@media (max-aspect-ratio: 4/3) {
  .tv-screen { padding-inline: 3vw; }
  .tv-row { grid-template-columns: 76px 1fr 110px 120px; }
  .tv-team-badge { width: 52px; border-width: 3px; }
}
@media (prefers-reduced-motion: reduce) { :root { --tv-transition: 0ms; } }
