/* 1ball.pk — watch page (loads after base.css) */

.watch { padding-block: 18px 28px; }

/* One width token keeps title, player and sources perfectly aligned.
   Capped by viewport height so the player never runs past the fold. */
.stream-container {
  --player-w: min(100%, 1040px, calc((100dvh - 330px) * 16 / 9));
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (max-width: 900px) and (orientation: landscape) {
  .stream-container { --player-w: min(100%, calc((100dvh - 90px) * 16 / 9)); }
}
@media (max-width: 760px) and (orientation: portrait) {
  .stream-container { --player-w: 100%; }
}

.stream-meta {
  width: var(--player-w);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.stream-title {
  margin: 0;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 3.6vw, 2rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.iframe-container {
  width: var(--player-w);
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
iframe { display: block; width: 100%; height: 100%; border: none; }

@media (max-width: 640px) {
  .stream-meta { margin-bottom: 8px; }
  .stream-title { font-size: 1rem; letter-spacing: -.02em; }
}

.watch-controls {
  width: var(--player-w);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.back-button,
.stream-selector {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
}
.back-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-weight: 700;
  text-decoration: none;
}
.back-button svg { width: 16px; height: 16px; }
.stream-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.stream-selector-label {
  color: var(--muted);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.stream-selector select {
  max-width: min(220px, 45vw);
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 700 .875rem var(--font-body);
  cursor: pointer;
}
.stream-selector select option {
  background: var(--surface);
  color: var(--ink);
}

.related-matches {
  width: var(--player-w);
  margin-top: 24px;
}
.related-matches h2 {
  margin: 0 0 10px;
  font: 800 1.125rem var(--font-display);
  letter-spacing: -.02em;
}
.related-match-list {
  display: grid;
  gap: 8px;
}
.related-match {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.related-match-time {
  flex: none;
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 600;
}
@media (hover: hover) {
  .related-match:hover { background: var(--surface-2); }
}

.page-watch { --wrap: 1100px; }
