/* ═══════════════════════════════════════════════════════════════
   PTV — VRT MAX design system (1:1 tokens + layout patterns)
   Source: vrt.be/vrtnu-resources/styles + Roobert
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Roobert";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/Roobert-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Roobert";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/Roobert-SemiBold.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Roobert";
  font-style: normal;
  font-weight: 900;
  src: url("../fonts/Roobert-Heavy.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* VRT MAX surfaces */
  --vrt-surface-lowest: #000000;
  --vrt-surface-low: #020c29;
  --vrt-surface-default: #031037;
  --vrt-surface-high: #041547;
  --vrt-surface-highest: #051957;
  --vrt-on-surface: #ffffff;
  --vrt-on-surface-weak: #f2eff0;
  --vrt-on-surface-weakest: #c1c1c6;
  --vrt-inverse-surface: #ffffff;
  --vrt-inverse-on: #031037;

  /* Interactive */
  --vrt-primary: #ffffff;
  --vrt-on-primary: #031037;
  --vrt-primary-hover: #c1c1c6;
  --vrt-primary-active: #ff4944;
  --vrt-primary-container: #ff4944;
  --vrt-live: #e62323;
  --vrt-focus: #00aaff;
  --vrt-danger: #ff4944;
  --vrt-info: #b86bff;
  --vrt-success: #3ecf6e;

  /* Transparency (inverse = on dark bg) */
  --vrt-t-inverse-0: rgba(255, 255, 255, 0);
  --vrt-t-inverse-10: rgba(255, 255, 255, 0.1);
  --vrt-t-inverse-25: rgba(255, 255, 255, 0.25);
  --vrt-t-inverse-50: rgba(255, 255, 255, 0.5);
  --vrt-t-dark-50: rgba(3, 16, 55, 0.5);

  /* Layout */
  --nav-width: 17.5rem;
  --topbar-h: 4.25rem;
  --page-pad-x: clamp(1.5rem, 3vw, 2.75rem);
  --page-pad-y: 1.5rem;
  --header-bg: var(--vrt-surface-default);
  --header-bg-2: var(--vrt-surface-high);
  --base-bg: var(--vrt-surface-low);

  /* Radii */
  --r-2xs: 4px;
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-full: 999px;

  /* Motion */
  --ease: 180ms ease;
  --ease-default: 300ms ease;
  --font: Roobert, Arial, sans-serif;

  /* Semantic aliases */
  --bg: var(--base-bg);
  --text: var(--vrt-on-surface);
  --muted: var(--vrt-on-surface-weakest);
  --line: var(--vrt-t-inverse-10);
  --ptv-accent: #0081ff;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overscroll-behavior: none;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--vrt-focus);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

/* ── Typography (VRT MAX scale) ───────────────────────────── */

.hero-title {
  font-size: clamp(2.25rem, 4.2vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.rail-head h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.muted { color: var(--muted); }

/* ── Buttons (VRT MAX primary / secondary / ghost) ────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--r-full);
  padding: 0.7rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.25;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn-cta,
.btn-primary {
  background: var(--vrt-primary);
  color: var(--vrt-on-primary);
}
.btn-cta:hover,
.btn-primary:hover {
  background: var(--vrt-primary-hover);
}
.btn-cta:active,
.btn-primary:active {
  background: var(--vrt-primary-active);
  color: var(--vrt-on-primary);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  color: var(--vrt-on-surface);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background var(--ease), border-color var(--ease);
}
.btn-ghost:hover {
  background: var(--vrt-t-inverse-25);
  border-color: var(--vrt-t-inverse-50);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-full);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  color: var(--vrt-on-surface-weak);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.chip:hover {
  background: var(--vrt-t-inverse-25);
  color: var(--vrt-on-surface);
}
.chip.active {
  background: var(--vrt-inverse-surface);
  border-color: transparent;
  color: var(--vrt-inverse-on);
}

/* ── Auth gate (VRT MAX welcome) ──────────────────────────── */

.auth-gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 32rem) 1fr;
  background: var(--bg);
}

.auth-gate-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--vrt-surface-default) 0%, var(--vrt-surface-low) 100%);
}

.auth-gate::after {
  content: "";
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(0, 129, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(255, 73, 68, 0.12), transparent 55%),
    var(--bg);
}

.auth-gate-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.auth-gate-brand img {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--r-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.auth-gate-brand h1 {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}
.auth-gate-tag {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vrt-info);
}
.auth-gate-lead {
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--vrt-on-surface-weak);
  margin-bottom: 1.75rem;
  max-width: 26rem;
}
.gate-note { margin-top: 1rem; font-size: 0.875rem; color: var(--muted); }
.gate-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-xs);
  background: var(--vrt-t-inverse-10);
  border: 1px solid var(--line);
  width: 100%;
}
.gate-status.error {
  color: #fecaca;
  border-color: rgba(255, 73, 68, 0.45);
  background: rgba(230, 35, 35, 0.12);
}

/* ── App shell (sidebar + main) ───────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr;
  min-height: 100vh;
  background: var(--bg);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.sidebar-backdrop.show { display: block; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--nav-width);
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1.25rem;
  background: linear-gradient(0deg, var(--header-bg-2) 0%, var(--header-bg) 100%);
  border-right: 1px solid var(--vrt-t-inverse-10);
  overflow-y: auto;
  z-index: 60;
  scrollbar-width: thin;
  scrollbar-color: var(--vrt-t-inverse-25) transparent;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem 1.25rem;
  border-radius: var(--r-sm);
  transition: background var(--ease);
}
.sidebar-brand:hover { background: var(--vrt-t-inverse-10); }
.sidebar-brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--r-xs);
}
.wordmark strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.wordmark span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-section-label {
  padding: 0.75rem 0.65rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vrt-on-surface-weakest);
}

.nav-list { display: flex; flex-direction: column; gap: 0.2rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--vrt-on-surface);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.005em;
  transition: background var(--ease), border-color var(--ease);
}
.nav-item .ico {
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  opacity: 0.9;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.nav-item .ico svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}
.search span svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
  opacity: 0.7;
}
.nav-item:hover {
  background: var(--vrt-t-inverse-25);
  border-color: var(--vrt-t-inverse-10);
}
.nav-item.active {
  background: var(--vrt-t-inverse-10);
  border-color: var(--vrt-t-inverse-25);
  font-weight: 600;
}

.sidebar-foot {
  margin-top: auto;
  padding: 1rem 0.65rem 0;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--vrt-t-inverse-10);
}

/* ── Main + topbar ────────────────────────────────────────── */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--topbar-h);
  padding: 0 var(--page-pad-x);
  background: linear-gradient(180deg, var(--header-bg) 0%, rgba(3, 16, 55, 0.92) 100%);
  border-bottom: 1px solid var(--vrt-t-inverse-10);
  backdrop-filter: blur(12px);
}

.menu-toggle {
  flex-shrink: 0;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 36rem;
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  transition: border-color var(--ease), background var(--ease);
}
.search:focus-within {
  border-color: var(--vrt-t-inverse-50);
  background: var(--vrt-t-inverse-25);
}
.search span {
  color: var(--muted);
  font-size: 1.1rem;
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
}
.search input::placeholder { color: var(--muted); }
.search input:disabled { opacity: 0.55; cursor: not-allowed; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.kids-chip.active {
  background: linear-gradient(135deg, #0081ff, #ff9600);
  border-color: transparent;
  color: #fff;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  border-radius: var(--r-full);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--ease);
}
.profile-pill:hover { background: var(--vrt-t-inverse-25); }

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--vrt-surface-highest);
  color: var(--vrt-on-surface);
}

/* ── Content area ─────────────────────────────────────────── */

.content {
  flex: 1;
  padding: var(--page-pad-y) var(--page-pad-x) 4rem;
}

.view[hidden] { display: none !important; }

/* ── Hero banner (VRT MAX Banner) ─────────────────────────── */

.hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: clamp(18rem, 38vw, 32rem);
  margin-bottom: 2.5rem;
  background: var(--vrt-surface-high);
  box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.35);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 450ms ease;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  transform: scale(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 12, 41, 0.94) 0%, rgba(2, 12, 41, 0.6) 40%, rgba(2, 12, 41, 0.15) 72%, transparent 100%),
    linear-gradient(0deg, rgba(2, 12, 41, 0.8) 0%, transparent 50%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.85rem;
  min-height: clamp(18rem, 38vw, 32rem);
  max-width: min(40rem, 58%);
  padding: clamp(1.5rem, 3vw, 2.75rem);
}

.hero-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vrt-info);
}

.hero-desc {
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--vrt-on-surface-weak);
  max-width: 34rem;
}

.hero-dots {
  position: absolute;
  right: 1.25rem;
  bottom: 1.1rem;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
}
.hero-dots button {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--vrt-t-inverse-50);
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}
.hero-dots button.active {
  background: #fff;
  transform: scale(1.15);
}

/* ── Rails & tiles ────────────────────────────────────────── */

.rail { margin-bottom: 2rem; }

.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.rail-head .muted { font-size: 0.875rem; }

.rail-scroll {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--vrt-t-inverse-25) transparent;
}

.poster-card {
  flex: 0 0 auto;
  width: 10.5rem;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.poster-card .thumb {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
  background: var(--vrt-surface-high);
  background-size: cover;
  background-position: center;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.28);
  transition: transform var(--ease-default), box-shadow var(--ease-default);
  overflow: hidden;
}

.poster-card .thumb-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 35%,
    rgba(0, 0, 0, 0.15) 55%,
    rgba(0, 0, 0, 0.88) 100%
  );
  pointer-events: none;
}

.poster-card .thumb-title {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 1;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.poster-card.saved .thumb::after {
  content: "★";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--vrt-primary-container);
  color: #fff;
  font-size: 0.85rem;
}
.poster-card:hover .thumb,
.poster-card:focus-visible .thumb {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.4), 0 0 0 2px var(--vrt-t-inverse-25);
}

.poster-card .name {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--vrt-on-surface);
  display: none;
}
.poster-card .meta {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ── Provider tabs ────────────────────────────────────────── */

.provider-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.provider-tabs .tab {
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  color: var(--vrt-on-surface-weak);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.provider-tabs .tab:hover {
  color: var(--vrt-on-surface);
  background: var(--vrt-t-inverse-25);
}
.provider-tabs .tab.active {
  background: var(--vrt-inverse-surface);
  border-color: transparent;
  color: var(--vrt-inverse-on);
}

/* ── Auth bar (Play / VTM) ────────────────────────────────── */

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--vrt-surface-default);
}
.auth-status { font-size: 0.875rem; color: var(--muted); }
.auth-actions { display: flex; gap: 0.5rem; }

/* ── House pages (per mediahuis) ──────────────────────────── */

.house-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--vrt-t-inverse-10);
  background: var(--house-accent, linear-gradient(135deg, #0069b3 0%, #020c29 100%));
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.28);
}

.house-header .house-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.house-header .muted {
  margin-top: 0.2rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ── Channel grid (VRT MAX live tiles) ────────────────────── */

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 1rem;
}

.channel-card {
  appearance: none;
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: inherit;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform var(--ease-default), box-shadow var(--ease-default);
  padding: 0;
}
.channel-card:hover,
.channel-card:focus-visible,
.channel-card.active {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.42);
}

.channel-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(0, 129, 255, 0.25), rgba(3, 16, 55, 0.95)),
    var(--vrt-surface-high);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.channel-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.75) 100%);
}

.channel-live {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 1;
  padding: 0.22rem 0.5rem;
  border-radius: var(--r-full);
  background: var(--vrt-live);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.channel-body {
  padding: 0.65rem 0.15rem 0;
}

.channel-name {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--vrt-on-surface);
}

.channel-now {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.channel-card.active .channel-thumb {
  box-shadow: 0 0 0 2px var(--vrt-focus);
}

/* ── Player (VRT MAX video stage) ─────────────────────────── */

.player-shell {
  display: flex;
  flex-direction: column;
}

.player-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.player-panel {
  margin-bottom: 1.75rem;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--vrt-t-inverse-10);
  background: var(--vrt-surface-default);
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.38);
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-live {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.65);
  color: var(--vrt-live);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.player-live .dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  animation: live-pulse 1.4s ease-out infinite;
}
@keyframes live-pulse {
  70% { box-shadow: 0 0 0 8px rgba(230, 35, 35, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 35, 35, 0); }
}

.player-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0.35rem;
}
.player-meta h2,
.player-meta h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
#now-subtitle {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.status {
  margin: 0;
  padding: 0.65rem 1.15rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  white-space: pre-wrap;
}
.status.error { color: #fecaca; }

.empty {
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ── TV Guide / EPG ───────────────────────────────────────── */

.guide-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.25rem 0 0.85rem;
  scrollbar-width: thin;
}

.guide-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.epg-row {
  display: grid;
  grid-template-columns: 5.25rem 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--vrt-t-inverse-10);
  border-radius: var(--r-md);
  background: var(--vrt-surface-default);
  transition: border-color var(--ease), background var(--ease);
}
.epg-row:hover { background: var(--vrt-surface-high); }
.epg-row.current {
  border-color: rgba(230, 35, 35, 0.45);
  box-shadow: inset 3px 0 0 var(--vrt-live);
}

.epg-time {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--vrt-info);
  white-space: nowrap;
}
.epg-body strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}
.epg-body .muted {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
}

/* ── Profile page ─────────────────────────────────────────── */

.profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--vrt-surface-default);
}
.profile-avatar-lg {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--vrt-surface-highest);
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

/* ── Profile drawer (VRT MAX right panel) ─────────────────── */

.profile-drawer {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
}
.profile-drawer.open { pointer-events: auto; }

.profile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 220ms ease;
}
.profile-drawer.open .profile-drawer-backdrop { opacity: 1; }

.profile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 32rem);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--vrt-surface-high);
  border-left: 1px solid var(--vrt-t-inverse-10);
  border-top-left-radius: var(--r-xl);
  transform: translateX(100%);
  transition: transform 280ms ease;
  overflow: hidden;
  box-shadow: -1rem 0 3rem rgba(0, 0, 0, 0.35);
}
.profile-drawer.open .profile-drawer-panel { transform: translateX(0); }

@media (min-width: 800px) {
  .profile-drawer-panel { width: min(100%, 28rem); }
}
@media (min-width: 1200px) {
  .profile-drawer-panel { width: 33.75rem; }
}

.profile-drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--vrt-t-inverse-10);
  flex-shrink: 0;
}
.profile-drawer-head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.drawer-close {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: var(--r-full);
  border: 0;
  background: var(--vrt-t-inverse-10);
  color: var(--vrt-on-surface);
}
.drawer-close:hover {
  background: var(--vrt-inverse-surface);
  color: var(--vrt-inverse-on);
}

.profile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scrollbar-width: thin;
}

.drawer-section h3 {
  margin-bottom: 0.6rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-profiles {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--vrt-t-inverse-10);
  border-radius: var(--r-xs);
  background: var(--vrt-t-inverse-10);
  text-align: left;
  transition: background var(--ease), border-color var(--ease);
}
.drawer-profile:hover { background: var(--vrt-t-inverse-25); }
.drawer-profile.active {
  border-color: var(--vrt-t-inverse-50);
  background: var(--vrt-t-inverse-25);
}

.drawer-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--vrt-surface-highest);
}

.drawer-session {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--vrt-t-inverse-10);
}

.drawer-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.drawer-hint {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.drawer-hint a {
  color: var(--vrt-focus);
  text-decoration: underline;
}

.connection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.connection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--vrt-t-inverse-10);
  background: var(--vrt-t-inverse-10);
}

.connection-row strong {
  font-size: 0.9375rem;
}

.connection-row .muted {
  margin-top: 0.15rem;
  font-size: 0.8125rem;
}

.drawer-foot-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--vrt-t-inverse-10);
}

.restrict-block { margin-top: 0.65rem; }
.restrict-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.9375rem;
}
.restrict-scroll {
  max-height: 10rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* ── Program detail ───────────────────────────────────────── */

.back-btn {
  margin-bottom: 1rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--r-full);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  color: var(--vrt-on-surface);
  font-weight: 600;
}

.program-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.program-hero {
  width: 100%;
  min-height: clamp(14rem, 42vw, 22rem);
  border-radius: var(--r-lg);
  background: var(--vrt-surface-high) center / cover no-repeat;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.35);
}

.program-body {
  padding: 1.35rem 0 2rem;
  max-width: 48rem;
}

.program-house {
  margin-bottom: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vrt-focus);
}

.program-body h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.program-desc {
  margin-top: 0.85rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--vrt-on-surface-weak);
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.program-save.saved {
  color: var(--vrt-success);
}

.program-episodes {
  margin-top: 2rem;
}

.program-episodes h2 {
  margin-bottom: 0.85rem;
  font-size: 1.125rem;
  font-weight: 800;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.episode-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--vrt-t-inverse-10);
  border-radius: var(--r-sm);
  background: var(--vrt-t-inverse-10);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease);
}

.episode-row:hover {
  background: var(--vrt-t-inverse-25);
  border-color: var(--vrt-t-inverse-25);
}

.episode-thumb {
  flex: 0 0 7rem;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xs);
  background: var(--vrt-surface-high) center / cover no-repeat;
}

/* ── GPR hub ──────────────────────────────────────────────── */

.gpr-hub {
  margin-bottom: 2rem;
}

.gpr-hero {
  position: relative;
  min-height: 15rem;
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, #0081ff 0%, #031037 55%, #ff9600 140%),
    var(--vrt-surface-high);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.gpr-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.82) 100%);
}

.gpr-hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.35rem 1.5rem;
}

.gpr-kicker {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.75);
}

.gpr-hero-copy h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.gpr-now {
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.gpr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  align-items: center;
}

/* ── Player overlay (CustomPlayerView) ──────────────────── */

body.player-open {
  overflow: hidden;
}

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: stretch;
  justify-content: center;
  pointer-events: none;
}

.player-overlay.open {
  pointer-events: auto;
}

.player-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 240ms ease;
}

.player-overlay.open .player-overlay-backdrop {
  opacity: 1;
}

.player-overlay-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 56rem);
  margin: auto;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #000;
  border-radius: var(--r-lg);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 280ms ease, opacity 280ms ease;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.55);
}

.player-overlay.open .player-overlay-panel {
  transform: none;
  opacity: 1;
}

@media (min-width: 900px) {
  .player-overlay-panel {
    margin: 2rem auto;
    max-height: calc(100vh - 4rem);
  }
}

.player-chrome-top {
  display: flex;
  justify-content: flex-end;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
}

.player-icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
}

.player-stage-large {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  flex-shrink: 0;
}

.player-stage-large video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-live-badge {
  position: absolute;
  top: 3.25rem;
  left: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.65);
  color: var(--vrt-live);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.player-spinner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.player-spinner::after {
  content: "";
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.player-error-card {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.78);
}

.player-error-card p {
  max-width: 22rem;
  line-height: 1.45;
}

.player-chrome-bottom {
  padding: 1rem 1.15rem 1.25rem;
  background: linear-gradient(180deg, #031037, #020c29);
  border-top: 1px solid var(--vrt-t-inverse-10);
}

.player-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.player-sub {
  margin-top: 0.2rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.player-transport {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
}

.player-transport-btn {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #031037;
  font-size: 1.1rem;
  font-weight: 800;
}

.player-status-line {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.modal-card textarea {
  margin-top: 0.35rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-xs);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  color: var(--text);
  font: inherit;
  resize: vertical;
  min-height: 5rem;
}

/* ── Modals (VRT MAX dialog) ──────────────────────────────── */

.modal {
  border: none;
  padding: 0;
  margin: auto;
  max-width: calc(100vw - 2rem);
  background: transparent;
}
.modal::backdrop {
  background: rgba(2, 12, 41, 0.78);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(26rem, 100%);
  margin: auto;
  padding: 1.5rem 1.5rem 1.25rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--vrt-t-inverse-25);
  background: linear-gradient(180deg, var(--vrt-surface-high) 0%, var(--vrt-surface-default) 100%);
  box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.45);
  color: var(--text);
}

.modal-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.modal-card label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.modal-card input {
  padding: 0.7rem 0.8rem;
  border-radius: var(--r-xs);
  border: 1px solid var(--vrt-t-inverse-25);
  background: var(--vrt-t-inverse-10);
  color: var(--text);
  font: inherit;
  transition: border-color var(--ease);
}
.modal-card input:focus {
  outline: none;
  border-color: var(--vrt-focus);
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.25);
}

.modal-card a { color: var(--ptv-accent); }
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}
.modal-error {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: #fecaca;
}

.device-code {
  margin: 1rem 0 0.5rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
}

/* ── Profile picker (Wie kijkt er?) ───────────────────────── */

.profile-picker-card { width: min(28rem, 100%); }

.profile-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.profile-picker-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 0.5rem;
  border: 2px solid var(--vrt-t-inverse-10);
  border-radius: var(--r-md);
  background: var(--vrt-t-inverse-10);
  transition: border-color var(--ease), transform var(--ease), background var(--ease);
}
.profile-picker-tile:hover {
  border-color: var(--vrt-t-inverse-50);
  transform: translateY(-2px);
  background: var(--vrt-t-inverse-25);
}
.profile-picker-tile.kids {
  background: linear-gradient(180deg, rgba(0, 129, 255, 0.15), rgba(255, 150, 0, 0.08));
}

.profile-picker-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 900;
  background: var(--vrt-surface-highest);
}
.profile-picker-tile.kids .profile-picker-avatar {
  background: linear-gradient(135deg, #0081ff, #ff9600);
  color: var(--vrt-inverse-on);
}

.profile-picker-name {
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
}

/* ── Kids mode ────────────────────────────────────────────── */

body.ptv-kids {
  --bg: #0a3d8f;
  --header-bg: #0d4db8;
  --header-bg-2: #0a3d8f;
}
body.ptv-kids .sidebar {
  background: linear-gradient(0deg, #0d4db8 0%, #0a3d8f 100%);
}
body.ptv-kids .hero .bg { filter: saturate(1.15); }

/* ── Responsive ───────────────────────────────────────────── */

.menu-toggle { display: none; }

@media (max-width: 960px) {
  .auth-gate {
    grid-template-columns: 1fr;
  }
  .auth-gate::after { display: none; }
  .auth-gate-inner {
    border-right: 0;
    min-height: 100vh;
  }

  .shell { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 18rem);
    transform: translateX(-105%);
    transition: transform 240ms ease;
    box-shadow: 1.25rem 0 3.5rem rgba(0, 0, 0, 0.45);
  }
  .sidebar.open { transform: translateX(0); }

  .menu-toggle { display: inline-flex !important; }

  .content { padding: 1rem 1rem 3rem; }
  .topbar { padding: 0 1rem; }

  .hero-copy {
    max-width: 100%;
    min-height: clamp(16rem, 55vw, 24rem);
  }
  .hero-title { font-size: clamp(1.75rem, 6vw, 2.5rem); }

  .epg-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .epg-row .btn { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
