/* ============
   GLOBAL BASE
   ============ */

:root {
  --nv-bg: #020407;
  --nv-bg-alt: #050b10;
  --nv-accent: #7dfec3;
  --nv-accent-soft: rgba(125, 254, 195, 0.6);
  --nv-text-main: #f5fff9;
  --nv-text-soft: #a8ffdc;
  --nv-border-soft: rgba(110, 255, 200, 0.3);
  --nv-radius-lg: 16px;
  --nv-radius-md: 10px;
  --nv-font-mono: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --nv-font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--nv-font-ui);
  background: radial-gradient(circle at 10% 0%, #072319 0%, #020407 40%, #010103 100%);
  color: var(--nv-text-main);
  -webkit-font-smoothing: antialiased;
}

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

/* ============
   BACKGROUND FX (Option A host div)
   ============ */

.nv-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;

  background: radial-gradient(
    circle at 15% 0%,
    rgba(12, 60, 40, 0.18) 0%,
    rgba(2, 4, 7, 0.02) 45%,
    rgba(1, 1, 3, 0.0) 100%
  );
}

/* Keep app above background */
#nv-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ============
   HEADER
   ============ */

.nv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(110, 255, 200, 0.18);
  background: linear-gradient(
    180deg,
    rgba(4, 18, 11, 0.96),
    rgba(1, 6, 4, 0.98)
  );
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
}

.nv-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nv-logo {
  font-family: var(--nv-font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--nv-accent);
  white-space: nowrap;
}

/* per-letter continuous wave animation */
.nv-logo-char {
  display: inline-block;
  opacity: 0.85;
  transform: translateY(0);
  text-shadow: 0 0 4px rgba(125, 254, 195, 0.4);
  animation-name: nvLogoWave;
  animation-duration: 2.6s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes nvLogoWave {
  0% {
    transform: translateY(0);
    text-shadow: 0 0 4px rgba(125, 254, 195, 0.4);
    opacity: 0.85;
  }
  20% {
    transform: translateY(-1px);
    text-shadow:
      0 0 8px rgba(125, 254, 195, 0.8),
      0 0 16px rgba(125, 254, 195, 0.5);
    opacity: 1;
  }
  40% {
    transform: translateY(0);
    text-shadow: 0 0 4px rgba(125, 254, 195, 0.35);
    opacity: 0.9;
  }
  100% {
    transform: translateY(0);
    text-shadow: 0 0 2px rgba(125, 254, 195, 0.2);
    opacity: 0.85;
  }
}

.nv-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(180, 255, 220, 0.8);
}

.nv-nav {
  display: flex;
  gap: 1rem;
}

.nv-nav-link {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(210, 255, 236, 0.78);
  position: relative;
}

.nv-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background: var(--nv-accent);
  transition: width 0.15s ease;
}

.nv-nav-link:hover::after {
  width: 100%;
}

/* ============
   MAIN WRAPPER
   ============ */

#app {
  flex: 1 0 auto;
  padding: 1.5rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ============
   HERO SECTION
   ============ */

.nv-hero {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2rem;
}

.nv-hero-main {
  flex: 2;
  padding: 1.3rem 1.4rem 1.5rem;
  border-radius: var(--nv-radius-lg);
  background: radial-gradient(
    circle at top left,
    rgba(125, 254, 195, 0.28) 0%,
    #020608 38%,
    #020305 100%
  );
  border: 1px solid rgba(130, 255, 210, 0.32);
  box-shadow: 0 0 20px rgba(127, 254, 198, 0.35);
}

.nv-hero-tag {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(185, 255, 224, 0.9);
  margin-bottom: 0.35rem;
}

.nv-hero-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.nv-hero-meta {
  font-size: 0.82rem;
  color: var(--nv-text-soft);
  margin-bottom: 0.7rem;
}

.nv-hero-desc {
  font-size: 0.86rem;
  color: rgba(224, 255, 240, 0.9);
  margin-bottom: 1rem;
  max-width: 35rem;
}

.nv-hero-actions {
  display: flex;
  gap: 0.6rem;
}

/* ============
   NODE STATUS PANEL
   ============ */

.nv-panel {
  background: #050a09;
  border-radius: var(--nv-radius-md);
  border: 1px solid rgba(130, 255, 210, 0.28);
}

.nv-title {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nv-accent);
  margin-bottom: 0.6rem;
}

/* ============
   BUTTONS
   ============ */

.btn {
  border-radius: 999px;
  border: none;
  padding: 0.4rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #76ffbf, #1ac676);
  color: #02150a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(120, 255, 194, 0.7);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 0 20px rgba(150, 255, 210, 0.9);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 0 10px rgba(90, 255, 180, 0.6);
}

.btn.ghost {
  background: transparent;
  color: var(--nv-accent);
  border: 1px solid var(--nv-accent-soft);
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(15, 60, 40, 0.7);
  box-shadow: 0 0 14px rgba(120, 255, 200, 0.4);
}

/* ============
   BROWSE / GENRES
   ============ */

.nv-browse {
  margin-top: 2.1rem;
}

.nv-browse-header {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.nv-browse-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nv-search-wrap {
  flex: 0 1 260px;
  min-width: 180px;
}

.nv-search-input {
  width: 100%;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(144, 255, 205, 0.4);
  background: rgba(2, 10, 7, 0.9);
  color: #e9fff4;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease;
}

.nv-search-input::placeholder {
  color: rgba(190, 255, 220, 0.55);
}

.nv-search-input:focus {
  border-color: var(--nv-accent);
  background: rgba(4, 18, 12, 0.95);
  box-shadow: 0 0 12px rgba(125, 254, 195, 0.45);
}

.nv-section-title {
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nv-accent);
}

.nv-genre-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.nv-genre-btn {
  border-radius: 999px;
  border: 1px solid rgba(144, 255, 205, 0.4);
  background: rgba(5, 20, 10, 0.9);
  color: #e9fff4;
  padding: 0.25rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease,
    border-color 0.15s ease, color 0.15s ease;
}

.nv-genre-btn:hover {
  border-color: var(--nv-accent);
  box-shadow: 0 0 10px rgba(135, 255, 207, 0.45);
}

.nv-genre-btn.active {
  background: linear-gradient(135deg, #75ffbf, #18c777);
  color: #021208;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(105, 255, 195, 0.7);
  transform: translateY(-1px);
}

/* ============
   MOVIE GRID & CARDS
   ============ */

#nvGrid.nv-grid {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
}

.nv-empty {
  font-size: 0.85rem;
  color: rgba(210, 255, 232, 0.75);
  padding: 1.4rem 0.4rem;
}

.nv-card {
  list-style: none;
  background: radial-gradient(
    circle at top,
    #08341f 0%,
    #020907 50%,
    #020303 100%
  );
  border-radius: var(--nv-radius-md);
  overflow: hidden;
  border: 1px solid var(--nv-border-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.14s ease, box-shadow 0.14s ease,
    border-color 0.14s ease;
  min-height: 0;
}

.nv-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 18px rgba(137, 255, 209, 0.55);
  border-color: rgba(144, 255, 210, 0.8);
}

.nv-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: linear-gradient(135deg, #0c3822, #020905);
  position: relative;
}

.nv-card-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7dfec3, transparent);
  opacity: 0.8;
}

.nv-card-meta {
  padding: 0.55rem 0.7rem 0.65rem;
}

.nv-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f7fff9;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nv-card-sub {
  font-size: 0.74rem;
  color: var(--nv-text-soft);
  opacity: 0.85;
}

/* ============
   WATCH PAGE
   ============ */

.nv-watch-hero {
  margin-bottom: 1.4rem;
}

.nv-watch-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.nv-watch-node-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nv-accent);
}

.nv-watch-main {
  display: flex;
}

.nv-watch-meta-block {
  padding: 1rem 1.1rem;
  border-radius: var(--nv-radius-lg);
  border: 1px solid rgba(130, 255, 210, 0.32);
  background: radial-gradient(
    circle at top left,
    rgba(125, 254, 195, 0.2),
    #020608 38%,
    #020305 100%
  );
  box-shadow: 0 0 18px rgba(127, 254, 198, 0.28);
  max-width: 40rem;
}

.nv-watch-player-section {
  margin-top: 1.2rem;
}

/* ============
   FOOTER (NEON TERMINAL UPGRADE)
   ============ */

.nv-footer{
  position: relative;
  flex-shrink: 0;
  margin-top: 2.5rem;
  padding: 1.05rem 1.1rem 1.25rem;
  border-top: 1px solid rgba(110, 255, 200, 0.18);
  background:
    radial-gradient(circle at 20% 0%, rgba(125,254,195,0.16) 0%, rgba(2,4,7,0.92) 55%, rgba(1,1,3,0.98) 100%);
  overflow: hidden;
}

.nv-footer-rail{
  position:absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(125,254,195,0.9), transparent);
  opacity: 0.75;
  filter: blur(0.1px);
}

.nv-footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(125,254,195,0.22);
  background: rgba(2, 10, 7, 0.55);
  box-shadow:
    0 0 18px rgba(125,254,195,0.14),
    0 0 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}

.nv-footer-lines{
  display:flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nv-footer-line{
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(210, 255, 236, 0.78);
}

.nv-footer-actions{
  display:flex;
  align-items:center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nv-footer-link{
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(125,254,195,0.92);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(125,254,195,0.22);
  background: rgba(5, 30, 18, 0.25);
  box-shadow: 0 0 12px rgba(125,254,195,0.10);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.nv-footer-link:hover{
  transform: translateY(-1px);
  border-color: rgba(125,254,195,0.55);
  box-shadow: 0 0 18px rgba(125,254,195,0.22);
}

.nv-footer-dot{
  color: rgba(200,255,235,0.5);
}

.nv-footer-sig{
  font-family: var(--nv-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(230,255,245,0.86);
  text-shadow: 0 0 10px rgba(125,254,195,0.14);
}

/* animated scan line */
.nv-footer-scan{
  position:absolute;
  left:-20%;
  width: 140%;
  height: 2px;
  bottom: 10px;
  background: linear-gradient(90deg, transparent, rgba(125,254,195,0.55), transparent);
  opacity: 0.45;
  filter: blur(0.15px);
  animation: nvFooterScan 3.8s linear infinite;
}

@keyframes nvFooterScan{
  0%{ transform: translateX(-10%); opacity: 0.18; }
  20%{ opacity: 0.55; }
  50%{ opacity: 0.35; }
  100%{ transform: translateX(10%); opacity: 0.18; }
}

/* ============
   NOT FOUND
   ============ */

.nv-not-found {
  display: flex;
  justify-content: center;
  padding-top: 4rem;
}

/* ============
   BACKGROUND CANVAS (Option A)
   ============ */

.nv-bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: screen;
  filter: blur(0.2px);
}

/* ============
   RESPONSIVE
   ============ */

@media (max-width: 900px) {
  #app {
    padding: 1.2rem;
  }

  .nv-hero {
    flex-direction: column;
  }

  #nvGrid.nv-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 640px) {
  .nv-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nv-watch-meta-block {
    padding: 0.9rem;
  }

  .nv-hero-title {
    font-size: 1.4rem;
  }

  .nv-footer-inner{
    flex-direction: column;
    align-items: flex-start;
  }

  .nv-footer-actions{
    justify-content: flex-start;
  }
}