:root {
  --bg: #0c0d11;
  --bg-2: #121319;
  --bg-3: #191b23;
  --line: #24262f;
  --text: #eef0f6;
  --muted: #9aa0b0;
  --accent: #7c5cff;
  --accent-2: #ff4d6d;
  --radius: 14px;
  --header-h: 64px;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0
}

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit
}

code {
  font-family: Consolas, monospace;
  background: var(--bg-3);
  padding: 1px 5px;
  border-radius: 5px
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 17, .92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  height: var(--header-h);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.2px
}

.logo__mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #4d7cff);
  color: #fff;
  flex: none;
  box-shadow: 0 6px 18px rgba(124, 92, 255, .35);
}

.nav {
  display: flex;
  gap: 6px;
  flex: 1
}

.nav__link {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
  transition: .15s;
}

.nav__link:hover {
  background: var(--bg-3);
  color: var(--text)
}

.nav__link.is-active {
  color: var(--text);
  background: var(--bg-3)
}

.header__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-3);
  transition: .15s;
}

.btn:hover {
  filter: brightness(1.15)
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text)
}

.btn--ghost:hover {
  background: var(--bg-3);
  border-color: #33363f
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #4d7cff);
  color: #fff;
  border: 0;
  box-shadow: 0 8px 24px rgba(124, 92, 255, .35);
}

.burger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px
}

/* ---------- hero ---------- */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px
}

.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 340px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  margin-bottom: 34px;
  display: flex;
  align-items: flex-end;
}

.hero__media {
  position: absolute;
  inset: 0
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .55
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 10, 13, .96) 0%, rgba(9, 10, 13, .75) 45%, rgba(9, 10, 13, .15) 100%),
    linear-gradient(0deg, rgba(9, 10, 13, .9), transparent 60%);
}

.hero__body {
  position: relative;
  padding: 44px;
  max-width: 660px;
  z-index: 2
}

.hero__chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-2);
  padding: 5px 11px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -.5px
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px
}

.hero__meta b {
  color: var(--text);
  font-weight: 600
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.hero__loading {
  position: absolute;
  inset: 0;
  padding: 44px
}

/* ---------- sections ---------- */
.section {
  margin-bottom: 38px
}

.section__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px
}

.section__title {
  font-size: 21px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.3px
}

.section__all {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 9px;
  cursor: pointer;
  background: transparent;
}

.section__all:hover {
  color: var(--text);
  border-color: #33363f;
  background: var(--bg-2)
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ---------- card ---------- */
.card {
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  display: block;
  width: 100%
}

.card__thumb {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
}

.card__info {
  display: block;
  flex: 1;
  min-width: 0;
}

.card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease, opacity .3s;
}

.card:hover .card__thumb img {
  transform: scale(1.05);
  opacity: .85
}

.card__dur,
.card__views {
  position: absolute;
  bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, .78);
  padding: 3px 7px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.card__dur {
  right: 8px
}

.card__views {
  left: 8px
}

.card__live {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--accent-2);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
}

.card__body {
  display: flex;
  gap: 11px;
  padding: 12px 2px 0
}

.card__ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), #4d7cff);
}

.card__ava.is-hidden {
  display: none
}

.card__title {
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card:hover .card__title {
  color: #fff
}

.card__sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.card__sub span+span::before {
  content: "·";
  margin: 0 6px;
  opacity: .6
}

.img-fail {
  opacity: 0 !important
}

/* ---------- skeleton ---------- */
.ph {
  background: linear-gradient(90deg, var(--bg-3) 0%, #20222c 50%, var(--bg-3) 100%);
  background-size: 200% 100%;
  animation: sh 1.3s infinite;
  border-radius: var(--radius)
}

.ph--hero {
  width: 100%;
  height: 240px
}

.ph--title {
  width: 190px;
  height: 26px
}

.ph--thumb {
  width: 100%;
  aspect-ratio: 16/9
}

@keyframes sh {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  margin-top: 20px
}

.footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 44px;
  display: grid;
  gap: 14px
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px
}

.footer__note {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  font-size: 13.5px
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  color: var(--muted)
}

.footer__links a:hover {
  color: var(--text)
}

.footer__copy {
  font-size: 13px;
  color: #6c7284
}

/* ---------- error page ---------- */
.errorpage {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(8, 9, 12, .97);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  animation: fade .18s ease;
}

.errorpage[hidden] {
  display: none
}

@keyframes fade {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

.errorpage__box {
  max-width: 520px;
  width: 100%;
  text-align: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 46px 36px 34px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes pop {
  from {
    transform: translateY(14px) scale(.97);
    opacity: 0
  }

  to {
    transform: none;
    opacity: 1
  }
}

.errorpage__icon {
  color: var(--accent-2);
  margin-bottom: 14px
}

.errorpage__code {
  font: 600 12px/1 Consolas, monospace;
  letter-spacing: .08em;
  color: var(--accent-2);
  background: rgba(255, 77, 109, .1);
  border: 1px solid rgba(255, 77, 109, .3);
  display: inline-block;
  padding: 6px 11px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.errorpage__title {
  font-size: 27px;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -.4px
}

.errorpage__text {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 15px
}

.errorpage__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px
}

/* ---------- responsive ---------- */
@media (max-width:900px) {
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 10px 16px;
    gap: 2px;
    display: none;
  }

  .nav.is-open {
    display: flex
  }

  .burger {
    display: block
  }

  .hero__body {
    padding: 28px 22px
  }

  .hero {
    min-height: 300px
  }

  .main {
    padding: 16px
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px
  }
}

@media (max-width:520px) {
  .logo__text {
    display: none
  }

  .btn--ghost span {
    display: none
  }

  .btn--ghost {
    padding: 9px 11px
  }

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

/* ---------- watch page ---------- */
.watch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start
}

.watch[hidden] {
  display: none
}

.watch__main {
  min-width: 0
}

.player {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line)
}

.player__frame {
  position: relative;
  aspect-ratio: 16/9;
  background: #000
}

.player__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block
}

.ph--player {
  position: absolute;
  inset: 0;
  border-radius: 0
}

.watch__title {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.3;
  margin: 18px 0 14px;
  font-weight: 700;
  letter-spacing: -.3px
}

.watch__row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px
}

.watch__author {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0
}

.watch__ava {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), #4d7cff)
}

.watch__ava.is-hidden {
  display: none
}

.watch__author-name {
  font-weight: 600;
  font-size: 15px
}

.watch__author-cat {
  color: var(--muted);
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 11px
}

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

.watch__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px
}

.watch__meta b {
  color: var(--text)
}

.watch__desc {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: #c8ccd8;
  font-size: 14.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto
}

.watch__desc[hidden] {
  display: none
}

.watch__side-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px
}

.related {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.card--row {
  display: flex;
  gap: 10px;
  align-items: flex-start
}

.card--row .card__thumb {
  width: 170px;
  flex: none;
  border-radius: 10px
}

.card--row .card__body {
  padding: 0;
  flex: 1;
  min-width: 0
}

.card--row .card__ava,
.card--row .card__views {
  display: none
}

/* ---------- empty ---------- */
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  padding: 70px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px
}

.empty[hidden] {
  display: none
}

.empty__icon {
  color: var(--muted);
  margin-bottom: 6px
}

.empty__title {
  font-size: 24px;
  margin: 0 0 6px;
  font-weight: 800
}

.empty__text {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 420px
}

@media (max-width: 1080px) {
  .watch {
    grid-template-columns: 1fr
  }

  .card--row .card__thumb {
    width: 148px
  }
}