:root {
  --bg: #12141b;
  --panel: #171a23;
  --panel2: #1d222d;
  --panel3: #232a36;
  --ink: #f4f6f8;
  --muted: #a6acb8;
  --line: rgba(255, 255, 255, .08);
  --accent: #02b875;
  --accent2: #f2c94c;
  --good: #34d399;
  --bad: #fb7185;
  --shadow: 0 22px 60px rgba(0, 0, 0, .42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #1b1f29 0, #12141b 34%, #0d0f14 100%);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a,
input,
select {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(18, 20, 27, .96);
  backdrop-filter: blur(14px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brandMark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #02b875;
  color: #07130f;
  font-weight: 950;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.navItem {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 800;
}

.navItem:hover,
.navItem.active {
  background: #202632;
  border-color: var(--line);
  color: var(--ink);
}

.navItem.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.sideStats {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sideStats span,
.pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, .05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.portal {
  margin-left: 236px;
  padding: 22px;
}

.cinemaBar {
  min-height: 48px;
  margin: -4px 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 14, 19, .82);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cinemaTab {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  padding: 8px 13px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.cinemaTab:hover,
.cinemaTab.active {
  background: var(--accent);
  color: #07130f;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 7px;
}

h1 {
  font-size: 38px;
  line-height: 1;
}

.searchWrap input,
.filters select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b202a;
  color: var(--ink);
  padding: 11px 13px;
  outline: none;
}

.searchWrap input:focus,
.filters select:focus {
  border-color: rgba(2, 184, 117, .7);
}

.hero {
  display: block;
  margin-bottom: 16px;
}

.playerShell {
  position: relative;
  min-height: 410px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #05070a;
  box-shadow: var(--shadow);
}

video {
  width: 100%;
  height: 100%;
  min-height: 410px;
  aspect-ratio: 16 / 9;
  display: block;
  background: #02050a;
  object-fit: contain;
}

.playerShade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}

.playerActions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.playerActions button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(16, 19, 26, .82);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.playerActions button:hover {
  border-color: rgba(2, 184, 117, .62);
  background: rgba(29, 34, 45, .92);
}

.playerActions button.active {
  color: #07130f;
  background: var(--accent2);
  border-color: rgba(242, 201, 76, .7);
}

.now {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.now img,
.tileLogo,
.featureLogo {
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
}

.now img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  padding: 6px;
}

#nowTitle {
  font-size: 22px;
}

#nowMeta {
  color: #d6dee9;
  font-size: 13px;
  margin-top: 5px;
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.toggle {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #1b202a;
  white-space: nowrap;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.section {
  margin-top: 22px;
}

.sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sectionHead h2 {
  font-size: 22px;
}

.sectionHead span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.featuredGrid,
.mediaGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.featureCard,
.channelCard,
.shelfCard,
.mediaCard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171a23;
  color: var(--ink);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.featureCard {
  min-height: 190px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.featureCard::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--accent);
  opacity: .82;
}

.featureTop {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.featureLogo {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  padding: 7px;
}

.featureCard h3,
.channelCard h3 {
  font-size: 15px;
  line-height: 1.25;
}

.cardMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.shelves {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.shelfCard {
  min-height: 86px;
  padding: 12px;
  text-align: left;
}

.shelfCard strong,
.shelfCard span {
  display: block;
}

.shelfCard span {
  color: var(--muted);
  margin-top: 5px;
  font-size: 12px;
}

.channelGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.channelCard {
  min-height: 168px;
  padding: 12px;
  display: grid;
  align-content: space-between;
  text-align: left;
}

.mediaCard {
  min-height: 260px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
  text-align: left;
}

.mediaCard img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #05070a;
}

.mediaCard h3 {
  font-size: 16px;
  line-height: 1.25;
}

.mediaCard p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tileTop {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.tileLogo {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  padding: 5px;
  flex: 0 0 auto;
}

.channelCard:hover,
.featureCard:hover,
.shelfCard:hover,
.mediaCard:hover {
  transform: translateY(-1px);
  border-color: rgba(2, 184, 117, .58);
  background: var(--panel3);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}

.empty {
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.seoCopy {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding: 22px 0 8px;
  max-width: 960px;
  color: #dbe4ef;
}

.seoCopy h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.seoCopy p {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 10px;
}

.seoCopy ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .featuredGrid,
  .channelGrid,
  .mediaGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 880px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .sideStats {
    margin-top: 0;
    grid-template-columns: repeat(2, max-content);
  }

  .portal {
    margin-left: 0;
    padding: 14px;
  }

  .topbar,
  .filters {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }

}

@media (max-width: 600px) {
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featuredGrid,
  .channelGrid,
  .shelves,
  .mediaGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .playerShell,
  video {
    min-height: 230px;
  }

  .playerActions {
    top: 10px;
    right: 10px;
  }

  .playerActions button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .now {
    position: static;
    padding: 12px;
    background: var(--panel);
    pointer-events: auto;
  }

  .playerShade {
    display: none;
  }
}
