/* ==========================================================================
   WORLD TV — player & watch page
   ========================================================================== */

.watch {
  display: grid;
  gap: clamp(18px, 2.4vw, 30px);
  padding-top: clamp(16px, 2.4vw, 30px);
}

.watch__topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.watch__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 7px 12px 7px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  transition: all var(--dur) var(--ease);
}

.watch__back:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.watch__back svg {
  width: 15px;
  height: 15px;
}

.watch__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
  gap: clamp(16px, 2.2vw, 28px);
  align-items: start;
}

.watch__main {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  min-width: 0;
}

/* Player surface --------------------------------------------------------- */
.player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  isolation: isolate;
}

.player:fullscreen,
.player:-webkit-full-screen {
  border-radius: 0;
  border: 0;
  aspect-ratio: auto;
  height: 100%;
}

.player__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player__poster {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(80% 80% at 50% 30%, rgba(229, 9, 20, 0.14), transparent 70%),
    linear-gradient(160deg, #15171f 0%, #06070a 100%);
}

.player__poster-logo {
  max-width: 190px;
  max-height: 96px;
  object-fit: contain;
  opacity: 0.95;
}

.player__poster-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.player__poster-meta {
  font-size: 12px;
  color: var(--text-sub);
}

.player__poster-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.player__bigplay {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

.player__bigplay:hover {
  transform: scale(1.06);
  background: var(--accent-hover);
}

.player__bigplay svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.player__status {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.player__loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  background: rgba(6, 7, 10, 0.55);
  backdrop-filter: blur(2px);
  color: var(--text-sub);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

.player__loader-inner {
  display: grid;
  justify-items: center;
  gap: 12px;
}

/* Controls --------------------------------------------------------------- */
.player__controls {
  position: absolute;
  inset: auto 0 0;
  z-index: 5;
  display: grid;
  gap: 8px;
  padding: 34px 14px 12px;
  background: linear-gradient(to top, rgba(4, 5, 8, 0.94), rgba(4, 5, 8, 0.55) 58%, transparent);
  opacity: 1;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.player.is-idle .player__controls {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.player.is-idle {
  cursor: none;
}

.player__controls-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.player__btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.86);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
  flex-shrink: 0;
}

.player__btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.player__btn:active {
  transform: scale(0.94);
}

.player__btn svg {
  width: 19px;
  height: 19px;
}

.player__btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.player__btn--play {
  background: rgba(255, 255, 255, 0.14);
}

.player__btn--main {
  width: 44px;
  height: 44px;
}

.player__volume {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player__volume input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 78px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  outline: none;
  cursor: pointer;
}

.player__volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.player__volume input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.player__spacer {
  flex: 1;
}

.player__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.player__live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-soft 1.8s infinite;
}

.player__time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
  padding: 0 4px;
}

.player__menu {
  position: absolute;
  right: 12px;
  bottom: 64px;
  z-index: 6;
  min-width: 190px;
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: rgba(16, 18, 25, 0.98);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.player__menu[hidden] {
  display: none;
}

.player__menu-title {
  padding: 7px 10px 5px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.player__menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.86);
  text-align: left;
}

.player__menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.player__menu-item.is-active {
  color: #fff;
  font-weight: 700;
}

.player__menu-item.is-active::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Error panel ------------------------------------------------------------ */
.player-error {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(6, 7, 10, 0.9);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.player-error__inner {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  max-width: 460px;
}

.player-error__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 90, 90, 0.14);
  border: 1px solid rgba(255, 90, 90, 0.3);
  color: var(--danger);
}

.player-error__icon svg {
  width: 22px;
  height: 22px;
}

.player-error__code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.player-error__title {
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
}

.player-error__text {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-sub);
}

.player-error__hint {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-mute);
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.player-error__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

/* Watch info ------------------------------------------------------------- */
.watch__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
}

.watch__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  padding: 7px;
  flex-shrink: 0;
}

.watch__heading {
  min-width: 0;
  flex: 1;
}

.watch__channel-name {
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.watch__channel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--text-sub);
}

.watch__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.watch__panel {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.watch__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.watch__now {
  display: grid;
  gap: 5px;
}

.watch__now-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.watch__now-time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
}

.watch__next {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 3px;
}

.watch__next-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
}

.watch__side-list {
  display: grid;
  gap: 6px;
}

.watch__side-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px;
  border-radius: var(--radius-xs);
  transition: background var(--dur) var(--ease);
}

.watch__side-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.watch__side-item img,
.watch__side-item .ph {
  width: 40px;
  height: 30px;
  object-fit: contain;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
}

.watch__side-item .ph {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-mute);
}

.watch__side-name {
  font-size: 12.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch__side-meta {
  font-size: 10.5px;
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch__side-item.is-current {
  background: var(--accent-soft);
}

/* Live source details ---------------------------------------------------- */
.source-detail {
  display: grid;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-mute);
}

.source-detail__url {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-sub);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 7px 9px;
  overflow-wrap: anywhere;
}
