@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --nx-bg-deep: #020203;
  --nx-bg: #050506;
  --nx-elevated: #141414;
  --nx-surface: rgba(255, 255, 255, 0.05);
  --nx-fg: #f5f5f5;
  --nx-muted: #b3b3b3;
  --nx-accent: #e50914;
  --nx-accent-hover: #f40612;
  --nx-border: rgba(255, 255, 255, 0.08);
  --nx-radius: 6px;
  --nx-radius-lg: 12px;
  --nx-easing: cubic-bezier(0.16, 1, 0.3, 1);
  --nx-space-sm: 8px;
  --nx-space-md: 16px;
  --nx-space-lg: 24px;
  --nx-space-xl: 32px;
  --nx-space-2xl: 48px;
  --nx-nav-h: 120px;
}

html {
  color-scheme: dark;
}

body.nx-ui {
  background: linear-gradient(180deg, #0a0a0f 0%, var(--nx-bg) 28%, var(--nx-bg-deep) 100%);
  color: var(--nx-fg);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.nx-ui a,
body.nx-ui a:visited,
body.nx-ui a:hover,
body.nx-ui a:focus,
body.nx-ui a:active {
  color: #e50914;
}

body.nx-ui main a,
body.nx-ui main a:visited,
body.nx-ui main a:hover {
  color: #e50914;
}

.nx-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: linear-gradient(180deg, rgba(5, 5, 6, 0.96) 0%, rgba(5, 5, 6, 0.72) 70%, rgba(5, 5, 6, 0) 100%);
  transition: background 220ms var(--nx-easing);
}

.nx-nav.is-scrolled {
  background: rgba(5, 5, 6, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--nx-border);
}

body.admin-bar .nx-nav {
  top: 32px;
}

body.nx-ui .top-header {
  background: transparent;
  font-size: 14px;
  letter-spacing: 0.04em;
}

body.nx-ui .top-header .container {
  height: 56px;
}

body.nx-ui .header {
  background: transparent;
  padding: 8px 0 16px;
}

body.nx-ui .logo img {
  max-height: 44px;
  width: auto;
}

body.nx-ui .top-header-left ul li a,
body.nx-ui .header .main-menu ul li a,
body.nx-ui .top-header-left ul li a:hover,
body.nx-ui .header .main-menu ul li a:hover,
body.nx-ui .top-header-left ul li.current-menu-item a,
body.nx-ui .header .main-menu ul li.current-menu-item a {
  color: #e50914;
  transition: color 180ms var(--nx-easing);
}

body.nx-ui .donate-btn .btn,
body.nx-ui .btn-danger,
body.nx-ui .btn-red {
  background: var(--nx-accent);
  border: 0;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 180ms var(--nx-easing), transform 180ms var(--nx-easing);
}

body.nx-ui .donate-btn .btn:hover,
body.nx-ui .btn-danger:hover,
body.nx-ui .btn-red:hover {
  background: var(--nx-accent-hover);
}

body.nx-ui .search-box form {
  gap: 8px;
}

body.nx-ui:not(.home) .nx-nav {
  background: rgba(5, 5, 6, 0.96);
}

body.nx-ui .search-box input[type="search"],
body.nx-ui .search-box input[type="text"] {
  height: 40px;
  width: 180px;
  min-width: 140px;
  border: 1px solid var(--nx-border);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--nx-fg);
  padding: 0 12px;
}

@media (min-width: 1200px) {
  body.nx-ui .search-box input[type="search"],
  body.nx-ui .search-box input[type="text"] {
    width: 280px;
  }
}

body.nx-ui .search-box input[type="search"]::placeholder,
body.nx-ui .search-box input[type="text"]::placeholder {
  color: #8a8f98;
}

body.nx-ui .search-box button[type="submit"],
body.nx-ui .search-box input[type="submit"] {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: url("../assets/images/search.svg") center / 20px 20px no-repeat;
  color: transparent;
  font-size: 0;
}

body.home.nx-ui main {
  margin-top: 0;
  padding-bottom: 80px;
}

body.nx-ui:not(.home) main {
  margin-top: var(--nx-nav-h);
  padding-bottom: 80px;
}

@media (max-width: 991.98px) {
  :root {
    --nx-nav-h: 108px;
  }
}

/* Hero billboard */
body.nx-ui .home-hero .content > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.nx-ui .home-hero .content::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.88) 0%, rgba(5, 5, 6, 0.35) 48%, rgba(5, 5, 6, 0.12) 100%),
    linear-gradient(0deg, var(--nx-bg) 0%, rgba(5, 5, 6, 0.15) 42%, transparent 62%);
  pointer-events: none;
  z-index: 1;
}

body.nx-ui .home-hero .play-icon,
body.nx-ui .home-hero .hero_bottom {
  z-index: 2;
}

body.nx-ui .home-hero .hero_bottom {
  background: transparent;
  padding-bottom: 8vh;
}

body.nx-ui .home-hero .hero_bottom h1 {
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.65);
}

body.nx-ui .nx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 600;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background 180ms var(--nx-easing), transform 180ms var(--nx-easing), opacity 180ms var(--nx-easing);
}

.nx-btn:focus-visible,
body.nx-ui a:focus-visible,
body.nx-ui button:focus-visible,
body.nx-ui select:focus-visible,
body.nx-ui input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.nx-btn-accent {
  background: var(--nx-accent);
  color: #fff !important;
}

.nx-btn-accent:hover {
  background: var(--nx-accent-hover);
  color: #fff !important;
}

.nx-btn-light {
  background: rgba(255, 255, 255, 0.92);
  color: #111 !important;
}

.nx-btn-light:hover {
  background: #fff;
  color: #111 !important;
}

.nx-btn-ghost {
  background: rgba(109, 109, 110, 0.7);
  color: #fff !important;
}

.nx-btn-ghost:hover {
  background: rgba(109, 109, 110, 0.9);
  color: #fff !important;
}

/* Channel rows */
.nx-row {
  margin: 8px 0 28px;
  overflow: visible;
}

.nx-row-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.nx-row-head .channel-logo {
  max-height: 48px;
  height: 48px;
  width: auto;
}

.nx-row-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nx-see-all {
  color: var(--nx-muted) !important;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nx-see-all:hover {
  color: #fff !important;
}

body.nx-ui .channel-video {
  overflow: visible;
  padding: 8px 0 20px;
}

body.nx-ui .channel-video .channel-video-slider {
  padding: 12px 4px 24px;
  overflow: visible;
}

body.nx-ui .channel-video .swiper-slide.teaser {
  background: var(--nx-elevated);
  border-radius: var(--nx-radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 220ms var(--nx-easing), box-shadow 220ms var(--nx-easing);
}

body.nx-ui .channel-video .swiper-slide.teaser img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.nx-ui .channel-video .video-teaser {
  display: block;
  color: inherit;
}

body.nx-ui .channel-video .video-txt {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
  min-height: 72px;
  padding: 12px 12px 14px;
}

body.nx-ui .channel-video .video-txt p {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  body.nx-ui .channel-video .swiper-slide.teaser:hover {
    transform: scale(1.08);
    z-index: 6;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }
}

body.nx-ui .channel-video .play-icon {
  opacity: 0;
  transition: opacity 180ms var(--nx-easing);
}

body.nx-ui .channel-video .swiper-slide.teaser:hover .play-icon,
body.nx-ui .channel-video .swiper-slide.teaser:focus-within .play-icon {
  opacity: 1;
}

body.nx-ui .channel-video .swiper-button-next,
body.nx-ui .channel-video .swiper-button-prev {
  background: rgba(5, 5, 6, 0.55);
  width: 48px;
  height: 70%;
  margin-top: 0;
  top: 15%;
  border-radius: 4px;
}

body.nx-ui .channel-video .swiper-button-next:hover,
body.nx-ui .channel-video .swiper-button-prev:hover {
  background: rgba(5, 5, 6, 0.85);
}

/* Archive browse */
body.blog.nx-ui .archive-section-wrap,
body.search.nx-ui .archive-section-wrap {
  background: none;
  padding-top: 24px;
}

.nx-archive-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, 0.8fr) auto;
  gap: 16px;
  align-items: end;
  background: var(--nx-elevated);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  padding: 16px;
  margin: 0 0 24px;
  text-align: left;
}

.nx-archive-bar__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.nx-archive-bar label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nx-muted);
}

.nx-archive-bar input[type="search"],
.nx-archive-bar select {
  width: 100%;
  min-height: 48px;
  border-radius: 4px;
  border: 1px solid var(--nx-border);
  background: #0b0b0d;
  color: var(--nx-fg);
  padding: 0 14px;
}

.nx-archive-bar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nx-archive-summary {
  text-align: left;
  color: var(--nx-muted);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.nx-archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px 16px;
  text-align: left;
}

@media (min-width: 640px) {
  .nx-archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .nx-archive-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .nx-archive-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nx-card {
  display: flex;
  flex-direction: column;
  background: var(--nx-elevated);
  border-radius: var(--nx-radius);
  overflow: hidden;
  border: 1px solid var(--nx-border);
  height: 100%;
  transition: transform 200ms var(--nx-easing), box-shadow 200ms var(--nx-easing);
}

.nx-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
}

.nx-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #111;
}

.nx-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nx-card__body {
  padding: 14px 14px 16px;
}

.nx-card__date {
  display: block;
  color: var(--nx-muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.nx-card__title {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
  margin: 0 0 8px;
}

.nx-card__excerpt {
  color: var(--nx-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nx-card__excerpt p {
  font-size: inherit !important;
  padding-bottom: 0 !important;
  margin: 0;
  color: inherit;
}

.nx-empty {
  text-align: left;
  background: var(--nx-elevated);
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius-lg);
  padding: 32px;
}

.nx-empty h2 {
  padding-bottom: 8px;
}

.nx-empty p {
  color: var(--nx-muted);
  font-size: 1rem !important;
  padding-bottom: 16px !important;
}

body.nx-ui .pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

body.nx-ui .pagination .page-numbers {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--nx-elevated);
  color: var(--nx-fg) !important;
}

body.nx-ui .pagination .page-numbers.current {
  background: var(--nx-accent);
}

body.nx-ui .archive-section-wrap .archive-section-text {
  text-align: left;
}

body.nx-ui .archive-section-text h1 {
  font-size: 2rem;
  font-weight: 700;
  padding-bottom: 16px;
}

body.nx-ui .footer {
  background: #050506;
  border-top: 1px solid var(--nx-border);
}

@media (max-width: 767.98px) {
  .nx-archive-bar {
    grid-template-columns: 1fr;
  }

  body.nx-ui .search-box input[type="search"],
  body.nx-ui .search-box input[type="text"] {
    min-width: 0;
    width: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.nx-ui *,
  body.nx-ui *::before,
  body.nx-ui *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }

  body.nx-ui .channel-video .swiper-slide.teaser:hover,
  .nx-card:hover {
    transform: none;
  }
}
