:root {
  --bs-body-bg: #060607;
  --bs-body-color: #f2f0eb;
  --bg-deep: #19191d;
  --bg-elevated: #0e0e12;
  --surface: #16161d;
  --surface-hover: #1e1e28;
  --border: rgba(255, 255, 255, 0.06);
  --text: #f2f0eb;
  --text-muted: #8a8793;
  --accent: oklch(60.555% 0.24423 328.07);
  --accent-soft: rgba(201, 162, 39, 0.15);
  --accent-glow: rgba(201, 162, 39, 0.35);
  --sidebar-w: 240px;
  --top-h: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Cal Sans", sans-serif;
  --font-ui: "Cal Sans", sans-serif;
  --font-logo: "Sixtyfour Convergence", system-ui;
}

@font-face {
  font-family: "Russo One";
  src: url("fonts/RussoOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lester Bold";
  src: url("fonts/Lester%20Bold%20Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  z-index: 9999;
}

.vhsx-app-row {
  min-height: 100vh;
}

/* Sidebar (desktop) */
.vhsx-sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  padding: 28px 20px;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-deep) 100%);
  border-right: 1px solid var(--border);
  z-index: 100;
}

.vhsx-logo {
  text-decoration: none;
  margin-bottom: 32px;
  padding-left: 12px;
  display: inline-block;
  color: var(--text);
  line-height: 0;
}

.vhsx-logo-svg {
  display: block;
  height: 2.75rem;
  width: auto;
  overflow: visible;
  color: var(--text);
}

.vhsx-logo-svg--compact {
  height: 1.35rem;
}

.vhsx-logo-svg .vhsx-logo-letter {
  font-family: "Cal Sans", sans-serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: 0;
  fill: var(--text);
  stroke: none;
}

.vhsx-logo-svg .vhsx-logo-line {
  stroke: var(--accent);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.vhsx-logo-svg .vhsx-logo-letter-x {
  fill: var(--accent);
  font-size: 32px
}

@keyframes vhsx-logo-draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

.vhsx-logo-svg .vhsx-draw-baseline {
  animation: vhsx-logo-draw-line 0.85s var(--ease-out) 0.5s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .vhsx-logo-svg .vhsx-logo-line {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}

.vhsx-nav-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 12px 8px;
}

.vhsx-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s, background 0.25s var(--ease-out);
}

.vhsx-nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.vhsx-nav-link.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.2);
}

.vhsx-nav-link svg {
  width: 20px;
  height: 20px;
  opacity: 0.85;
  flex-shrink: 0;
}

.vhsx-sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.vhsx-server-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 12px;
  color: var(--text-muted);
}

.vhsx-server-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dcc7a;
  box-shadow: 0 0 10px rgba(61, 204, 122, 0.6);
}

/* Main column */
.vhsx-main {
  min-width: 0;
}

.vhsx-topbar.navbar {
  min-height: var(--top-h);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background: linear-gradient(180deg, rgba(6, 6, 7, 0.92) 0%, rgba(6, 6, 7, 0) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.vhsx-mobile-logo {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  line-height: 0;
}

.vhsx-search-wrap {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.vhsx-search-wrap .form-control {
  height: 42px;
  padding-left: 2.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
}

.vhsx-search-wrap .form-control:focus {
  border-color: rgba(201, 162, 39, 0.4);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
  color: var(--text);
}

.vhsx-search-wrap .form-control::placeholder {
  color: var(--text-muted);
}

.vhsx-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  z-index: 2;
}

.vhsx-icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.vhsx-icon-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
  transform: scale(1.05);
}

.vhsx-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover;
}

/* Offcanvas matches theme */
.offcanvas.vhsx-offcanvas {
  background: var(--bg-elevated);
  color: var(--text);
  border-right: 1px solid var(--border);
  width: min(280px, 85vw);
}

.offcanvas.vhsx-offcanvas .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Hero */
.vhsx-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: min(72vh, 620px);
  opacity: 0;
  animation: vhsx-rise 1s var(--ease-out) 0.15s forwards;
}

.vhsx-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg-deep) 0%, transparent 55%),
    linear-gradient(0deg, var(--bg-deep) 0%, transparent 35%),
    linear-gradient(180deg, transparent 40%, var(--bg-deep) 100%),
    url("https://images.unsplash.com/photo-1489599849927-2ee91cede1ba?w=1920&q=80") center/cover no-repeat;
}

.vhsx-hero-inner {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem 2rem 3.5rem;
}

@media (min-width: 992px) {
  .vhsx-hero-inner {
    padding: 3rem 3.5rem 3.5rem;
  }
}

.vhsx-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  width: fit-content;
}

.vhsx-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.8);
}

.vhsx-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.vhsx-hero-meta strong {
  color: var(--text);
  font-weight: 500;
}

.vhsx-hero-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(242, 240, 235, 0.82);
  max-width: 520px;
  margin: 0 0 28px;
}

.vhsx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s, background 0.2s;
}

.vhsx-btn-primary {
  background: var(--accent);
  color: #1a1508;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.vhsx-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
  color: #1a1508;
}

.vhsx-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.vhsx-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  color: var(--text);
}

.vhsx-btn svg {
  width: 20px;
  height: 20px;
}

/* Content rows */
.vhsx-row-block {
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: vhsx-rise 0.7s var(--ease-out) forwards;
}

.vhsx-row-block:nth-of-type(1) {
  animation-delay: 0.35s;
}

.vhsx-row-block:nth-of-type(2) {
  animation-delay: 0.45s;
}

.vhsx-row-block:nth-of-type(3) {
  animation-delay: 0.55s;
}

.vhsx-row-block:nth-of-type(4) {
  animation-delay: 0.65s;
}

.vhsx-row-head a {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.vhsx-row-head a:hover {
  text-decoration: underline;
}

.vhsx-row-head h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

.vhsx-row-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--surface) transparent;
}

.vhsx-row-scroll::-webkit-scrollbar {
  height: 6px;
}

.vhsx-row-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-hover);
  border-radius: 999px;
}

.vhsx-card {
  flex: 0 0 auto;
  width: 160px;
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.25s;
  cursor: pointer;
}

@media (min-width: 600px) {
  .vhsx-card {
    width: 180px;
  }
}

.vhsx-card:hover {
  border-color: var(--accent);
  z-index: 2;
}

.vhsx-card-poster {
  aspect-ratio: 2 / 2.55;
  background: linear-gradient(145deg, #2a2a35 0%, #12121a 100%);
  position: relative;
}

.vhsx-card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vhsx-card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.5);
}

.vhsx-card-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.vhsx-card-body {
  padding: 12px 12px 14px;
}

.vhsx-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vhsx-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.vhsx-card-wide {
  width: 280px;
}

@media (min-width: 600px) {
  .vhsx-card-wide {
    width: 320px;
  }
}

.vhsx-card-wide .vhsx-card-poster {
  aspect-ratio: 16 / 9;
}

@keyframes vhsx-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vhsx-page-bottom {
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}

/* Landing — centered logo, fade in on load */
.vhsx-landing-body {
  margin: 0;
  min-height: 100vh;
}

.vhsx-landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
}

.vhsx-landing-brand {
  display: inline-block;
  line-height: 0;
  color: var(--text);
  text-decoration: none;
  max-width: 50vw;
  opacity: 0;
  animation: vhsx-landing-fade-in 2.15s var(--ease-out) 0.1s forwards;
}

.vhsx-landing-brand img {
  max-width: 50vw;
  height: auto;
}

.vhsx-landing-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
  border-radius: 4px;
}

.vhsx-landing-logo-svg {
  height: clamp(3rem, 12vw, 5.5rem);
  width: auto;
}

@keyframes vhsx-landing-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vhsx-landing-brand {
    animation: none;
    opacity: 1;
  }
}
