.ntg-library {
  --ntg-bg: #080808;
  --ntg-panel: #121212;
  --ntg-border: #252525;
  --ntg-text: #f4f4f4;
  --ntg-muted: #b5b5b5;
  --ntg-accent: #ffffff;
  max-width: min(1600px, calc(100vw - 3rem));
  margin: 1.8rem auto;
  padding: clamp(1rem, 2vw, 2rem);
  color: var(--ntg-text);
  font-family: var(--ntg-font-family, 'Helvetica Neue', Helvetica, Arial, sans-serif);
  border-radius: 34px;
  border: 1px solid #1b1b1b;
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #0f0f0f, var(--ntg-bg));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

.ntg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.ntg-toolbar__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ntg-accent);
  font-size: 0.74rem;
}

.ntg-controls {
  display: flex;
  gap: 0.7rem;
  margin-left: auto;
}

.ntg-select {
  min-width: 170px;
  border-radius: 12px;
  border: 1px solid var(--ntg-border);
  background: var(--ntg-panel);
  color: #fff;
  padding: 0.65rem 0.75rem;
}

.ntg-select:focus {
  outline: none;
  border-color: var(--ntg-accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.24);
}

.ntg-status {
  margin: 0;
  color: var(--ntg-muted);
  font-size: 0.95rem;
}

.ntg-featured {
  position: relative;
  min-height: clamp(300px, 58vh, 720px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #232323;
  margin-bottom: 1rem;
}

.ntg-featured__backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.ntg-featured::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 15%, rgba(0, 0, 0, 0.38) 52%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05) 60%, rgba(0, 0, 0, 0.72) 100%);
}

.ntg-featured__content {
  position: relative;
  z-index: 1;
  max-width: min(640px, 100%);
  padding: clamp(1rem, 3vw, 2.4rem);
  display: grid;
  gap: 0.75rem;
}

.ntg-featured__content h2 {
  margin: 0;
  font-size: clamp(2rem, 7.2vw, 7.2rem);
  line-height: 0.94;
  color: #fff;
  text-transform: uppercase;
}

.ntg-featured__synopsis {
  margin: 0;
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  color: #f0f0f0;
  max-width: 54ch;
  line-height: 1.4;
}

.ntg-featured__meta {
  margin: 0;
  color: #d5d5d5;
  letter-spacing: 0.02em;
}

.ntg-featured__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ntg-action {
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.66rem 1.35rem;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.ntg-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.ntg-action--primary {
  background: #fff;
  color: #111;
}

.ntg-action--secondary {
  background: rgba(109, 109, 109, 0.78);
  color: #fff;
}

.ntg-row-wrap {
  margin-top: 1.1rem;
}

.ntg-row-title {
  margin: 0 0 0.62rem;
  font-size: clamp(1.1rem, 2vw, 2rem);
  color: #fff;
}

.ntg-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 260px);
  gap: 0.62rem;
  overflow-x: auto;
  padding-bottom: 0.36rem;
  scrollbar-width: thin;
}

.ntg-row::-webkit-scrollbar {
  height: 9px;
}

.ntg-row::-webkit-scrollbar-thumb {
  background: #2c2c2c;
  border-radius: 999px;
}

.ntg-tile {
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: #111;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.ntg-tile:hover,
.ntg-tile.is-active {
  border-color: rgba(255, 255, 255, 0.58);
  transform: scale(1.03);
}

.ntg-tile__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a2a2a, #151515);
}

.ntg-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ntg-tile__fallback {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  color: #c7c7c7;
}

.ntg-tile__title {
  display: block;
  padding: 0.38rem 0.5rem 0.46rem;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ntg-grid-empty {
  margin-top: 0.92rem;
  padding: 0.82rem;
  border-radius: 10px;
  border: 1px dashed #3a3a3a;
  color: var(--ntg-muted);
  background: rgba(255, 255, 255, 0.02);
}

.ntg-load-more {
  margin: 0.9rem auto 0;
  display: block;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.65rem 1.4rem;
  cursor: pointer;
}

.ntg-load-more:hover {
  filter: brightness(0.93);
}

.ntg-load-more:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 980px) {
  .ntg-library {
    max-width: calc(100vw - 1.2rem);
    border-radius: 24px;
  }

  .ntg-controls {
    width: 100%;
  }

  .ntg-select {
    flex: 1 1 0;
    min-width: 0;
  }

  .ntg-featured__content h2 {
    font-size: clamp(1.8rem, 10vw, 3.8rem);
  }
}
