/* goat24.st — watch page */
.page-watch { --wrap: 1800px; }
.page-watch .header .wrap,
.page-watch .watch { max-width: var(--wrap); }
.watch {
  --player-width: min(100%, max(280px, calc((100dvh - 210px) * 16 / 9)));
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 12px 18px;
}
.stream-container { width: 100%; }
.stream-title {
  width: 100%;
  margin: 0;
  padding: 0 0 14px;
  color: #d6c5ff;
  font: 700 clamp(1.4rem, 3vw, 2rem)/1.2 var(--font-display);
  letter-spacing: -.04em;
  text-wrap: balance;
}

.player-layout {
  display: block;
}
.player-main {
  width: var(--player-width);
  min-width: 0;
  margin-inline: auto;
}
.iframe-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #000;
}
iframe { display: block; width: 100%; height: 100%; border: none; }
.player-controls {
  width: var(--player-width);
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline: auto;
  padding: 8px 0;
}
.player-control {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #242424;
  border-radius: 8px;
  background: #111;
  color: #f5f5f5;
  font: 600 .8125rem/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
@media (hover: hover) { .player-control:hover { background: #1b1b1b; border-color: #454545; } }
.back { margin: 0; }
.stream-menu { position: relative; }
.stream-menu-toggle { list-style: none; background: transparent; }
.stream-menu-toggle:hover { background: transparent; }
.stream-menu-toggle::-webkit-details-marker { display: none; }
.stream-menu-label { color: #a8a8a8; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; }
.stream-current { font-weight: 700; }
.stream-chevron { margin-left: 8px; color: #aaa; font-size: 1rem; }
.stream-menu[open] .stream-chevron { transform: rotate(180deg); }
.stream-menu .sources-list {
  position: absolute;
  z-index: 20;
  left: 0;
  bottom: calc(100% + 8px);
  width: min(280px, calc(100vw - 32px));
  max-height: min(360px, 55vh);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  overflow-y: auto;
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
}
.source-row {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eee;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) { .source-row:hover { background: rgba(255,255,255,.08); } }
.source-row.active { background: rgba(255,255,255,.12); }
.source-name { font-weight: 600; font-size: .8125rem; }
.source-badge { margin-left: auto; flex-shrink: 0; padding: 2px 8px; border-radius: 999px; font: 700 .625rem var(--font-body); background: #eee; color: #080808; }
.source-badge.is-sd { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }
.stream-issue-notice { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .875rem; color: var(--muted); overflow-wrap: anywhere; }
.stream-issue-notice a { color: var(--accent-text); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .stream-issue-notice a:hover { text-decoration: underline; } }

.related-matches {
  width: var(--player-width);
  margin: 18px auto 0;
}
.related-title {
  margin: 0 0 10px;
  font: 700 1rem/1.25 var(--font-display);
  letter-spacing: -.02em;
}
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
}
.related-match {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background-color .15s;
}
@media (hover: hover) { .related-match:hover { border-color: var(--accent-text); background: rgba(255,255,255,.06); } }
.related-match-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: .8125rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-match-time { flex: none; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.related-match-arrow { flex: none; color: var(--accent-text); }

@media (max-width: 760px) {
  .page-watch .stream-title { padding-bottom: 12px; font-size: clamp(1.25rem, 5vw, 1.5rem); }
  .watch { --player-width: 100%; padding: 8px 14px 24px; }
  .player-main {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    transform: translateX(0);
  }
  .player-controls { gap: 6px; padding: 8px 0; }
  .player-control { min-height: 34px; gap: 5px; padding-inline: 8px; font-size: .7rem; }
  .stream-menu .sources-list {
    right: auto;
    left: 0;
    width: min(250px, calc(100vw - 90px));
    max-width: calc(100vw - 90px);
  }
  .source-row { min-height: 36px; padding: 6px 8px; }
  .source-name { font-size: .75rem; }
  .source-badge { padding: 2px 6px; font-size: .5625rem; }
  .related-matches { width: 100%; padding-inline: 14px; }
  .related-list { grid-template-columns: 1fr; }
  .related-title { font-size: .9rem; }
  .related-match { min-height: 42px; gap: 7px; padding: 7px 9px; }
  .related-match-title { font-size: .75rem; }
  .related-match-time { font-size: .6875rem; }
}
@media (max-width: 380px) {
  .player-control { padding-inline: 7px; font-size: .675rem; }
  .stream-menu-label { display: none; }
}
