:root {
  --bg: #030303;
  --bg-soft: #090909;
  --panel: rgba(10, 10, 10, 0.92);
  --panel-strong: rgba(16, 16, 16, 0.98);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f5f5f5;
  --muted: #b7b7b7;
  --accent: #ff2020;
  --accent-2: #ffffff;
  --danger: #ff8585;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

html.has-adblock-gate,
html.has-adblock-gate body {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 32, 32, 0.22), transparent 22%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(180deg, #050505 0%, #000000 100%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.site-header,
.hero,
.panel,
.player-panel,
.watch-topbar,
.site-footer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: min(240px, 58vw);
  height: auto;
}

.brand__badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 32, 32, 0.95), rgba(120, 0, 0, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 20px rgba(255, 32, 32, 0.18);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav__link.is-active,
.site-nav__link:hover {
  border-color: rgba(255, 32, 32, 0.5);
  box-shadow: 0 0 0 1px rgba(255, 32, 32, 0.25) inset;
}

.site-nav__link--telegram {
  color: #eef7ff;
  background: linear-gradient(135deg, #2aabee, #0d84d8);
  border-color: rgba(98, 196, 255, 0.45);
}

.site-nav__link--telegram:hover {
  border-color: rgba(144, 219, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(144, 219, 255, 0.3) inset;
}

.nav-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 32px;
  margin-bottom: 24px;
}

.announcement-bar {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 10px 0;
  border-radius: 18px;
  border: 1px solid rgba(98, 196, 255, 0.28);
  background: linear-gradient(90deg, rgba(42, 171, 238, 0.16), rgba(13, 132, 216, 0.08));
}

.announcement-bar__track {
  display: flex;
  width: fit-content;
  min-width: max-content;
  color: #dff3ff;
  white-space: nowrap;
  font-weight: 700;
  will-change: transform;
  animation: announcement-slide 22s linear infinite;
}

.announcement-bar__group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 48px;
  padding-inline-end: 48px;
}

.announcement-bar__group span {
  flex: 0 0 auto;
}

@keyframes announcement-slide {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 280px;
  aspect-ratio: 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 32, 32, 0.26), transparent 70%);
}

.channel-card__category,
.player-panel__category,
.related-card__group,
.stat__label,
.muted {
  color: var(--muted);
}

.ghost-button,
.filter-button,
.channel-card__link,
.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero h1,
.player-panel h1 {
  margin: 0;
  font-family: "Syne", sans-serif;
  line-height: 0.95;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.hero__subcopy {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero__stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.stat {
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
}

.layout,
.watch-layout {
  display: grid;
  gap: 24px;
}

.layout {
  grid-template-columns: 320px minmax(0, 1fr);
}

.watch-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.sidebar,
.content {
  min-width: 0;
}

.panel,
.player-panel {
  padding: 20px;
}

.panel + .panel {
  margin-top: 20px;
}

.panel + .ad-slot,
.ad-slot + .panel,
.ad-slot + .ad-slot {
  margin-top: 20px;
}

.panel--tight {
  padding-block: 14px;
}

.panel__title-row,
.watch-topbar,
.watch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel__title-row h2,
.panel h2 {
  margin: 0;
  font-size: 1rem;
}

.search {
  display: grid;
  gap: 10px;
  font-weight: 700;
}

.search__field {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.search__icon {
  color: var(--muted);
}

.search input {
  width: 100%;
  padding: 14px 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: none;
}

.search__field:focus-within {
  border-color: rgba(255, 32, 32, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 32, 32, 0.12);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-button,
.filter-button,
.channel-card__link {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: 180ms ease;
}

.ghost-button,
.filter-button {
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.ghost-button:hover,
.filter-button:hover,
.filter-button.is-active {
  border-color: rgba(255, 32, 32, 0.5);
  transform: translateY(-1px);
}

.filter-button.is-active {
  color: var(--accent-2);
  background: linear-gradient(135deg, rgba(255, 32, 32, 0.9), rgba(102, 0, 0, 0.9));
}

.ad-slot {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: calc(var(--ad-height, 90px) + 28px);
  padding: 14px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 32, 32, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(10, 10, 10, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.ad-slot[hidden] {
  display: none;
}

.ad-slot__label {
  position: absolute;
  inset: 8px auto auto 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.44);
}

.ad-slot__frame {
  display: block;
  max-width: 100%;
  border: 0;
  background: transparent;
}

.ad-slot iframe,
.ad-slot img,
.ad-slot ins {
  max-width: 100%;
}

.ad-slot--wide {
  min-height: 110px;
  margin-top: 16px;
}

.ad-slot--grid {
  grid-column: 1 / -1;
  min-height: 110px;
}

.ad-slot--watch {
  margin-top: 18px;
}

.adblock-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 32, 32, 0.18), transparent 34%),
    rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
}

.adblock-gate__panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(460px, 100%);
  padding: 28px;
  text-align: center;
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.adblock-gate__panel img {
  width: min(230px, 80%);
}

.adblock-gate__panel h2,
.adblock-gate__panel p {
  margin: 0;
}

.adblock-gate__panel h2 {
  font-family: "Syne", sans-serif;
  font-size: 1.6rem;
}

.adblock-gate__panel p {
  color: var(--muted);
  line-height: 1.55;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.channel-card,
.related-card,
.admin-card {
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.channel-card {
  display: grid;
  overflow: hidden;
  min-height: 100%;
}

.channel-card.is-offline {
  opacity: 0.58;
}

.channel-card__media {
  display: grid;
  place-items: center;
  padding: 24px;
  min-height: 140px;
  background: rgba(255, 255, 255, 0.01);
}

.channel-card__logo,
.related-card__logo {
  object-fit: contain;
}

.channel-card__logo {
  width: 100%;
  max-width: 140px;
  aspect-ratio: 16 / 9;
}

.channel-card__body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.channel-card__category,
.player-panel__category,
.related-card__group {
  margin: 0;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.channel-card__name {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.channel-card__offline {
  margin: 0;
  color: var(--danger);
  font-size: 0.92rem;
  line-height: 1.45;
}

.channel-card__link {
  width: fit-content;
  gap: 8px;
  color: var(--accent-2);
  background: linear-gradient(135deg, rgba(255, 32, 32, 0.95), rgba(102, 0, 0, 0.95));
}

.channel-card__link:hover {
  transform: translateY(-1px);
}

.watch-topbar {
  padding: 14px 18px;
  margin-bottom: 24px;
}

.player-panel h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 20px;
}

.player-stage {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#videoPlayer {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  transition: opacity 220ms ease;
}

#videoPlayer.is-loading {
  opacity: 1;
}

#videoPlayer.is-offline {
  opacity: 0.28;
  pointer-events: none;
}

.player-fallback {
  padding: 16px;
  color: var(--danger);
  background: rgba(255, 123, 123, 0.08);
}

.player-spinner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 12px;
  color: #ffffff;
  z-index: 3;
  pointer-events: none;
}

.player-spinner__ring {
  width: 64px;
  height: 64px;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 32, 32, 0.95);
  border-radius: 999px;
  box-shadow: 0 0 30px rgba(255, 32, 32, 0.18);
  animation: player-spin 0.9s linear infinite;
}

.player-spinner__label {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.player-play-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  display: inline-grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 1;
  color: #ffffff;
  background: rgba(255, 32, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  transition: 160ms ease;
  z-index: 2;
}

.player-play-overlay:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

.player-play-overlay .nav-icon {
  width: 34px;
  height: 34px;
}

.player-play-overlay.is-loading {
  opacity: 0.92;
  animation: player-pulse 1.4s ease-in-out infinite;
}

@keyframes player-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

@keyframes player-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.hidden {
  display: none;
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.related-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  transition: 180ms ease;
}

.related-card:hover {
  border-color: rgba(93, 228, 199, 0.45);
  transform: translateY(-1px);
}

.related-card__logo {
  width: 72px;
  aspect-ratio: 16 / 10;
}

.related-card__name,
.related-card__group {
  display: block;
}

.empty-state {
  padding: 24px;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding: 18px 20px;
  background:
    linear-gradient(90deg, rgba(255, 32, 32, 0.12), transparent 28%),
    rgba(10, 10, 10, 0.92);
}

.site-footer p,
.site-footer strong {
  margin: 0;
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
}

.site-footer__meta {
  color: var(--muted);
  max-width: 520px;
  text-align: right;
}

.auth-panel {
  max-width: 520px;
  margin: 0 auto 24px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.auth-form .search__field {
  display: block;
}

.auth-form input {
  width: 100%;
  padding: 14px 0;
}

.admin-layout {
  display: grid;
  gap: 24px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.admin-actions--secondary {
  align-items: end;
}

.admin-channel-list {
  display: grid;
  gap: 16px;
}

.admin-card {
  padding: 18px;
}

.admin-card.is-offline {
  border-color: rgba(255, 133, 133, 0.38);
}

.admin-card.is-removed {
  opacity: 0.72;
}

.admin-card__top,
.admin-card__identity,
.admin-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-card__identity {
  justify-content: flex-start;
}

.admin-card__identity p,
.admin-card__identity strong {
  margin: 0;
}

.admin-card__logo {
  width: 56px;
  aspect-ratio: 1;
  object-fit: contain;
}

.admin-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-status-badge.is-offline {
  color: #ffd5d5;
  border-color: rgba(255, 133, 133, 0.45);
}

.admin-status-badge.is-removed {
  color: #d3d3d3;
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.admin-grid label,
.admin-full {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.admin-full {
  margin-top: 12px;
}

.admin-input,
.admin-select {
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  outline: none;
  font: inherit;
}

.admin-input:focus,
.admin-select:focus {
  border-color: rgba(255, 32, 32, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 32, 32, 0.12);
}

.admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .layout,
  .watch-layout {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__meta {
    text-align: left;
  }

  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1400px);
    padding-top: 16px;
  }

  .hero,
  .panel,
  .player-panel,
  .watch-topbar,
  .site-header,
  .site-footer {
    border-radius: 20px;
  }

  .hero,
  .panel,
  .player-panel {
    padding: 18px;
  }

  .site-header,
  .watch-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .brand img {
    width: min(220px, 100%);
  }

  .announcement-bar {
    border-radius: 16px;
  }

  .announcement-bar__track {
    animation-duration: 18s;
  }

  .announcement-bar__group {
    gap: 32px;
    padding-inline-end: 32px;
  }

  .ad-slot {
    min-height: 86px;
    border-radius: 16px;
  }

  .hero h1,
  .player-panel h1 {
    line-height: 1.02;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-card__top,
  .admin-card__actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
