:root {
  color-scheme: dark;
  --navy-950: #050d14;
  --navy-900: #071521;
  --navy-800: #0c2232;
  --navy-700: #143247;
  --line: rgba(173, 210, 228, .16);
  --text: #f3f8fa;
  --muted: #91a8b4;
  --ball: #d9f24f;
  --ball-dark: #172000;
  --gap: #ef8569;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--navy-900);
  color: var(--text);
  font: 16px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }

.court-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .32;
}
.court-lines::before {
  content: "";
  position: absolute;
  width: min(76vw, 880px);
  aspect-ratio: 2 / 1;
  right: -10vw;
  bottom: -13vw;
  border: 1px solid var(--line);
  transform: perspective(700px) rotateX(58deg) rotateZ(-8deg);
}
.court-lines::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 70vw;
  right: 27vw;
  bottom: -25vw;
  background: var(--line);
  transform: rotate(-8deg);
}
.court-lines i {
  position: absolute;
  width: 45vw;
  height: 1px;
  right: -3vw;
  bottom: 13vw;
  background: var(--line);
  transform: rotate(-8deg);
}

.selection-view {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.home-header {
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ball);
  color: var(--ball-dark);
  font-size: 13px;
  font-weight: 900;
}
.home-header p, footer { color: var(--muted); }
.home-header p { margin: 0; font-size: 14px; }

.selection-card {
  align-self: center;
  width: min(650px, 100%);
  margin: 30px auto 60px;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(8, 25, 37, .88);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .3);
  backdrop-filter: blur(12px);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ball);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--ball); }
h1 { margin: 16px 0 8px; font-size: clamp(32px, 6vw, 50px); line-height: 1.05; letter-spacing: -.045em; }
.intro { margin: 0 0 32px; color: var(--muted); }
.selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 14px; }
.selectors label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.selectors select {
  width: 100%;
  display: block;
  margin-top: 7px;
  padding: 13px 40px 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--navy-800);
  color: var(--text);
}
.selectors select:focus { border-color: var(--ball); box-shadow: 0 0 0 3px rgba(217, 242, 79, .1); }
.watch-button {
  width: 100%;
  margin-top: 26px;
  padding: 15px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--ball);
  color: var(--ball-dark);
  cursor: pointer;
  font-weight: 850;
}
.watch-button span { float: right; font-size: 20px; line-height: 18px; }
.watch-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.unavailable { color: #ffc4b6; text-align: center; }
footer { padding: 22px 0; text-align: center; font-size: 12px; }

.player-view {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy-950);
  display: grid;
  grid-template-rows: auto 1fr;
}
.player-header {
  min-height: 68px;
  padding: 10px clamp(14px, 3vw, 36px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  background: rgba(5, 13, 20, .96);
}
.text-button, .share button, .share a {
  width: max-content;
  padding: 9px 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}
.text-button:hover, .share button:hover { color: var(--text); }
.match-heading { text-align: center; }
.match-heading strong, .match-heading span { display: block; }
.match-heading strong { font-size: 14px; }
.match-heading span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.share { justify-self: end; display: flex; align-items: center; gap: 4px; }
.share button {
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
}
.share a { color: var(--ball); font-size: 13px; }

.stage {
  min-height: 0;
  padding: clamp(12px, 2.5vh, 26px) clamp(10px, 3vw, 42px) 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.video-shell {
  position: relative;
  width: min(100%, calc((100vh - 185px) * 16 / 9));
  width: min(100%, calc((100dvh - 185px) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: auto;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 80px rgba(0,0,0,.55);
}
.video-shell video { width: 100%; height: 100%; display: block; object-fit: contain; }
.control-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 110px;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.86));
}
.center-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  transform: translate(-50%,-50%);
  border: 0;
  border-radius: 50%;
  background: rgba(217,242,79,.94);
  color: var(--ball-dark);
  cursor: pointer;
  font-size: 24px;
  padding-left: 7px;
}
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 17px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.controls button, .controls select {
  min-width: 38px;
  padding: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: white;
  cursor: pointer;
}
.controls button:hover, .controls select:hover { background: rgba(255,255,255,.12); }
.controls #fullscreen svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.controls .play-button { color: var(--ball); font-size: 18px; }
.controls .record-button { position: relative; display: flex; align-items: center; gap: 5px; color: #fff; font-size: 11px; font-weight: 750; }
.record-button::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 9px); width: max-content; max-width: 250px; padding: 7px 9px; border-radius: 7px; background: #172631; color: #fff; box-shadow: 0 5px 18px #0008; opacity: 0; pointer-events: none; transform: translate(-50%,4px); transition: opacity .15s,transform .15s; font-size: 11px; font-weight: 500; }
.record-button:hover::after, .record-button:focus-visible::after { opacity: 1; transform: translate(-50%,0); }
.record-button i { width: 9px; height: 9px; border-radius: 50%; background: #ff4b4b; }
.record-button.recording { background: rgba(255,75,75,.18); color: #ff8a8a; }
.record-button.recording i { border-radius: 2px; }
#clock { margin-right: auto; padding-left: 6px; color: #dbe4e8; font-size: 13px; font-variant-numeric: tabular-nums; }
.volume { display: flex; align-items: center; gap: 7px; color: #dbe4e8; font-size: 11px; }
.volume input { width: 76px; accent-color: var(--ball); }

.timeline-wrap { width: min(100%, 1100px); margin: 0 auto; }
.clip-status { width: min(100%, 1100px); margin: -6px auto 0; display: flex; justify-content: flex-end; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.clip-status a { padding: 7px 11px; border-radius: 8px; background: var(--ball); color: var(--ball-dark); font-weight: 800; text-decoration: none; }
.timeline {
  position: relative;
  height: 8px;
  overflow: visible;
  border-radius: 10px;
  background: #263540;
  cursor: pointer;
}
#progress { height: 100%; width: 0; border-radius: inherit; background: var(--ball); }
#gaps { position: absolute; inset: 0; }
.gap { position: absolute; height: 100%; background: var(--gap); opacity: .95; }
#thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ball);
  transform: translate(-50%,-50%);
  box-shadow: 0 0 0 4px rgba(217,242,79,.12);
}
.timeline-labels { display: flex; justify-content: space-between; margin-top: 7px; color: #60727d; font-size: 10px; }
.gap-message { margin: 4px 0 0; color: #ffbba9; font-size: 12px; text-align: center; }

.unavailable-view {
  min-height: 100vh;
  padding: 30px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}
.unavailable-view h1 { font-size: 36px; }
.unavailable-view p { color: var(--muted); }
.unavailable-view .watch-button { width: 220px; }

@media (max-width: 720px) {
  .selection-view { width: min(100% - 24px, 620px); }
  .home-header { padding-top: 18px; }
  .home-header p { display: none; }
  .selection-card { padding: 26px 20px; border-radius: 18px; margin-bottom: 30px; }
  .selectors { grid-template-columns: 1fr; gap: 12px; }
  .player-header { grid-template-columns: auto 1fr auto; min-height: 58px; gap: 8px; }
  .text-button { font-size: 0; }
  .text-button span { font-size: 22px; }
  .match-heading { text-align: left; min-width: 0; }
  .match-heading strong, .match-heading span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .share a { display: none; }
  .share button { padding: 8px; font-size: 0; }
  .share button::after { content: "Compartir"; font-size: 12px; }
  .stage { justify-content: flex-start; padding: 10px 0 14px; }
  .video-shell { width: 100%; }
  .timeline-wrap { width: calc(100% - 28px); margin-top: 4px; }
  .volume { display: none; }
  .controls { padding: 9px 10px; }
  .controls button, .controls select { padding: 6px; font-size: 12px; }
  #clock { font-size: 11px; }
  .center-play { width: 56px; height: 56px; }
}

@media (hover: none), (pointer: coarse) {
  .record-button::after { display: none; }
}

@media (max-width: 420px) {
  .controls #back, .controls #forward { display: none; }
  .controls .record-button { display: flex; }
  .match-heading span { max-width: 145px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .player-header { min-height: 48px; padding-block: 5px; }
  .stage { padding: 6px 12px; gap: 9px; }
  .video-shell { width: min(86vw, calc((100dvh - 105px) * 16 / 9)); }
  .timeline-wrap { width: min(86vw, 900px); }
  .timeline-labels { display: none; }
}
