/* Шууд дамжуулалт (routes_streams.py, _streams.html) */
.streams { display: grid; gap: 12px; }
.streams h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.stream-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229, 72, 77, .6);
  animation: stream-pulse 1.6s infinite; }
@keyframes stream-pulse { 70% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .stream-dot { animation: none; } }
.stream-switch { display: grid; gap: 10px; }
.stream-switch > input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stream-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.stream-tabs label { min-width: 44px; height: 40px; margin: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line); font-family: Oswald, Montserrat, sans-serif; font-size: 1.15rem; }
.stream-panes .stream { display: none; }
.stream { margin: 0; display: grid; gap: 6px; min-width: 0; }
.stream figcaption { display: grid; gap: 2px; }
.stream-slot { font-family: Oswald, Montserrat, sans-serif; font-size: 1.15rem; letter-spacing: 0.03em; line-height: 1.1; }
.stream-ad-note { margin: 0; padding: 8px 12px 2px; text-align: center; font-size: 13px; line-height: 1.35; }
.tv-melbet { display: block; margin: 14px 0 18px; line-height: 0; }
.tv-melbet video { width: 100%; height: auto; border-radius: 16px; background: #07040f; }
.tv-promo-screen[hidden] { display: none; }
.tv-promo-screen { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 28px 16px; background: rgba(6, 3, 14, .9); }
.tv-promo-screen-hit { position: absolute; inset: 0; }
.tv-melbet-huge { position: relative; z-index: 1; width: min(1100px, 96vw); margin: 0; }
.tv-promo-x { position: absolute; z-index: 2; top: 16px; right: 16px; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: #fff; color: #1a1200; font-size: 30px; line-height: 1; cursor: pointer; }
body.tv-promo-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .tv-melbet video { display: none; }
  .tv-melbet { background: #07040f url("/static/promo/melbet.jpg") center / contain no-repeat; aspect-ratio: 3840 / 1648; }
}
.stream-stage { position: relative; overflow: hidden; border-radius: 12px; background: #12071a; }
.stream-logo-bg { position: relative; z-index: 2; height: 76px; display: flex; align-items: center; justify-content: center; gap: 18px;
  overflow: hidden; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(177, 74, 214, .55), transparent 70%); }
.stream-logo-bg img { height: 48px; width: auto; display: block;
  animation: stream-logo-drift 2.8s ease-in-out infinite alternate; }
.stream-logo-bg span { font-family: Oswald, Montserrat, sans-serif; font-size: 40px; font-weight: 700;
  letter-spacing: 0.16em; color: #fff; line-height: 1;
  animation: stream-tv-slide 2.4s ease-in-out infinite alternate; }
@keyframes stream-logo-drift {
  from { transform: translateX(-28px) scale(.92) rotate(-8deg); }
  to { transform: translateX(28px) scale(1.08) rotate(8deg); }
}
@keyframes stream-tv-slide {
  from { transform: translateX(-18px); }
  to { transform: translateX(22px); }
}
@media (prefers-reduced-motion: reduce) {
  .stream-logo-bg img, .stream-logo-bg span { animation: none; }
}
.stream-frame { position: relative; z-index: 1; width: 100%; margin: 0; aspect-ratio: 16 / 9; border-radius: 0 0 12px 12px; overflow: hidden; background: #000; }
.stream-frame iframe, .stream-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.stream-switch > input:nth-of-type(1):checked ~ .stream-tabs label:nth-child(1),
.stream-switch > input:nth-of-type(2):checked ~ .stream-tabs label:nth-child(2),
.stream-switch > input:nth-of-type(3):checked ~ .stream-tabs label:nth-child(3),
.stream-switch > input:nth-of-type(4):checked ~ .stream-tabs label:nth-child(4),
.stream-switch > input:nth-of-type(5):checked ~ .stream-tabs label:nth-child(5),
.stream-switch > input:nth-of-type(6):checked ~ .stream-tabs label:nth-child(6),
.stream-switch > input:nth-of-type(7):checked ~ .stream-tabs label:nth-child(7),
.stream-switch > input:nth-of-type(8):checked ~ .stream-tabs label:nth-child(8),
.stream-switch > input:nth-of-type(9):checked ~ .stream-tabs label:nth-child(9),
.stream-switch > input:nth-of-type(10):checked ~ .stream-tabs label:nth-child(10) { background: #fff; color: #1d102d; }
.stream-switch > input:nth-of-type(1):checked ~ .stream-panes .stream:nth-child(1),
.stream-switch > input:nth-of-type(2):checked ~ .stream-panes .stream:nth-child(2),
.stream-switch > input:nth-of-type(3):checked ~ .stream-panes .stream:nth-child(3),
.stream-switch > input:nth-of-type(4):checked ~ .stream-panes .stream:nth-child(4),
.stream-switch > input:nth-of-type(5):checked ~ .stream-panes .stream:nth-child(5),
.stream-switch > input:nth-of-type(6):checked ~ .stream-panes .stream:nth-child(6),
.stream-switch > input:nth-of-type(7):checked ~ .stream-panes .stream:nth-child(7),
.stream-switch > input:nth-of-type(8):checked ~ .stream-panes .stream:nth-child(8),
.stream-switch > input:nth-of-type(9):checked ~ .stream-panes .stream:nth-child(9),
.stream-switch > input:nth-of-type(10):checked ~ .stream-panes .stream:nth-child(10) { display: grid; }
.stream-admin select { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card, transparent); color: inherit; font: inherit; }
.stream-row { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.stream-row:first-of-type { border-top: 0; }
.stream-row.is-off { opacity: .65; }
.stream-row-head { display: flex; align-items: center; gap: 8px; }
.stream-row-head b { margin-right: auto; }
.stream-drag { width: 32px; height: 32px; padding: 0; cursor: grab; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: inherit; font: inherit; }
.stream-row.is-dragging { opacity: .45; }
.stream-row-actions, .stream-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stream-edit input { flex: 1 1 220px; min-width: 0; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: inherit; font: inherit; }
.stream-row details .stream-frame { margin-top: 8px; max-width: 640px; }
@media (max-width: 720px) {
  .stream-admin input, .stream-admin select { font-size: 16px; }
  body.tv-page .sportbar,
  body.tv-page .data-health,
  body.tv-page .banner,
  body.tv-page .member-banner,
  body.tv-page .foot,
  body.tv-page .fly-channel-banner,
  body.tv-page .page-heading,
  body.tv-page .streams > h2,
  body.tv-page .streams > .muted { display: none; }
  body.tv-page #main { padding-top: 8px; }
  body.tv-page .streams { margin: 0 -16px 8px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  body.tv-page .stream-switch { position: relative; }
  body.tv-page .stream-tabs { position: absolute; z-index: 3; top: 66px; left: 8px; right: 8px; margin: 0; }
  body.tv-page .stream-tabs label { background: rgba(18, 7, 26, .72); color: #fff; }
  body.tv-page figcaption { text-align: center; padding: 6px 12px 0; }
  body.tv-page .stream-ad-note { padding: 6px 12px 8px; }
  body.tv-page .stream-stage { border-radius: 0; height: calc(100dvh - 58px - 72px - 64px - env(safe-area-inset-bottom)); }
  body.tv-page .stream-logo-bg { height: 58px; }
  body.tv-page .stream-logo-bg img { height: 34px; }
  body.tv-page .stream-logo-bg span { font-size: 28px; }
  body.tv-page .stream-frame { width: 100%; margin: 0; border-radius: 0; aspect-ratio: auto; height: calc(100% - 58px); }
}
