:root {
  color-scheme: dark;
  --nf-bg: #07080a;
  --nf-panel: #12151a;
  --nf-soft: #1d222a;
  --nf-text: #f4f6fb;
  --nf-muted: #a7afbd;
  --nf-red: #e50914;
  --nf-red-2: #ff3742;
  --nf-line: rgba(255, 255, 255, .1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--nf-bg);
  color: var(--nf-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button {
  font: inherit;
  color: var(--nf-text);
  background: #0d1015;
  border: 1px solid var(--nf-line);
  border-radius: 8px;
}

.nf-navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(7, 8, 10, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--nf-line);
}
.nf-brand { color: var(--nf-red-2); font-weight: 900; font-size: 1.45rem; letter-spacing: 0; }
.nf-navlinks, .nf-usernav { display: flex; align-items: center; gap: 16px; color: var(--nf-muted); }
.nf-navlinks a:hover, .nf-usernav a:hover { color: var(--nf-text); }
.nf-search { position: relative; }
.nf-search input { width: 100%; padding: 10px 12px; }
.nf-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0d1015;
  border: 1px solid var(--nf-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.nf-search-results.is-open { display: block; }
.nf-search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--nf-line); }
.nf-search-results span { color: var(--nf-muted); font-size: .86rem; }
.nf-main { min-height: 72vh; }

.nf-hero {
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding: 140px clamp(18px, 5vw, 72px) 72px;
  background-size: cover;
  background-position: center;
}
.nf-hero-content { max-width: 760px; }
.nf-kicker { color: var(--nf-red-2); font-weight: 800; text-transform: uppercase; font-size: .78rem; }
h1, h2 { margin: 0; letter-spacing: 0; }
.nf-hero h1 { font-size: clamp(2.5rem, 7vw, 5.8rem); line-height: .95; margin: 12px 0 18px; }
.nf-hero p, .nf-detail-copy p { color: #d6dbe5; font-size: 1.06rem; line-height: 1.65; }
.nf-meta, .nf-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nf-meta span {
  color: #dbe1eb;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--nf-line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .9rem;
}
.nf-actions { margin-top: 24px; }
.nf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 17px;
  background: var(--nf-red);
  border: 1px solid var(--nf-red);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}
.nf-btn:hover { background: var(--nf-red-2); }
.nf-btn-ghost { background: rgba(255,255,255,.1); border-color: var(--nf-line); }
.nf-btn-small { min-height: 34px; padding: 7px 11px; font-size: .88rem; }

.nf-section { padding: 28px clamp(18px, 4vw, 56px); }
.nf-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nf-section-head h2 { font-size: 1.35rem; }
.nf-section-head a, .nf-muted { color: var(--nf-muted); }
.nf-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 170px;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scrollbar-color: var(--nf-soft) transparent;
}
.nf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 22px 16px;
  padding: 24px clamp(18px, 4vw, 56px);
}
.nf-media-card a {
  position: relative;
  display: grid;
  gap: 8px;
  transition: transform .18s ease;
}
.nf-media-card a:hover { transform: translateY(-4px) scale(1.02); }
.nf-media-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--nf-soft);
  border-radius: 8px;
}
.nf-card-title { font-weight: 800; line-height: 1.25; }
.nf-card-meta { color: var(--nf-muted); font-size: .86rem; }
.nf-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
  background: var(--nf-red);
}

.nf-page-head { padding: 42px clamp(18px, 4vw, 56px) 10px; }
.nf-page-head h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 18px; }
.nf-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.nf-filters input, .nf-filters select { min-height: 42px; padding: 9px 12px; }
.nf-pagination { display: flex; gap: 12px; padding: 10px clamp(18px, 4vw, 56px) 42px; }

.nf-detail-hero {
  display: grid;
  grid-template-columns: minmax(170px, 280px) minmax(0, 780px);
  gap: clamp(22px, 4vw, 46px);
  align-items: end;
  padding: 92px clamp(18px, 5vw, 72px) 52px;
  min-height: 66vh;
  background-size: cover;
  background-position: center;
}
.nf-detail-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.nf-detail-copy h1 { font-size: clamp(2.3rem, 6vw, 5rem); line-height: 1; margin: 10px 0 14px; }
.nf-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: #0b0d11;
  border-block: 1px solid var(--nf-line);
}
.nf-detail-stats span, .nf-list-item, .nf-comment, .nf-season-list article {
  background: var(--nf-panel);
  border: 1px solid var(--nf-line);
  border-radius: 8px;
  padding: 12px 14px;
}
.nf-video iframe { width: min(920px, 100%); aspect-ratio: 16 / 9; border: 0; border-radius: 8px; }
.nf-people-row { grid-auto-columns: 145px; }
.nf-person-card a { display: grid; gap: 9px; }
.nf-person-card img { aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--nf-soft); }
.nf-person-card span { color: var(--nf-muted); font-size: .84rem; }
.nf-season-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.nf-season-list article { display: flex; justify-content: space-between; gap: 14px; }

.nf-table-wrap { overflow-x: auto; border: 1px solid var(--nf-line); border-radius: 8px; }
.nf-release-table { width: 100%; min-width: 920px; border-collapse: collapse; background: #0d1015; }
.nf-release-table th, .nf-release-table td { padding: 12px; border-bottom: 1px solid var(--nf-line); text-align: left; vertical-align: middle; }
.nf-release-table th { color: var(--nf-muted); font-size: .8rem; text-transform: uppercase; }

.nf-auth {
  width: min(460px, calc(100% - 32px));
  margin: 60px auto;
  padding: 28px;
  background: var(--nf-panel);
  border: 1px solid var(--nf-line);
  border-radius: 8px;
}
.nf-auth form, .nf-comment-form { display: grid; gap: 14px; }
.nf-auth label { display: grid; gap: 7px; color: var(--nf-muted); }
.nf-auth input, .nf-comment-form textarea { width: 100%; padding: 12px; }
.nf-alert { background: rgba(229, 9, 20, .16); border: 1px solid rgba(229, 9, 20, .45); border-radius: 8px; padding: 11px; }
.nf-list-item { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; color: var(--nf-muted); }
.nf-list-item strong { color: var(--nf-text); }
.nf-comment { margin-bottom: 12px; }
.nf-comment time { color: var(--nf-muted); margin-left: 10px; font-size: .86rem; }
.nf-person-detail {
  display: grid;
  grid-template-columns: minmax(160px, 260px) minmax(0, 820px);
  gap: 34px;
  padding: 54px clamp(18px, 5vw, 72px);
}
.nf-person-detail img { border-radius: 8px; aspect-ratio: 2 / 3; object-fit: cover; background: var(--nf-soft); }
.nf-person-detail p { color: #d6dbe5; line-height: 1.7; }
.nf-empty { padding: 80px clamp(18px, 4vw, 56px); }
.nf-footer { padding: 28px clamp(18px, 4vw, 56px); color: var(--nf-muted); border-top: 1px solid var(--nf-line); }

@media (max-width: 820px) {
  .nf-navbar { grid-template-columns: 1fr auto; gap: 12px; }
  .nf-navlinks { order: 3; grid-column: 1 / -1; overflow-x: auto; }
  .nf-search { grid-column: 1 / -1; order: 4; }
  .nf-hero { min-height: 62vh; padding-top: 90px; }
  .nf-row { grid-auto-columns: 138px; }
  .nf-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .nf-detail-hero, .nf-person-detail { grid-template-columns: 1fr; }
  .nf-detail-poster, .nf-person-detail img { width: min(220px, 60vw); }
  .nf-list-item { display: grid; }
}

.nf-upload { padding-bottom: 46px; }
.nf-upload-head { max-width: 980px; }
.nf-upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 56px);
}
.nf-upload-step {
  margin: 18px clamp(18px, 4vw, 56px);
  padding: 22px;
  background: var(--nf-panel);
  border: 1px solid var(--nf-line);
  border-radius: 8px;
}
.nf-upload-layout .nf-upload-step { margin: 0; }
.nf-upload-step h2 { margin-bottom: 16px; font-size: 1.2rem; }
.nf-upload-step form, .nf-upload-final { display: grid; gap: 14px; }
.nf-upload-step label {
  display: grid;
  gap: 7px;
  color: var(--nf-muted);
  font-weight: 650;
}
.nf-upload-step input,
.nf-upload-step select,
.nf-upload-step textarea {
  width: 100%;
  padding: 11px 12px;
}
.nf-upload-result {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 96px;
  align-content: flex-start;
}
.nf-upload-badge {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 10px;
  color: #e8edf7;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--nf-line);
  border-radius: 999px;
  font-size: .88rem;
}
.nf-upload-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.nf-upload-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  background: #0d1015;
  border: 1px solid var(--nf-line);
  border-radius: 8px;
}
.nf-upload-card img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--nf-soft);
}
.nf-upload-card h3 { margin: 0 0 5px; font-size: 1rem; }
.nf-upload-card span, .nf-upload-card p { color: var(--nf-muted); }
.nf-upload-card p { line-height: 1.45; font-size: .9rem; }
.nf-upload-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.nf-upload-check {
  align-self: end;
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
}
.nf-upload-check input { width: auto; }

.nf-admin-list {
  display: grid;
  gap: 14px;
  padding: 16px clamp(18px, 4vw, 56px);
}
.nf-admin-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  background: var(--nf-panel);
  border: 1px solid var(--nf-line);
  border-radius: 8px;
}
.nf-admin-item > img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--nf-soft);
}
.nf-admin-title, .nf-admin-meta, .nf-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.nf-admin-title h2 { font-size: 1.12rem; }
.nf-admin-main p { color: var(--nf-muted); overflow-wrap: anywhere; }
.nf-admin-meta span { color: var(--nf-muted); font-size: .88rem; }
.nf-admin-actions { align-content: center; justify-content: flex-end; }
.nf-admin-main details { margin-top: 8px; color: var(--nf-muted); }
.nf-admin-main summary { cursor: pointer; color: var(--nf-text); }

@media (max-width: 860px) {
  .nf-upload-layout, .nf-admin-item { grid-template-columns: 1fr; }
  .nf-admin-actions { justify-content: flex-start; }
}
