@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos/GolosText-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos/GolosText-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos/GolosText-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos/GolosText-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos/GolosText-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
}
@font-face {
  font-family: "Golos Text";
  src: url("../fonts/golos/GolosText-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
}
@font-face {
  font-family: "Abril Fatface";
  src: url("../fonts/abril_fatface/AbrilFatface-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --bg-deep: #0b0c12;
  --panel: #12131a;
  --panel-2: #171822;
  --panel-3: #1c1e28;
  --input: #22242f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --line: var(--border);
  --surface: var(--panel);
  --surface-2: var(--panel-2);
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.62);
  --text-mute: rgba(255, 255, 255, 0.4);
  --accent-rgb: 135, 106, 255;
  --accent: #876aff;
  --accent-2: #9d8dff;
  --accent-dark: #6f57ef;
  --accent-soft: rgba(135, 106, 255, 0.22);
  --online: #3ddc84;
  --progress: #7ec8ff;
  --star: #f5c518;
  --font-ui: "Golos Text", sans-serif;
  --font-display: "Abril Fatface", "Golos Text", sans-serif;
  --radius-sm: 4px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --sidebar-w: 92px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

  --zen-page-bg:
    radial-gradient(900px 520px at 50% 32%, rgba(135, 106, 255, 0.14) 0%, transparent 62%),
    linear-gradient(180deg, #12131a 0%, #0b0c12 100%);
  --zen-surface: rgba(15, 17, 23, 0.96);
  --zen-surface-border: var(--border);
  --zen-title-size: 24px;
  --zen-title-weight: 700;
  --zen-subtitle-size: 14px;
  --zen-field-height: 48px;
  --zen-field-radius: 4px;
  --zen-field-bg: var(--input);
  --zen-field-border: var(--border-strong);
  --zen-field-focus: rgba(157, 141, 255, 0.55);
  --icon-sm: 16px;
  --icon-md: 20px;
  --icon-lg: 24px;
  --icon-xl: 34px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--bg-deep);
  overflow: hidden;
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

#setup.hidden {
  display: none !important;
}

/* ── Zen shared pages (splash, setup, profiles, overlays) ── */
.zen-page {
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--zen-page-bg);
}

.zen-page__inner {
  text-align: center;
  padding: 28px 24px;
  width: min(920px, 100%);
  animation: splash-rise 0.6s ease both;
}

.zen-page__inner--narrow {
  width: min(360px, calc(100% - 40px));
}

.zen-page__logo {
  width: 128px;
  height: 128px;
  margin: 0 auto 26px;
  display: block;
}

.zen-page__logo--md {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
}

.zen-page__title,
.zen-page h1 {
  font-family: var(--font-ui);
  font-size: var(--zen-title-size);
  font-weight: var(--zen-title-weight);
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.95);
}

.zen-page__subtitle {
  font-size: var(--zen-subtitle-size);
  color: var(--text-dim);
}

.zen-back,
.settings-back {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.zen-back {
  position: absolute;
  top: 22px;
  left: 22px;
}

.zen-back:hover,
.settings-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.zen-back .icon,
.zen-back .lucide,
.settings-back .icon,
.settings-back .lucide {
  width: var(--icon-lg);
  height: var(--icon-lg);
}

.zen-surface {
  width: min(560px, 100%);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 10px 0 20px;
  box-shadow: none;
}

.zen-field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--zen-field-height);
  padding: 0 14px;
  margin-bottom: 12px;
  border: 1px solid var(--zen-field-border);
  border-radius: var(--zen-field-radius);
  background: var(--zen-field-bg);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  text-align: left;
}

.zen-field .icon,
.zen-field .lucide {
  width: var(--icon-md);
  height: var(--icon-md);
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.75);
}

.zen-field input {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  outline: none;
  min-width: 0;
}

.zen-field input::placeholder {
  color: var(--text-mute);
}

.zen-field:focus-within {
  border-color: var(--zen-field-focus);
}

.zen-field-btn {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.zen-field-btn:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(24, 26, 36, 0.8);
}

.zen-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.zen-link-btn .icon,
.zen-link-btn .lucide {
  width: var(--icon-md);
  height: var(--icon-md);
}

.zen-link-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.zen-btn-wide {
  width: 100%;
  justify-content: center;
}

/* Splash */
.splash {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  display: grid !important;
  place-items: center !important;
  background: var(--zen-page-bg) !important;
  background-attachment: fixed !important;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.splash.fade-out,
.splash.hide {
  opacity: 0 !important;
  transform: scale(1.03) !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.splash.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.splash-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(135, 106, 255, 0.35) 0%, transparent 70%);
  filter: blur(12px);
  animation: splash-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  animation: splash-rise 0.7s ease both;
  text-align: center;
  margin: auto;
}

.splash-logo {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 10px 24px rgba(124, 77, 255, 0.4));
  animation: splash-logo 1.8s ease-in-out infinite;
}

.splash-name {
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.splash-tagline {
  font-size: var(--zen-subtitle-size, 14px);
  font-weight: 500;
  color: var(--text-dim, rgba(255, 255, 255, 0.65));
  margin-top: -4px;
}

.splash-loader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.splash-loader span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  animation: splash-dot 1s ease-in-out infinite;
}

.splash-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.splash-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes splash-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splash-logo {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes splash-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.08);
  }
}

@keyframes splash-dot {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

@keyframes splash-rise {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-logo {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04) translateY(-3px);
  }
}

@keyframes splash-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.12);
  }
}

/* Page transitions */
.zen-page.fade-in {
  animation: zenPageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.zen-page.fade-out {
  animation: zenPageFadeOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zenPageFadeIn {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes zenPageFadeOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(1.015) translateY(-8px);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes source-loading-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse-soft {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.88;
  }
}

@keyframes zenPanelFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.icon,
.lucide {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  pointer-events: none;
  color: inherit;
  stroke: currentColor;
  fill: none;
}

.star-on {
  fill: var(--star);
  stroke: var(--star);
}

.star-off {
  stroke: var(--star);
  fill: none;
  opacity: 0.35;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

#setup.hidden {
  display: none;
}

.setup-wrap {
  width: min(560px, 100%);
  min-width: 0;
}

.app-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  background: var(--panel);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-right: 1px solid var(--border);
}

.sidebar .logo {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
}

.nav-btn {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-btn .icon, .nav-btn .lucide {
  font-size: 24px;
  width: 24px;
  height: 24px;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar .spacer {
  flex: 1;
}

.main {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.view {
  display: none;
  height: 100%;
  overflow: auto;
  padding: 22px 28px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.view.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  height: 42px;
  min-height: 42px;
}

/* ── Top menu search bar ────────────────────────────────────── */
.top-menu-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0 14px;
  width: 220px;
  min-width: 150px;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.top-menu-search:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.top-menu-search:focus-within {
  width: 270px;
  background: rgba(18, 16, 32, 0.95);
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18),
              0 8px 24px rgba(0, 0, 0, 0.4);
}

.top-menu-search .icon,
.top-menu-search .lucide {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  transition: color 0.18s ease;
}

.top-menu-search:focus-within .icon,
.top-menu-search:focus-within .lucide {
  color: var(--accent);
}

.top-menu-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  padding: 0;
  min-width: 0;
  line-height: 1;
}

.top-menu-search-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  font-size: 12px;
}

.top-menu-search-input::-webkit-search-cancel-button {
  display: none;
}

.top-menu-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}

.top-menu-search-clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.top-menu-search-clear .icon,
.top-menu-search-clear .lucide {
  width: 12px;
  height: 12px;
}

.top-menu-search-clear.hidden {
  display: none !important;
}

.live-top-menu-search {
  width: 190px;
  height: 32px;
  padding: 0 10px;
}

.live-top-menu-search:focus-within {
  width: 230px;
}

.home-hero,
.series-hero-billboard {
  position: relative;
  min-height: 420px;
  margin: 0 -28px 24px;
  overflow: hidden;
  isolation: isolate;
  background: #0b0d14;
  display: flex;
  align-items: flex-end;
}

.home-hero-backdrop,
.series-hero-backdrop,
.home-hero-scrim,
.series-hero-scrim {
  position: absolute;
  inset: 0;
}

.home-hero-backdrop,
.series-hero-backdrop {
  z-index: -2;
  background-position: center 25%;
  background-size: cover;
  filter: saturate(1.15) brightness(0.9);
  opacity: 0.88;
  transform: scale(1.02);
  transition: transform 6s ease-out, opacity 0.4s ease;
}

.home-hero:hover .home-hero-backdrop,
.series-hero-billboard:hover .series-hero-backdrop {
  transform: scale(1.05);
}

.home-hero-scrim,
.series-hero-scrim {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 13, 20, 0.96) 0%, rgba(11, 13, 20, 0.78) 38%, rgba(11, 13, 20, 0.25) 70%, transparent 100%),
    linear-gradient(0deg, rgba(11, 13, 20, 1) 0%, rgba(11, 13, 20, 0.65) 25%, transparent 60%);
}

.home-hero-content,
.series-hero-content {
  width: min(680px, 75%);
  padding: 40px 0 36px 48px;
  z-index: 2;
}

.netflix-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.netflix-n-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(135, 106, 255, 0.5);
}

.netflix-kicker-text {
  color: #e5e5e5;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.netflix-top10-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(135, 106, 255, 0.2);
  border: 1px solid rgba(135, 106, 255, 0.4);
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.netflix-top10-pill .icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.home-hero h1,
.series-hero-billboard h1 {
  max-width: 620px;
  margin: 10px 0 12px;
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
}

.home-hero-meta,
.series-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #a3a3a3;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.netflix-pill-match {
  color: #46d369;
  font-weight: 800;
  font-size: 13px;
}

.netflix-pill-age {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.netflix-pill-uhd {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.netflix-pill-audio {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #cccccc;
}

.home-hero p,
.series-hero-billboard p {
  max-width: 540px;
  margin: 0 0 20px;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.home-hero-actions,
.series-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-netflix-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #000000;
  font-size: 15px;
  font-weight: 800;
  padding: 11px 26px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.22);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn-netflix-play:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
}

.btn-netflix-play .icon {
  width: 18px;
  height: 18px;
  fill: #000000;
}

.btn-netflix-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(109, 109, 110, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.btn-netflix-info:hover {
  background: rgba(109, 109, 110, 0.95);
  transform: scale(1.04);
}

.btn-netflix-info .icon {
  width: 18px;
  height: 18px;
}

.btn-netflix-list {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(42, 42, 42, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn-netflix-list:hover {
  border-color: #ffffff;
  background: rgba(60, 60, 60, 0.8);
  transform: scale(1.08);
}

.btn-netflix-list .icon {
  width: 18px;
  height: 18px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  min-height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.source-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.source-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18);
}

.source-pill .swap {
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
}

.source-pill .swap .icon,
.source-pill .swap .lucide {
  font-size: 15px;
  width: 15px;
  height: 15px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  gap: 2px;
}

.segmented button {
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0 20px;
  height: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.18s ease, color 0.18s ease;
}

.segmented button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.section {
  margin-top: 28px;
}

.section-title {
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 800;
  margin-bottom: 14px;
  color: #e5e5e5;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.section-title:hover {
  color: #ffffff;
}

.netflix-row-kicker {
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

.row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 20px;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.row::-webkit-scrollbar {
  display: none;
}

/* Netflix Top 10 row layout */
.netflix-top10-item {
  display: flex;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
  padding-left: 10px;
}

.netflix-top10-rank {
  font-family: -apple-system, BlinkMacSystemFont, "Impact", "Arial Black", sans-serif;
  font-size: 120px;
  font-weight: 900;
  line-height: 0.75;
  letter-spacing: -12px;
  color: #0b0d14;
  -webkit-text-stroke: 4px #595959;
  text-shadow: 0 0 16px rgba(0, 0, 0, 0.95);
  user-select: none;
  pointer-events: none;
  margin-right: -24px;
  z-index: 1;
  transform: translateY(-2px);
  transition: transform 0.25s ease, -webkit-text-stroke-color 0.25s ease;
}

.netflix-top10-item:hover .netflix-top10-rank {
  -webkit-text-stroke-color: var(--accent);
  transform: translateY(-6px) scale(1.04);
}

.poster {
  flex: 0 0 auto;
  width: 154px;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  background: #181a24;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.25s ease, z-index 0.25s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.poster:hover {
  transform: scale(1.1) translateY(-6px);
  z-index: 15;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.poster:focus-visible,
.card-h:focus-visible,
.result-item:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 0 0 6px rgba(135, 106, 255, 0.25), 0 16px 36px rgba(0, 0, 0, 0.7);
}

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

.media-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(135, 106, 255, 0.2), transparent 45%),
    linear-gradient(145deg, #222430, #0b0c12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.card-h {
  flex: 0 0 auto;
  width: 270px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #181a24;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.25s ease;
}

.card-h:hover {
  transform: scale(1.08) translateY(-4px);
  z-index: 10;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
}

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

.card-h .title,
.poster .title {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

.card-media .card-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 10px;
  background: linear-gradient(180deg, transparent 20%, rgba(11, 13, 20, 0.85) 60%, rgba(11, 13, 20, 0.98) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.card-media:hover .card-hover {
  opacity: 1;
}

.card-media:hover .title {
  opacity: 0;
}

.card-hover-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.card-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(30, 30, 30, 0.8);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.card-mini-btn:hover {
  transform: scale(1.15);
  border-color: #ffffff;
  background: rgba(50, 50, 50, 0.95);
}

.card-mini-play {
  background: #ffffff;
  color: #000000;
  border: none;
}

.card-mini-play:hover {
  background: rgba(255, 255, 255, 0.9);
}

.card-mini-btn .icon {
  width: 12px;
  height: 12px;
}

.card-mini-play .icon {
  fill: #000000;
}

.card-hover-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.card-hover-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.card-hover-match {
  color: #46d369;
  font-weight: 800;
}

.card-hover-age {
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0 3px;
  border-radius: 2px;
  font-size: 9px;
}

.card-hover-quality {
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 0 3px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
}

.card-hover-genres {
  font-size: 10px;
  font-weight: 600;
  color: #a3a3a3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#view-movies .row > .card-media,
#view-series .row > .card-media,
#view-search .row > .card-media {
  width: 154px;
  aspect-ratio: 2 / 3;
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 3;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

/* Season Tabs inside detail-content */
.season-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.season-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.season-tabs button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.season-tabs button.active {
  background: rgba(135, 106, 255, 0.22);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(135, 106, 255, 0.25);
}

/* Horizontal Episode Cards inside .row */
.episodes-horizontal-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
}

.episodes-horizontal-row .episode-card {
  min-width: 260px;
  max-width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  border-radius: 12px;
  transition: transform 0.18s ease;
}

.episodes-horizontal-row .episode-card:hover {
  transform: translateY(-4px);
}

.episodes-horizontal-row .episode-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #151722;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.episodes-horizontal-row .episode-card:hover .episode-card-thumb {
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(135, 106, 255, 0.35);
}

.episodes-horizontal-row .episode-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.episodes-horizontal-row .episode-card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.episodes-horizontal-row .episode-card:hover .episode-card-play {
  opacity: 1;
}

.episodes-horizontal-row .episode-card-play .icon,
.episodes-horizontal-row .episode-card-play .lucide {
  width: 32px;
  height: 32px;
  color: #fff;
  fill: #fff;
}

.episodes-horizontal-row .episode-card-number {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 2px #000, 1px 1px 0 #000, -1px -1px 0 #000;
  letter-spacing: -0.02em;
  z-index: 2;
  line-height: 1;
}

.episodes-horizontal-row .episode-card-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 5px;
  border-radius: 3px;
  z-index: 2;
}

.episodes-horizontal-row .episode-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.episodes-horizontal-row .episode-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.episodes-horizontal-row .episode-card-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

/* Detail views */
.detail-view {
  padding: 0 !important;
  position: relative;
}

.detail-hero {
  height: 100%;
  min-height: 100%;
  background-size: cover;
  background-position: center top;
  position: relative;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(8, 9, 14, 0.94) 0%,
    rgba(8, 9, 14, 0.78) 42%,
    rgba(8, 9, 14, 0.35) 70%,
    rgba(8, 9, 14, 0.55) 100%
  );
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8, 9, 14, 0.95) 100%);
}

.detail-content {
  position: relative;
  z-index: 1;
  padding: 32px 48px 40px;
  width: 100%;
  max-width: 100% !important;
  box-sizing: border-box;
}

#view-movie-detail .detail-content,
#view-series-detail .detail-content {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  max-width: 100% !important;
}

#movie-recommendations-label {
  margin-top: 0;
}

.back-btn {
  position: absolute;
  top: 28px;
  left: 36px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-bottom: 22px;
  font-size: 22px;
}

.back-btn .icon, .back-btn .lucide {
  width: 22px;
  height: 22px;
}

.detail-title {
  font-family: var(--font-ui);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 18px;
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--star);
}

.stars .icon, .stars .lucide {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

.quality {
  display: inline-flex;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.quality span {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}

.synopsis-label {
  font-weight: 700;
  margin-bottom: 8px;
}

.synopsis {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
  font-size: 14px;
  max-width: 640px;
  margin-bottom: 20px;
}

.actions {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #9d8dff, #876aff 55%, #6f57ef);
  color: #fff;
  box-shadow: 0 8px 24px rgba(135, 106, 255, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-2);
  border: 1.5px solid rgba(157, 141, 255, 0.55);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.btn-ghost.is-in-list {
  color: var(--online);
  border-color: rgba(61, 220, 132, 0.45);
  background: rgba(61, 220, 132, 0.08);
}

.btn-white {
  background: linear-gradient(180deg, #ffffff 0%, #e8ecf4 100%);
  color: #12131a;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.12);
}

.btn-white:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.cast-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  margin-bottom: 28px;
  scrollbar-width: none;
}

.cast-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.cast-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 44px;
  background: linear-gradient(135deg, rgba(135, 106, 255, 0.4), rgba(30, 32, 48, 0.9));
  display: grid;
  place-items: center;
}

.cast-avatar-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, #7564e8, #25283a);
  z-index: 1;
}

.cast-avatar-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.cast-avatar-wrap img.loaded {
  opacity: 1;
}

.cast-item .name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.cast-item .role {
  font-size: 12px;
  color: var(--text-dim);
}

.season-tabs {
  display: flex;
  gap: 18px;
  margin: 8px 0 16px;
}

.season-tabs button {
  border: 0;
  background: transparent;
  color: var(--text-mute);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding-bottom: 6px;
  border-bottom: 2px solid transparent;
}

.season-tabs button.active {
  color: #fff;
  border-bottom-color: #fff;
}

.episode {
  flex: 0 0 auto;
  width: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  cursor: pointer;
}

.episode img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.episode .ep-meta {
  padding: 10px 12px 12px;
}

.episode .ep-title {
  font-size: 13px;
  font-weight: 700;
}

.episode .ep-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Search */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.search-bar .icon, .search-bar .lucide {
  font-size: 18px;
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
}

.filter-chips {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  background: var(--panel-3);
  color: var(--text-dim);
  cursor: pointer;
}

.chip.active {
  background: var(--accent);
  color: #fff;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.result-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.result-item img {
  width: 54px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
}

.result-item .media-fallback {
  flex: 0 0 54px;
  width: 54px;
  height: 80px;
  border-radius: 10px;
}

.result-item .rtitle {
  font-weight: 600;
  font-size: 15px;
}

/* Profiles / Synchro */
.centered-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  text-align: center;
  gap: 18px;
}

.centered-page h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.centered-page p {
  color: rgba(255, 255, 255, 0.8);
  margin-top: -8px;
}

.glass-card {
  width: min(720px, 100%);
  text-align: left;
  background: rgba(18, 19, 26, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px 22px;
  box-shadow: var(--shadow);
}

.glass-card h3 {
  font-size: 16px;
  margin-bottom: 14px;
}

.profiles {
  display: flex;
  gap: 22px;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #fff;
  background: transparent;
  border: 0;
  font: inherit;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  border: 2px solid transparent;
}

.avatar.pink {
  background: #e87a5d;
  color: #fff;
}

.avatar.blue {
  background: #4a9fd8;
  color: #fff;
}

.avatar.green {
  background: #5cb88a;
  color: #fff;
}

.avatar.purple {
  background: #9b7bd4;
  color: #fff;
}

.avatar.orange {
  background: #e8a04e;
  color: #fff;
}

.avatar.new {
  background: #2a2c38;
  color: #fff;
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

.avatar.new .icon,
.avatar.new .lucide {
  font-size: 22px;
  width: 22px;
  height: 22px;
}

.avatar.active-profile {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.avatar.has-glyph,
.profile-picker-circle.has-glyph {
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.profile-avatar-glyph {
  display: block;
  font-size: inherit;
  line-height: 1;
  transform: translateY(1px);
}

/* Profile picker */
.profile-picker {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: var(--zen-page-bg) !important;
  background-attachment: fixed !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  padding: 40px 20px !important;
}

.profile-picker.hidden {
  display: none !important;
}

.profile-picker-inner,
.profile-picker .zen-page__inner {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  margin: auto !important;
  width: min(880px, 94vw) !important;
  padding: 0 !important;
}

.profile-picker-inner h1,
.profile-picker .zen-page__title {
  margin: 0 auto 36px !important;
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 44px) !important;
  letter-spacing: -0.02em;
  text-align: center !important;
  color: #fff !important;
}

.profile-picker-logo,
.profile-picker .zen-page__logo {
  width: 100px !important;
  height: 100px !important;
  margin: 0 auto 20px !important;
  display: block !important;
}

.profile-picker-row {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 32px !important;
  margin: 0 auto 36px !important;
  width: 100% !important;
}

.profile-picker-slot {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 10px;
  min-width: 96px;
}

.profile-picker-item {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-ui);
}

.profile-picker-circle {
  width: 96px;
  height: 96px;
  border-radius: 4px;
  background: #3a3d4a;
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  position: relative !important;
  overflow: hidden !important;
}

.profile-picker-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  animation: fadeIn 0.18s ease;
  backdrop-filter: blur(2px);
  z-index: 5;
}

.profile-picker-item:hover .profile-picker-circle,
.profile-picker-item.is-selected .profile-picker-circle,
.profile-picker-item.is-focused .profile-picker-circle {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.profile-picker-item:hover .profile-picker-circle {
  transform: scale(1.04);
}

.profile-picker-circle-add {
  background: transparent;
  border: 2px dashed rgba(255, 255, 255, 0.34);
}

.profile-picker-circle-add .icon,
.profile-picker-circle-add .lucide {
  width: 34px;
  height: 34px;
  stroke-width: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.profile-picker-item:hover .profile-picker-circle-add {
  border-color: rgba(255, 255, 255, 0.55);
  transform: none;
}

.profile-picker-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(210, 214, 230, 0.78);
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-picker-remove {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

.profile-picker-remove .icon,
.profile-picker-remove .lucide {
  width: 16px;
  height: 16px;
}

.profile-picker-remove:hover {
  color: #fff;
  transform: scale(1.1);
}

.profile-picker-edit,
.profile-picker-source {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 6px auto !important;
  text-align: center !important;
}

.profile-picker-source {
  margin-top: 4px !important;
}

/* Create profile */
.create-profile {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.create-profile.hidden {
  display: none;
}

.create-profile-inner {
  text-align: center;
  animation: splash-rise 0.55s ease both;
}

.create-profile-inner h1 {
  margin-bottom: 24px;
}

.create-profile-form {
  text-align: left;
  margin-top: 8px;
}

.create-profile-form .field {
  margin-bottom: 16px;
}

.create-profile-hero {
  position: relative;
  display: inline-grid;
  place-items: center;
  margin: 0 auto 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.create-profile-avatar {
  width: 104px;
  height: 104px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  font-size: 48px;
  font-weight: 700;
  border: 3px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.create-profile-avatar.has-glyph {
  font-size: 52px;
  font-weight: 400;
}

.create-profile-avatar.neutral {
  background: #3f434f;
  color: transparent;
}

.create-profile-hero:hover .create-profile-avatar,
.create-profile-hero:focus-visible .create-profile-avatar {
  transform: scale(1.03);
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.create-profile-edit-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #12131a;
  background: #fff;
  color: #12131a;
}

.create-profile-edit-badge .icon,
.create-profile-edit-badge .lucide {
  width: 14px;
  height: 14px;
}

.create-profile-avatar-label {
  font-size: var(--zen-subtitle-size);
  color: var(--text-dim);
  margin-bottom: 22px;
}

.create-profile-row-btn {
  width: 100%;
  min-height: var(--zen-field-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--zen-field-border);
  border-radius: var(--zen-field-radius);
  background: var(--zen-field-bg);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.create-profile-row-btn:hover,
.create-profile-row-btn:focus-visible {
  border-color: var(--zen-field-focus);
  box-shadow: 0 0 0 3px rgba(157, 141, 255, 0.12);
  outline: none;
}

.create-profile-row-btn .icon,
.create-profile-row-btn .lucide {
  width: var(--icon-sm);
  height: var(--icon-sm);
  color: var(--text-dim);
}

.create-profile-kids {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 22px;
  padding: 14px;
  border: 1px solid var(--zen-field-border);
  border-radius: var(--zen-field-radius);
  background: rgba(255, 255, 255, 0.03);
}

.create-profile-kids strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.create-profile-kids small {
  color: var(--text-dim);
  font-size: 11px;
}

.create-profile-avatar-overlay,
.create-profile-lang-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.create-profile-avatar-overlay.hidden,
.create-profile-lang-overlay.hidden {
  display: none;
}

.create-profile-avatar-sheet,
.create-profile-lang-sheet {
  width: min(720px, 92vw);
  max-height: min(88vh, 740px);
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  animation: fadeIn 0.25s ease;
}

.create-profile-sheet-header,
.create-profile-lang-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

.create-profile-sheet-header h2,
.create-profile-lang-header h2 {
  flex: 1;
  margin: 0;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.create-profile-sheet-header button,
.create-profile-lang-header button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.create-profile-sheet-header button:hover,
.create-profile-lang-header button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.05);
}

.create-profile-avatar-grid {
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
  padding: 26px 28px 32px;
  justify-items: center;
}

.create-profile-avatar-option {
  width: 110px;
  height: 110px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 3.5px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 52px;
  line-height: 1;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s cubic-bezier(0.33, 1, 0.68, 1),
              border-color 0.18s ease,
              box-shadow 0.18s ease;
}

.create-profile-avatar-option.has-glyph {
  font-size: 54px;
}

.create-profile-avatar-option:hover {
  transform: scale(1.08);
  border-color: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.create-profile-avatar-option.selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

/* Avatar Option Color Themes */
.create-profile-avatar-option.orange {
  background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
}
.create-profile-avatar-option.purple {
  background: linear-gradient(135deg, #9b59b6 0%, #5b2c6f 100%);
}
.create-profile-avatar-option.pink,
.create-profile-avatar-option.red {
  background: linear-gradient(135deg, #e50914 0%, #8b0000 100%);
}
.create-profile-avatar-option.blue {
  background: linear-gradient(135deg, #1f75fe 0%, #084298 100%);
}
.create-profile-avatar-option.green {
  background: linear-gradient(135deg, #2ecc71 0%, #196f3d 100%);
}

.create-profile-lang-list {
  overflow: auto;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.btn .icon, .btn .lucide {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Setup / Your IPTV Screen */
#setup {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 500 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 40px 16px 60px !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  background: var(--zen-page-bg) !important;
  background-attachment: fixed !important;
}

#setup.hidden {
  display: none !important;
}

.setup-wrap {
  width: min(480px, 94vw);
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: zenPageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.setup-hero {
  text-align: center;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.setup-hero-icon {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.setup-hero-icon img {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 6px 18px rgba(124, 77, 255, 0.45));
}

.setup-hero-title {
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 4px 0;
}

.setup-hero-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
}

.setup-tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 12px;
}

.setup-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.setup-tab-btn .icon {
  font-size: 15px;
  width: 15px;
  height: 15px;
  opacity: 0.85;
}

.setup-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.setup-tab-btn.active {
  color: #fff;
  background: rgba(124, 77, 255, 0.24);
  border-color: rgba(124, 77, 255, 0.45);
  box-shadow: 0 2px 10px rgba(124, 77, 255, 0.2);
}

.setup-tab-btn.active .icon {
  color: #a78bfa;
  opacity: 1;
}

.setup-shell {
  padding: 10px 4px 0 4px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.setup-panel {
  display: none;
}

.setup-panel.active {
  display: block;
  animation: zenPanelFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.setup-panel-header {
  margin-bottom: 16px;
}

.setup-panel-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px 0;
}

.setup-panel-header p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.7);
}

.field-optional {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10.5px;
  font-weight: 400;
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
  border-radius: 10px !important;
  padding: 10px 13px !important;
  font-size: 13.5px !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: all 0.18s ease !important;
}

.field input:focus {
  border-color: #876aff !important;
  box-shadow: 0 0 0 3px rgba(135, 106, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.field input.is-invalid {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
}

.field-error-msg {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #f87171;
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 6px;
  animation: splash-rise 0.2s ease-out;
}

.field-error-msg .icon {
  width: 13px;
  height: 13px;
  stroke: #f87171;
  flex-shrink: 0;
}

.input-shake {
  animation: field-shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes field-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.field-hint {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  line-height: 1.4;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-setup-action {
  width: 100%;
  min-height: 44px;
  padding: 11px 18px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 10px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none !important;
  cursor: pointer;
  background: linear-gradient(135deg, #876aff, #6f57ef) !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(135, 106, 255, 0.35) !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease !important;
}

.btn-setup-action:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
  box-shadow: 0 8px 24px rgba(135, 106, 255, 0.45) !important;
}

.btn-setup-action:active {
  transform: translateY(0) !important;
}

.setup-demo-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 18px;
}

.setup-demo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.setup-demo-badge .icon {
  color: #a78bfa;
  font-size: 15px;
}

/* Smart TV Pairing Styles */
.tv-pair-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tv-pair-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.tv-pair-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #876aff;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tv-pair-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(135, 106, 255, 0.1);
  border: 1px solid rgba(135, 106, 255, 0.25);
  border-radius: 10px;
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tv-pair-url:hover {
  background: rgba(135, 106, 255, 0.18);
  border-color: rgba(135, 106, 255, 0.45);
  color: #fff;
}

.tv-pair-pin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(135, 106, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(135, 106, 255, 0.15);
}

.tv-pair-digit {
  width: 42px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tv-pair-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.tv-pair-meta .icon {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
}

.tv-pair-pulse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #34d399;
  font-weight: 600;
}

.tv-pair-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse-soft 1.5s infinite;
}

.setup-footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  line-height: 1.35;
}

.setup-footer-note .icon {
  color: #34d399;
  font-size: 14px;
  flex-shrink: 0;
}

/* Source Loading Card & Modal */
/* Dedicated Full-Page Connecting Experience (Border-free, Ultra-Premium) */
#setup.is-connecting .setup-hero,
#setup.is-connecting .setup-tabs-nav,
#setup.is-connecting .setup-panel,
#setup.is-connecting .setup-footer-note,
.setup-wrap.is-connecting .setup-hero,
.setup-wrap.is-connecting .setup-tabs-nav,
.setup-wrap.is-connecting .setup-panel,
.setup-wrap.is-connecting .setup-footer-note {
  display: none !important;
}

.source-loading {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  background:
    radial-gradient(1000px 600px at 50% 38%, rgba(135, 106, 255, 0.22) 0%, transparent 68%),
    linear-gradient(180deg, #12131a 0%, #0b0c12 100%) !important;
  background-attachment: fixed !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.source-loading.hidden {
  display: none !important;
}

.source-loading-card {
  width: min(520px, 92vw) !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 14px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.source-loading-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.source-loading-brand img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 16px rgba(135, 106, 255, 0.65));
  animation: pulse-soft 2.4s ease-in-out infinite;
}

.source-loading-spinner {
  width: 46px;
  height: 46px;
  margin: 4px auto 10px;
  border: 3.5px solid rgba(255, 255, 255, 0.08);
  border-top-color: #8b5cf6;
  border-right-color: #c084fc;
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
  animation: spin 0.75s linear infinite;
}

.source-loading-phase {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.source-loading-card h2 {
  font-size: clamp(23px, 4vw, 29px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 2px 0 0;
}

.source-loading-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 auto 8px;
  max-width: 420px;
  line-height: 1.5;
}

.source-loading-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.source-loading-progress span {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
  transition: width 0.25s ease;
}

.source-loading-meta,
.source-loading-steps {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.source-loading-meta {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 500;
}

.source-loading-meta span:first-child {
  color: #ffffff;
  font-weight: 700;
}

.source-loading-steps {
  margin-top: 14px;
  gap: 10px;
}

.source-loading-step {
  position: relative;
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.source-loading-step::before {
  display: block;
  width: 7px;
  height: 7px;
  margin: 0 auto 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.source-loading-step.active {
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.2);
}

.source-loading-step.done {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.3);
}

/* Live TV */
#view-live {
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  flex-direction: column;
}

#view-live.active {
  display: flex;
}

.live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  height: 42px;
  min-height: 42px;
  box-sizing: content-box;
}

.live-header .segmented {
  margin: 0;
}

.live-epg-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.live-epg-meta .icon,
.live-epg-meta .lucide {
  width: var(--icon-sm);
  height: var(--icon-sm);
}

.live-shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 210px 1fr;
  grid-template-rows: 1fr;
}

.live-shell.epg-mode {
  grid-template-columns: 210px 1fr;
}

.live-shell.epg-mode .live-main {
  display: none;
}

.live-shell.epg-mode .live-epg {
  display: flex;
  flex-direction: column;
}

.live-main {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  min-height: 0;
  min-width: 0;
}


.live-epg {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  min-width: 0;
  background: var(--bg-deep);
  border-left: 1px solid var(--border);
}

.live-epg.hidden {
  display: none;
}

.epg-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(14, 15, 23, 0.95);
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-shrink: 0;
}

.epg-days {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.epg-day-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.epg-day-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.epg-day-btn.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.35);
}

.epg-date-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* EPG Draggable Border Resizers ("njbed le line dial border") */
.epg-border-resizer {
  position: absolute;
  top: 0;
  right: -6px;
  width: 12px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.epg-border-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  background: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.epg-border-resizer:hover::after,
.epg-border-resizer.is-dragging::after {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.9);
}

/* Clean EPG Intermediate Time Ticks ("detil dial time binom") */
.epg-time-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.epg-time-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0 4px;
  box-sizing: border-box;
}

.epg-tick-line {
  width: 1px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
}

.epg-tick-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-mute);
  opacity: 0.82;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.epg-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.epg-grid {
  --epg-row-h: 72px;
  min-width: max-content;
}

.epg-times {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11, 12, 18, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  user-select: none;
  min-width: max-content;
}

.epg-times .epg-corner {
  position: relative;
  width: var(--epg-ch-w, 168px);
  min-width: var(--epg-ch-w, 168px);
  max-width: var(--epg-ch-w, 168px);
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-sizing: border-box;
}

.epg-time {
  position: relative;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  flex-shrink: 0;
}

.epg-time-main {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.epg-time.is-now .epg-time-main {
  color: var(--accent-2);
}

.epg-time.is-now {
  color: var(--accent-2);
  background: rgba(var(--accent-rgb), 0.08);
}

.epg-now-line {
  position: absolute;
  top: 44px;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.45);
}

.epg-row {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: var(--epg-row-h);
  position: relative;
  z-index: 1;
}

.epg-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.epg-channel {
  width: var(--epg-ch-w, 168px);
  min-width: var(--epg-ch-w, 168px);
  max-width: var(--epg-ch-w, 168px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-right: 1px solid var(--border);
  background: rgba(11, 12, 18, 0.98);
  position: sticky;
  left: 0;
  z-index: 2;
  flex-shrink: 0;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.epg-channel:hover {
  background: rgba(255, 255, 255, 0.035);
}

.epg-ch-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.epg-ch-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.epg-channel.is-active .epg-ch-name {
  color: var(--accent-2);
}

.epg-track {
  position: relative;
  display: block;
  min-height: var(--epg-row-h);
  height: var(--epg-row-h);
  flex-shrink: 0;
}

.epg-grid-lines {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--epg-ch-w, 168px);
  display: flex;
  pointer-events: none;
  z-index: 0;
}

.epg-grid-slot-line {
  position: relative;
  height: 100%;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
}

.epg-sub-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  border-right: 1px dashed rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.epg-prog {
  position: absolute;
  top: 8px;
  height: 56px;
  padding: 6px 10px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(36, 38, 52, 0.95) 0%, rgba(22, 24, 34, 0.98) 100%);
  color: #fff;
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  z-index: 1;
}


.epg-prog:hover {
  border-color: rgba(157, 141, 255, 0.45);
  transform: translateY(-1px);
}

.epg-prog.is-now {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: linear-gradient(180deg, rgba(58, 52, 92, 0.85) 0%, rgba(28, 26, 44, 0.98) 100%);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.15);
}

.epg-prog.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.epg-prog.is-replayable {
  border-color: rgba(85, 214, 164, 0.28);
}

.epg-prog.is-replayable::after {
  content: "Replay";
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(85, 214, 164, 0.16);
  color: #8df0c8;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.epg-prog-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-prog-time {
  font-size: 10px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-prog-desc {
  font-size: 10px;
  color: var(--text-mute);
  line-height: 1.25;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.85;
}

.live-cats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px 14px;
  overflow: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.live-cat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 4px 8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-cat-toolbar span {
  white-space: nowrap;
  letter-spacing: 0.06em;
  user-select: none;
}

.live-group-create,
.live-cat-reset {
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.live-group-create {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-size: 17px;
  line-height: 1;
  padding: 0;
}

/* ── Live search bar ───────────────────────────────────────── */
.live-cat-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.live-cat-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.live-cat-search-btn:hover {
  background: rgba(var(--accent-rgb), 0.18);
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.5);
}
.live-cat-search-icon {
  width: 13px;
  height: 13px;
}

/* Collapsible wrapper */
.live-cat-search-wrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.22s ease;
  padding: 0 4px;
}
.live-cat-search-wrap.open {
  max-height: 56px;
  opacity: 1;
  padding: 0 4px 8px;
}

.live-cat-search-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 10px;
  transition: border-color 0.18s;
}
.live-cat-search-inner:focus-within {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.08);
}

.live-cat-search-field-icon {
  width: 13px;
  height: 13px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.live-cat-search-field {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
  min-width: 0;
}
.live-cat-search-field::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.live-cat-search-field::-webkit-search-cancel-button { display: none; }

.live-cat-search-clear {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, color 0.15s;
}
.live-cat-search-field:not(:placeholder-shown) ~ .live-cat-search-clear {
  opacity: 1;
  pointer-events: auto;
}
.live-cat-search-clear:hover { color: #fff; }

.live-cat-entry {
  position: relative;
  display: flex;
  align-items: stretch;
}

.live-cat-entry .live-cat {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 66px;
}

.live-cat-entry.pinned .live-cat {
  box-shadow: inset 2px 0 0 #ffb45a;
}

.live-cat-actions {
  position: absolute;
  top: 50%;
  right: 10px;
  display: flex;
  gap: 2px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.live-cat-entry:hover .live-cat-actions,
.live-cat-entry:focus-within .live-cat-actions {
  opacity: 1;
}

.live-cat-actions button {
  width: 20px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.live-cat-actions button:hover,
.live-group-create:hover,
.live-cat-reset:hover {
  color: #fff;
  border-color: rgba(199, 190, 255, 0.72);
  background: rgba(var(--accent-rgb), 0.18);
}

.live-cat-reset {
  margin: 8px 12px 0;
  padding: 7px 9px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
}

.live-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
  transition: 0.15s ease;
}

.live-cat img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.live-cat-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.live-cat-icon-svg,
.live-cat-icon-svg .lucide {
  width: 16px;
  height: 16px;
  stroke-width: 1.75;
}

.live-cat-action-icon,
.live-cat-action-icon .lucide {
  width: 14px;
  height: 14px;
  stroke-width: 1.75;
  pointer-events: none;
}

.live-cat span {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-cat:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

.live-cat.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.live-cat.active img {
  width: 36px;
  height: 36px;
}

.live-cat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.live-cat-meta strong {
  font-size: 14px;
  font-weight: 700;
}

.live-cat-meta small {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.38);
}

.live-channels {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 28px;
  overflow: auto;
  min-height: 0;
  background: #0b0c12;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 90%, transparent 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.live-channels::-webkit-scrollbar {
  width: 5px;
}

.live-channels::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}


.live-load-more {
  align-self: center;
  min-width: 220px;
  margin: 4px 0 10px;
  padding: 11px 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  background: rgba(51, 51, 51, 0.88);
  color: rgba(255, 255, 255, 0.9);
  font: 700 13px var(--font-ui);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.live-load-more span {
  margin-left: 5px;
  color: rgba(255, 255, 255, 0.54);
  font-weight: 500;
}

.live-load-more:hover,
.live-load-more:focus-visible {
  border-color: rgba(199, 190, 255, 0.72);
  background: rgba(70, 64, 112, 0.96);
  transform: translateY(-1px);
}

.live-channel {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background:
    linear-gradient(135deg, rgba(53, 51, 82, 0.98), rgba(25, 27, 42, 0.99));
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(var(--accent-rgb), 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-align: left;
  color: #fff;
  font-family: var(--font-ui);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  flex: 0 0 auto;
}

.live-channel:hover {
  border-color: rgba(185, 174, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(58, 56, 88, 0.98), rgba(29, 30, 49, 0.98));
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(var(--accent-rgb), 0.12);
  transform: translateY(-2px);
}

.live-channel.active {
  border-color: rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(66, 62, 101, 0.98), rgba(31, 31, 53, 0.98));
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 24px rgba(var(--accent-rgb), 0.16);
}

.live-channel.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.live-channel-logo {
  position: relative;
  width: 78px;
  height: 54px;
  border-radius: 10px;
  background: linear-gradient(145deg, #171925, #0b0d15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 5px 12px rgba(0, 0, 0, 0.22);
  flex-shrink: 0;
}

.live-channel-logo span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  z-index: 1;
}

.live-channel-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.live-channel-logo img.loaded {
  opacity: 1;
  background: #0b0d15;
}

.live-channel-body {
  min-width: 0;
}

.live-channel-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-channel-views {
  font-size: 12px;
  color: rgba(180, 188, 210, 0.62);
  margin-bottom: 6px;
}

.live-channel-epg {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.live-channel-epg-label {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.2);
  color: #c9beff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.live-channel-epg-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-channel-epg-time {
  flex: 0 0 auto;
  color: rgba(180, 188, 210, 0.62);
  font-variant-numeric: tabular-nums;
}

.live-channel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.live-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

.live-fav {
  position: absolute;
  right: 14px;
  bottom: 14px;
  color: #ff9f43;
  font-size: 16px;
  opacity: 0;
}

.live-fav.star-on {
  fill: #ff9f43;
  stroke: #ff9f43;
}

.live-channel-action {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(5, 6, 12, 0.48);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.live-channel-favorite {
  right: 14px;
  bottom: 12px;
}

.live-channel-group {
  top: 12px;
  right: 14px;
  font-size: 19px;
  line-height: 1;
}

.live-channel:hover .live-channel-action,
.live-channel:focus-within .live-channel-action,
.live-channel-action.is-on {
  opacity: 1;
}

.live-channel-action:hover,
.live-channel-action.is-on {
  background: rgba(var(--accent-rgb), 0.28);
  color: #ffb45a;
}

.live-channel-action .live-fav {
  position: static;
  opacity: 1;
  color: currentColor;
  font-size: 15px;
}

.live-action-fav.is-on .icon,
.live-action-fav.is-on .lucide {
  fill: #ff9f43;
  stroke: #ff9f43;
}

/* ── Live Recording Pill Badge & Active Pulse ── */
.live-recording-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 9, 20, 0.2);
  border: 1px solid rgba(229, 9, 20, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 6px 14px;
  border-radius: 9999px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
  animation: recBadgeGlow 2s infinite ease-in-out;
  margin-left: auto;
}

.live-recording-badge.hidden {
  display: none !important;
}

.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e50914;
  box-shadow: 0 0 10px #e50914;
  animation: recDotBlink 1s infinite alternate;
}

.rec-text {
  color: #ff4d4f;
  font-weight: 800;
}

.rec-timer {
  font-family: monospace;
  font-size: 13px;
  color: #ffffff;
}

@keyframes recDotBlink {
  0% { opacity: 0.3; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.2); }
}

@keyframes recBadgeGlow {
  0%, 100% { border-color: rgba(229, 9, 20, 0.4); box-shadow: 0 4px 18px rgba(229, 9, 20, 0.3); }
  50% { border-color: rgba(229, 9, 20, 0.9); box-shadow: 0 4px 28px rgba(229, 9, 20, 0.65); }
}

#live-player-record.is-recording {
  background: rgba(229, 9, 20, 0.25) !important;
  color: #e50914 !important;
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.65) !important;
  border-color: rgba(229, 9, 20, 0.7) !important;
  animation: recBtnPulse 1.5s infinite alternate;
}

#live-player-record.is-recording .icon,
#live-player-record.is-recording .lucide {
  color: #ff3344 !important;
  fill: #ff3344 !important;
  stroke: #ff3344 !important;
}

@keyframes recBtnPulse {
  0% { transform: scale(1); box-shadow: 0 0 10px rgba(229, 9, 20, 0.4); }
  100% { transform: scale(1.08); box-shadow: 0 0 22px rgba(229, 9, 20, 0.85); }
}

#live-player-timeshift.is-active .icon,
#live-player-timeshift.is-active .lucide {
  color: #8df0c8;
  stroke: #8df0c8;
}

.live-channel.active .live-fav {
  opacity: 1;
}

#live-preview-recording-badge {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 10;
  margin-left: 0;
}

.live-preview-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -4px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 5;
}

.live-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.live-preview-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.live-preview-btn .icon {
  width: 14px;
  height: 14px;
}

.live-preview-rec-btn {
  background: rgba(229, 9, 20, 0.15);
  border-color: rgba(229, 9, 20, 0.4);
  color: #ff5566;
}

.live-preview-rec-btn:hover {
  background: rgba(229, 9, 20, 0.28);
  border-color: rgba(229, 9, 20, 0.65);
  color: #ff3344;
}

.live-preview-rec-btn.is-recording {
  background: rgba(229, 9, 20, 0.35) !important;
  border-color: rgba(229, 9, 20, 0.85) !important;
  color: #ff3344 !important;
  box-shadow: 0 0 16px rgba(229, 9, 20, 0.6) !important;
  animation: recBtnPulse 1.5s infinite alternate;
}

.live-preview-rec-btn.is-recording .icon,
.live-preview-rec-btn.is-recording .lucide {
  color: #ff3344 !important;
  fill: #ff3344 !important;
  stroke: #ff3344 !important;
}

.live-preview {
  position: relative;
  overflow: hidden;
  min-height: 0;
  z-index: 1;
  border-left: 0;
  box-shadow:
    -18px 0 34px rgba(0, 0, 0, 0.34),
    inset 1px 0 0 rgba(var(--accent-rgb), 0.08);
  cursor: pointer;
}

.live-preview-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
  transform: scale(1.02);
}

.live-preview-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #080a12;
}

.live-preview-fade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(
      90deg,
      #0b0c12 0%,
      rgba(11, 12, 18, 0.92) 8%,
      rgba(11, 12, 18, 0.55) 22%,
      rgba(11, 12, 18, 0.18) 40%,
      transparent 62%
    ),
    linear-gradient(
      180deg,
      rgba(11, 12, 18, 0.12) 0%,
      transparent 28%,
      rgba(11, 12, 18, 0.28) 58%,
      rgba(11, 12, 18, 0.9) 100%
    );
  pointer-events: none;
}

.live-preview-state {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 3;
  transform: translate(-50%, -50%);
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(8, 10, 18, 0.76);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.live-now {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  font-family: var(--font-ui);
  max-width: 520px;
}

.live-now-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}

.live-now-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.live-now-desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(210, 214, 230, 0.72);
  margin-bottom: 14px;
  max-width: 480px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  transition: max-height 0.25s ease;
}

.live-now-desc.is-expanded {
  display: block;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.live-desc-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 12px;
  margin-top: -6px;
  margin-bottom: 16px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  width: fit-content;
}

.live-desc-more-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.live-desc-more-btn .icon {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

.live-desc-more-btn.is-expanded .icon {
  transform: rotate(180deg);
}

.live-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-progress-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.live-progress-bar > span {
  display: block;
  height: 100%;
  background: #fff;
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.live-progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

/* Live fullscreen player */
.live-player {
  position: absolute;
  inset: 0;
  z-index: 40;
  border-radius: inherit;
  overflow: hidden;
  font-family: var(--font-ui);
  color: #fff;
}

.live-player.hidden {
  display: none;
}

.live-player-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.live-player-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080a12;
}

.live-player-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.45) 0%, transparent 28%, transparent 55%, rgba(8, 10, 18, 0.82) 100%),
    linear-gradient(90deg, rgba(8, 10, 18, 0.35) 0%, transparent 40%);
  pointer-events: none;
}

.live-player-state {
  position: absolute;
  left: 50%;
  top: 64%;
  z-index: 3;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(8, 10, 18, 0.78);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}

.live-player-top,
.live-player-controls,
.live-player-bottom,
.live-player-shade {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.live-player.controls-visible .live-player-top,
.live-player.controls-visible .live-player-controls,
.live-player.controls-visible .live-player-bottom,
.live-player.controls-visible .live-player-shade {
  opacity: 1;
  pointer-events: auto;
}

.live-player:not(.controls-visible):not(.hidden) {
  cursor: none;
}

.live-player-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 22px 28px;
  transform: translateY(-8px);
}

.live-player.controls-visible .live-player-top {
  transform: translateY(0);
}

.live-watching-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

.live-player-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.live-player-logo-mark {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #f5c518;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f5c518;
}

.live-player-brand strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.live-player-country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.live-player-country img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.live-player-controls {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 28px;
}

.live-player.controls-visible .live-player-controls {
  transform: translate(-50%, -50%) scale(1);
}

.live-ctrl {
  border: 0;
  background: transparent;
  color: #fff;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 28px;
  opacity: 0.9;
}

.live-ctrl-main {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(20, 22, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 34px;
}

.live-player-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  padding: 24px 28px 28px;
  transform: translateY(8px);
}

.live-player.controls-visible .live-player-bottom {
  transform: translateY(0);
}

.live-player-info {
  max-width: 420px;
}

.live-badge-live {
  display: inline-block;
  background: #e03131;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.live-player-info h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.live-player-channel {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 8px;
}

.live-player-time {
  font-size: 22px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.live-player-collapse {
  justify-self: center;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  margin-bottom: 8px;
  opacity: 0.85;
}

.live-player-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 6px;
}

.live-action {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}

.live-action .icon,
.live-action .lucide,
.live-action svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.live-action-fav {
  color: #fff;
}

.live-action-fav.is-on {
  color: #ff9f43;
}

.live-action-fav.is-on .icon,
.live-action-fav.is-on .lucide,
.live-action-fav.is-on svg {
  fill: #ff9f43;
  stroke: #ff9f43;
}

#view-settings {
  padding: 18px 22px 22px;
  background: #0d0f16;
}

.settings-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 280px);
  gap: 18px;
  min-height: 0;
}

.settings-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  padding-right: 4px;
}

.settings-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

.settings-section-title {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 6px 0 2px;
}

.settings-cards {
  display: grid;
  gap: 12px;
}

.settings-cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #171a24 0%, #13151e 100%);
  color: #fff;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.settings-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: linear-gradient(180deg, #1c2030 0%, #161925 100%);
  transform: translateY(-1px);
}

.settings-ico {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent-2);
  flex-shrink: 0;
}

.settings-ico .icon, .settings-ico .lucide {
  font-size: 22px;
  color: var(--accent-2);
}

.settings-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.settings-card-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.settings-card-text small {
  font-size: 12px;
  font-weight: 400;
  color: rgba(180, 188, 210, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-chevron {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.35);
}

.settings-brand {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #12131a;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.settings-brand-media {
  flex: 1.15;
  min-height: 180px;
  background:
    linear-gradient(180deg, rgba(20, 12, 40, 0.15) 0%, rgba(12, 10, 24, 0.55) 70%, #12131a 100%),
    url("https://images.unsplash.com/photo-1510798831972-504808c5f5d4?auto=format&fit=crop&w=800&q=80")
      center / cover no-repeat;
}

.settings-brand-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 16px 20px;
  font-family: var(--font-ui);
}

.settings-brand-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
}

.settings-brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.settings-brand-tag {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(210, 214, 230, 0.78);
  max-width: 180px;
  margin-bottom: auto;
}

.settings-brand-version {
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 980px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-brand {
    min-height: 280px;
  }
  .settings-cards-3 {
    grid-template-columns: 1fr;
  }
  .settings-cards-2 {
    grid-template-columns: 1fr;
  }
  .ms-options {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
}

.live-action.is-on .icon,
.live-action.is-on .lucide {
  fill: var(--star);
  stroke: var(--star);
}

/* VOD fullscreen player */
.vod-player {
  position: absolute;
  inset: 0;
  z-index: 41;
  border-radius: inherit;
  overflow: hidden;
  font-family: var(--font-ui);
  color: #fff;
}

.vod-player.hidden {
  display: none;
}

.vod-player-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.vod-player-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1 !important;
  background: #000;
  transition: opacity 0.25s ease;
}

.vod-player-video.has-source {
  opacity: 1 !important;
}

.vod-media-state {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  max-width: min(420px, calc(100% - 40px));
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(10, 11, 17, 0.72);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
}

.vod-media-state.hidden {
  display: none;
}

.vod-media-state[data-state="error"] {
  color: #ffb4bd;
  border-color: rgba(255, 120, 140, 0.35);
}

.vod-player-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.72) 0%, transparent 24%, transparent 52%, rgba(8, 10, 18, 0.9) 100%),
    linear-gradient(90deg, rgba(8, 10, 18, 0.45) 0%, transparent 42%);
  pointer-events: none;
}

.vod-player-top,
.vod-player-controls,
.vod-player-bottom {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.vod-player-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 28px;
}

.vod-player-back {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.vod-player-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.vod-player-back .icon,
.vod-player-back .lucide {
  width: var(--icon-lg);
  height: var(--icon-lg);
}

.vod-player-label {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.vod-player-meta h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.vod-player-meta p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.vod-player-controls {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 28px;
}

.vod-ctrl {
  border: 0;
  background: transparent;
  color: #fff;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.9;
}

.vod-ctrl .icon,
.vod-ctrl .lucide {
  width: 28px;
  height: 28px;
}

.vod-ctrl-main {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(20, 22, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.vod-ctrl-main .icon,
.vod-ctrl-main .lucide {
  width: 34px;
  height: 34px;
}

.vod-player-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  padding: 20px 28px 28px;
}

.vod-player-progress-block {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

.vod-player-progress {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  margin-bottom: 8px;
}

.vod-player-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: inherit;
  background: var(--progress);
  transition: width 0.25s linear;
}

.vod-player-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: left 0.25s linear;
}

.vod-player-times {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}

.vod-player-collapse {
  justify-self: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  margin-bottom: 8px;
  opacity: 0.85;
}

.vod-player-collapse .icon,
.vod-player-collapse .lucide {
  width: 28px;
  height: 28px;
}

.vod-player-actions {
  justify-self: end;
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.vod-player.is-playing:not(.controls-visible) .vod-player-top,
.vod-player.is-playing:not(.controls-visible) .vod-player-controls,
.vod-player.is-playing:not(.controls-visible) .vod-player-bottom,
.vod-player.is-playing:not(.controls-visible) .vod-player-actions {
  opacity: 0;
  pointer-events: none;
}

.vod-player.is-playing:not(.controls-visible) .vod-player-top {
  transform: translateY(-8px);
}

.vod-player.is-playing:not(.controls-visible) .vod-player-controls {
  transform: translate(-50%, calc(-50% + 8px));
}

.vod-player.is-playing:not(.controls-visible) .vod-player-bottom {
  transform: translateY(8px);
}

.vod-player.is-playing.controls-visible .vod-player-top,
.vod-player.is-playing.controls-visible .vod-player-controls,
.vod-player.is-playing.controls-visible .vod-player-bottom,
.vod-player.is-playing.controls-visible .vod-player-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.vod-player.is-playing.controls-visible .vod-player-controls {
  transform: translate(-50%, -50%);
}

.vod-action {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 22, 32, 0.45);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.vod-action .icon,
.vod-action .lucide {
  width: var(--icon-md);
  height: var(--icon-md);
}

.vod-action.is-on .icon,
.vod-action.is-on .lucide {
  color: var(--accent-2);
}

/* Settings subpages */
#view-multiscreens,
#view-player,
#view-parental,
#view-support,
#view-legal,
#view-language {
  padding: 0;
  background: var(--panel);
}

.settings-subpage {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px 28px 28px;
  font-family: var(--font-ui);
  min-height: 0;
}

.settings-sub-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.settings-sub-titles h1 {
  font-family: var(--font-ui);
  font-size: var(--zen-title-size);
  font-weight: var(--zen-title-weight);
  color: #fff;
  line-height: 1.2;
}

.settings-sub-titles p {
  font-size: var(--zen-subtitle-size);
  color: var(--text-dim);
  margin-top: 2px;
}

.ms-options {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-content: center;
  min-height: 0;
}

#view-multiscreens .ms-options {
  flex: 0 0 auto;
}

.multiscreen-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  min-height: 0;
}

.multiscreen-live-pane {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #090b13;
}

.multiscreen-live-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  background: #090b13;
}

.multiscreen-live-label {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  overflow: hidden;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(5, 7, 13, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.multiscreen-live-pane[data-state="error"]::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "Stream unavailable";
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}


.ms-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(36, 38, 52, 0.95) 0%, rgba(20, 22, 32, 0.98) 100%);
  color: #fff;
  font-family: var(--font-ui);
  cursor: pointer;
  min-height: 280px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ms-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-2px);
}

.ms-card.selected {
  border-color: rgba(157, 141, 255, 0.45);
  background: linear-gradient(180deg, rgba(58, 52, 92, 0.75) 0%, rgba(24, 26, 40, 0.98) 100%);
  box-shadow: 0 14px 36px rgba(var(--accent-rgb), 0.18);
}

.ms-grid {
  flex: 1;
  display: grid;
  gap: 10px;
  min-height: 200px;
}

.ms-grid-2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.ms-grid-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.ms-grid-3 .ms-pane:nth-child(3) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 50%;
}

.ms-grid-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.ms-pane {
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  display: grid;
  place-items: center;
  min-height: 72px;
}

.ms-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
}

.ms-play .icon, .ms-play .lucide {
  margin-left: 2px;
}

.ms-label {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.settings-card.pulse {
  border-color: rgba(var(--accent-rgb), 0.55);
}

#view-playlist-type,
#view-player,
#view-support,
#view-legal,
#view-parental,
#view-language {
  padding: 0;
  background: #0d0f16;
}

.settings-sub-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  padding-top: 18px;
}

.settings-sub-footer.end {
  justify-content: flex-end;
}

.settings-action-btn {
  min-width: 132px;
  height: 42px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.settings-action-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.playlist-type-options {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 0;
}

#view-playlist-type .apple-group-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.apple-settings-row.playlist-type-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  height: auto !important;
  min-height: 64px !important;
  padding: 16px 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  color: #fff !important;
  cursor: pointer !important;
  border-radius: 14px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  flex-direction: row !important;
  text-align: left !important;
  box-sizing: border-box !important;
}

.apple-settings-row.playlist-type-card:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  transform: translateX(3px) !important;
}

.apple-settings-row.playlist-type-card.selected {
  background: rgba(135, 106, 255, 0.16) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 24px rgba(135, 106, 255, 0.25) !important;
  transform: none !important;
}

.apple-settings-row.playlist-type-card.selected::after {
  display: none !important;
}

.apple-settings-row.playlist-type-card .apple-row-left {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

.apple-settings-row.playlist-type-card .apple-row-icon-wrap {
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: rgba(135, 106, 255, 0.14) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

.apple-settings-row.playlist-type-card .apple-row-icon-wrap .icon {
  width: 20px !important;
  height: 20px !important;
  color: var(--accent) !important;
}

.apple-settings-row.playlist-type-card .apple-row-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #fff !important;
  display: block !important;
}

.apple-settings-row.playlist-type-card .apple-row-subtitle {
  font-size: 12.5px !important;
  color: #888899 !important;
  display: block !important;
  margin-top: 2px !important;
}

.apple-settings-row.playlist-type-card .icon-chevron {
  width: 18px !important;
  height: 18px !important;
  color: #71717a !important;
  transition: transform 0.15s ease, color 0.15s ease !important;
}

.apple-settings-row.playlist-type-card:hover .icon-chevron,
.apple-settings-row.playlist-type-card.selected .icon-chevron {
  color: #fff !important;
  transform: translateX(3px) !important;
}

.settings-rows-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 96px;
  width: 100%;
  padding: 0 6px;
  align-content: center;
}

.settings-list-page .settings-sub-header {
  margin-bottom: 36px;
}

.settings-list-page .settings-rows-grid {
  max-width: 1040px;
  padding-left: 10px;
}

.settings-rows-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.parental-page {
  max-width: 560px;
}

.parental-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
}

.parental-list {
  width: 100%;
  max-width: 520px;
  gap: 0;
}

.settings-row-plain {
  grid-template-columns: 30px minmax(0, 1fr);
}

.age-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.settings-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

button.settings-row:hover {
  opacity: 0.88;
}

.settings-row-ico {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
}

.settings-row-label {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  line-height: 1.3;
}

.settings-row-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(170, 178, 198, 0.82);
  white-space: nowrap;
  margin-left: auto;
}

.settings-row-value > span {
  color: rgba(170, 178, 198, 0.82);
}

.settings-row-value .icon, .settings-row-value .lucide {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.45);
}

.settings-row:not(button) {
  cursor: default;
}

.zen-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;
  margin-left: auto;
}

.zen-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.zen-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.18s ease;
}

.zen-toggle span::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.zen-toggle input:checked + span {
  background: rgba(255, 255, 255, 0.22);
}

.zen-toggle input:checked + span::before {
  transform: translateX(18px);
}

.legal-page {
  max-width: 560px;
}

.legal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
}

.legal-block {
  margin: 0 0 64px;
}

.legal-block h2 {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.legal-version {
  font-size: 14px;
  font-weight: 400;
  color: rgba(188, 194, 210, 0.78);
  margin-bottom: 18px;
}

.legal-copy {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(148, 156, 176, 0.72);
  max-width: 480px;
}

.legal-links {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.legal-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.legal-link:hover {
  opacity: 0.82;
}

.language-page {
  padding-top: 24px;
}

.language-header {
  margin-bottom: 28px;
  padding-left: 10px;
}

.language-header .settings-sub-titles h1 {
  font-size: 22px;
  font-weight: 700;
}

.language-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  padding: 0 10px;
  overflow: auto;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(8, auto);
  grid-auto-flow: column;
  gap: 4px 80px;
  width: 100%;
  max-width: 1020px;
}

.language-item,
.create-profile-lang-item {
  border: 0;
  background: transparent;
  color: rgba(230, 232, 240, 0.9);
  font-family: var(--font-ui);
  font-size: 14px;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--zen-field-radius);
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.language-item:hover:not(.selected),
.create-profile-lang-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.language-item.selected,
.create-profile-lang-item.selected {
  background: var(--accent-soft);
  color: #fff;
  font-weight: 600;
}

.language-item.is-disabled {
  color: rgba(230, 232, 240, 0.42);
  cursor: not-allowed;
}

.language-footer {
  padding: 24px 10px 4px;
}

.language-page .settings-action-btn {
  min-width: 148px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.hidden {
  display: none !important;
}

/* Compact/tablet layout */
@media (max-width: 1200px) {
  .live-header {
    padding-inline: 14px;
  }
}

/* Mobile-ish */
@media (max-width: 900px) {
  #setup:not(.hidden) {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px max(14px, env(safe-area-inset-right)) 40px max(14px, env(safe-area-inset-left));
  }

  .setup-wrap {
    margin: 0 auto;
    width: 100%;
  }

  .setup-hero {
    margin-top: 4px;
  }

  .setup-shell {
    width: 100%;
    box-sizing: border-box;
  }

  #app {
    padding: 0;
  }
  .top-bar {
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .top-bar::-webkit-scrollbar {
    display: none;
  }
  .top-bar > div:last-child {
    display: none;
  }
  .top-bar .segmented {
    flex: 0 0 auto;
  }
  .top-bar .segmented button {
    padding-inline: 11px;
    font-size: 12px;
  }
  .home-hero {
    min-height: 330px;
    margin: 0 -16px 24px;
  }
  .home-hero-content {
    width: 100%;
    padding: 78px 20px 38px;
  }
  .home-hero-scrim {
    background:
      linear-gradient(90deg, rgba(8, 9, 14, 0.92), rgba(8, 9, 14, 0.26)),
      linear-gradient(0deg, rgba(8, 9, 14, 0.98), transparent 62%);
  }
  .home-hero h1 {
    max-width: 420px;
    font-size: clamp(30px, 9vw, 46px);
  }
  .app-shell {
    width: 100%;
    height: 100%;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .sidebar {
    order: 2;
    flex-direction: row;
    justify-content: space-around;
    padding: 8px 10px;
    border-right: 0;
    border-top: 1px solid var(--border);
  }
  .sidebar .logo,
  .sidebar .spacer,
  .nav-btn[data-nav="replay"],
  .profile-switch-wrap {
    display: none;
  }
  .nav-btn[data-nav="settings"] {
    display: grid;
  }
  .nav-btn[data-nav="profiles"] {
    display: none;
  }
  .nav-btn {
    width: 48px;
    height: 48px;
  }
  .live-header {
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 16px 10px !important;
    height: auto !important;
    min-height: auto !important;
    gap: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    background: transparent !important;
  }
  .live-header #live-source-pill,
  .live-header #live-view-tabs,
  .live-header .source-pill,
  .live-header .segmented {
    display: none !important;
  }
  .live-header .live-top-menu-search {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex: 1 1 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    padding: 0 14px !important;
    gap: 10px !important;
    align-items: center !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.2s ease !important;
  }
  .live-header .live-top-menu-search:focus-within {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(135, 106, 255, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(109, 74, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  }
  .live-header .live-top-menu-search .icon,
  .live-header .live-top-menu-search .lucide {
    width: 16px !important;
    height: 16px !important;
    color: rgba(255, 255, 255, 0.45) !important;
    flex-shrink: 0 !important;
  }
  .live-header .live-top-menu-search:focus-within .icon,
  .live-header .live-top-menu-search:focus-within .lucide {
    color: #876aff !important;
  }
  .live-header .top-menu-search-input {
    flex: 1 !important;
    width: 100% !important;
    height: 100% !important;
    font-size: 14px !important;
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
  }
  .live-header .top-menu-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 14px !important;
  }
  .live-header .epg-date-picker {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
  .live-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: hidden;
  }
  .live-shell.epg-mode {
    grid-template-columns: 1fr;
  }
  .live-cats {
    grid-column: 1;
    grid-row: 1;
  }
  .live-main {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  .live-epg {
    grid-column: 1;
    grid-row: 2;
  }
  .live-cats {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px;
  }
  .live-channels {
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    flex: 1 1 auto;
    order: 2 !important;
  }
  .live-preview {
    min-height: clamp(190px, 30vh, 250px) !important;
    height: clamp(190px, 30vh, 250px) !important;
    flex: 0 0 clamp(190px, 30vh, 250px) !important;
    order: 1 !important;
    border-top: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    box-shadow:
      0 14px 32px rgba(0, 0, 0, 0.7),
      inset 0 18px 24px rgba(5, 6, 12, 0.58),
      inset 0 1px 0 rgba(var(--accent-rgb), 0.08);
  }
  .live-preview::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 78px;
    background: linear-gradient(
      0deg,
      rgba(5, 6, 12, 0.92) 0%,
      rgba(5, 6, 12, 0.58) 34%,
      rgba(5, 6, 12, 0) 100%
    );
    pointer-events: none;
    z-index: 1;
  }
  .live-now-title {
    font-size: 20px;
  }
  .live-player-info h2 {
    font-size: 18px;
  }
  .live-player-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .live-player-actions {
    justify-self: center;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* Detail pages: keep the cinematic backdrop while preserving reading contrast. */
.detail-hero {
  background-position: 68% center;
}

.detail-hero::before {
  background:
    linear-gradient(90deg, rgba(8, 9, 14, 0.98) 0%, rgba(8, 9, 14, 0.86) 38%, rgba(8, 9, 14, 0.52) 70%, rgba(8, 9, 14, 0.76) 100%),
    linear-gradient(180deg, rgba(8, 9, 14, 0.18), rgba(8, 9, 14, 0.4));
}

.detail-content {
  width: min(780px, calc(100% - 72px));
  max-width: none;
}

.detail-title {
  max-width: 620px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
}

.detail-content .actions .btn {
  min-height: 46px;
}

/* Shared control language: action buttons and form fields use one rhythm. */
.btn,
.settings-action-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  line-height: 1;
}

.field input,
.field select,
.pin-input {
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
}

.search-bar {
  min-height: 52px;
}

.movie-filters select {
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: 12px;
}

.field input:focus,
.field select:focus,
.pin-input:focus,
.search-bar:focus-within {
  border-color: var(--zen-field-focus);
  box-shadow: 0 0 0 3px rgba(157, 141, 255, 0.12);
}

.cast-item {
  padding: 6px 10px 6px 6px;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.cast-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.cast-item img,
.cast-avatar-fallback {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.cast-avatar-fallback {
  place-items: center;
  background: linear-gradient(135deg, #7564e8, #25283a);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.detail-content .card-h {
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.detail-content .card-h:focus-visible,
.detail-content .card-h:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.48), 0 0 0 3px rgba(157, 141, 255, 0.18);
}

@media (max-width: 700px) {
  .detail-hero {
    background-position: 64% top;
  }

  .detail-content {
    width: auto;
    padding: 78px 20px 30px;
  }

  .detail-title {
    font-size: 30px;
  }

  .detail-content .actions {
    flex-wrap: wrap;
    margin-bottom: 22px;
  }

  .detail-content .actions .btn {
    flex: 1 1 145px;
    justify-content: center;
  }
}

/* ── Netflix theme polish ── */
.lucide,
.icon .lucide {
  stroke-width: 2;
}

.shell {
  background: var(--bg-deep);
}

.zen-page__title,
.create-profile-inner h1 {
  font-weight: 700;
  letter-spacing: normal;
}

.profile-picker-actions .zen-link-btn {
  color: var(--text-dim);
  font-size: 14px;
}

.profile-picker-actions .zen-link-btn:hover {
  color: #fff;
}

.profile-picker-item span,
.profile-picker-slot > span {
  color: #808080;
  font-size: 14px;
  margin-top: 8px;
}

.profile-picker-item:hover span {
  color: #fff;
}

.card-h:hover {
  transform: scale(1.04);
  z-index: 2;
}

.live-cat.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.settings-row:hover,
.settings-row:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.settings-row-value,
.settings-chevron {
  color: var(--text-dim);
}

/* ── Netflix "Who's Watching?" Screen ──────────────────────── */
.netflix-whos-watching-view {
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  background: radial-gradient(circle at center, #1b1b26 0%, #0e0e14 100%);
  user-select: none;
}

#view-profiles.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.netflix-profiles-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  padding: 40px 24px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.netflix-whos-watching-title {
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 38px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.netflix-profiles-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 50px;
}

.netflix-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.33, 1, 0.68, 1);
}

.netflix-profile-avatar-box {
  width: clamp(110px, 12vw, 145px);
  height: clamp(110px, 12vw, 145px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  position: relative;
  box-sizing: border-box;
  border: 3.5px solid transparent;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

/* Netflix Avatar Color Themes */
.netflix-profile-avatar-box.blue {
  background: linear-gradient(135deg, #1f75fe 0%, #084298 100%);
}
.netflix-profile-avatar-box.pink,
.netflix-profile-avatar-box.red {
  background: linear-gradient(135deg, #9d8dff 0%, #6f57ef 100%);
}
.netflix-profile-avatar-box.green {
  background: linear-gradient(135deg, #2ecc71 0%, #196f3d 100%);
}
.netflix-profile-avatar-box.purple {
  background: linear-gradient(135deg, #9b59b6 0%, #5b2c6f 100%);
}
.netflix-profile-avatar-box.orange {
  background: linear-gradient(135deg, #e67e22 0%, #a04000 100%);
}
.netflix-profile-avatar-box.yellow {
  background: linear-gradient(135deg, #f39c12 0%, #b9770e 100%);
}

.netflix-profile-card:hover .netflix-profile-avatar-box,
.netflix-profile-card:focus-visible .netflix-profile-avatar-box {
  border-color: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  transform: scale(1.06);
}

.netflix-profile-avatar-box.active-profile {
  border-color: rgba(135, 106, 255, 0.85);
}

.netflix-profile-avatar-box.active-profile::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.netflix-profile-card-add .netflix-profile-avatar-box {
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.45);
}

.netflix-profile-card-add:hover .netflix-profile-avatar-box {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  color: #ffffff;
}

.netflix-profile-card-add .icon,
.netflix-profile-card-add .lucide {
  width: 44px;
  height: 44px;
}

.netflix-profile-name {
  font-size: 16px;
  font-weight: 500;
  color: #808080;
  letter-spacing: 0.01em;
  transition: color 0.18s ease;
}

.netflix-profile-card:hover .netflix-profile-name,
.netflix-profile-card:focus-visible .netflix-profile-name {
  color: #ffffff;
}

/* Edit Overlay in Manage Profiles Mode */
.netflix-profile-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.is-managing-profiles .netflix-profile-edit-overlay {
  opacity: 1;
}

.netflix-profile-edit-overlay .icon,
.netflix-profile-edit-overlay .lucide {
  width: 32px;
  height: 32px;
}


/* Manage Profiles Button */
.netflix-manage-profiles-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #808080;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 11px 32px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.netflix-manage-profiles-btn:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.netflix-manage-profiles-btn.active-done {
  background: #ffffff;
  color: #141414;
  border-color: #ffffff;
}

/* ── Netflix Add / Edit Profile Page ───────────────────────── */
.netflix-profile-modal-page {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1b1b26 0%, #0e0e14 100%);
  padding: 24px;
}

.netflix-profile-modal-page.hidden {
  display: none !important;
}

.netflix-create-profile-container {
  width: 100%;
  max-width: 580px;
  background: transparent;
  text-align: left;
  animation: fadeIn 0.28s ease;
}

.netflix-create-profile-title {
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin-bottom: 6px;
}

.netflix-create-profile-subtitle {
  font-size: 15px;
  color: #808080;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 16px;
}

.netflix-create-profile-body {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 36px;
}

.netflix-create-profile-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.netflix-create-avatar-btn {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 8px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.netflix-create-avatar-preview {
  width: 110px !important;
  height: 110px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  border: 3.5px solid transparent !important;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.33, 1, 0.68, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.netflix-create-avatar-btn:hover .netflix-create-avatar-preview,
.netflix-create-avatar-btn:focus-visible .netflix-create-avatar-preview {
  transform: scale(1.06);
  border-color: #ffffff !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.netflix-face-svg {
  width: 80%;
  height: 80%;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.netflix-create-avatar-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #12131a;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #141414;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.netflix-create-avatar-badge .icon,
.netflix-create-avatar-badge .lucide {
  width: 15px;
  height: 15px;
}

.netflix-create-avatar-hint {
  font-size: 13px;
  color: #808080;
}

.netflix-create-profile-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.netflix-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.netflix-field-label {
  font-size: 13px;
  font-weight: 500;
  color: #808080;
}

.netflix-profile-input {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0 14px;
  font-size: 15px;
  color: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.netflix-profile-input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.netflix-select-btn {
  width: 100%;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0 14px;
  font-size: 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.netflix-select-btn:hover,
.netflix-select-btn:focus-visible {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.netflix-create-profile-kids-row {
  margin-top: 6px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.netflix-kids-toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.netflix-kids-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}

.netflix-kids-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.netflix-kids-text strong {
  font-size: 14px;
  color: #ffffff;
}

.netflix-kids-text small {
  font-size: 12px;
  color: #808080;
}

.netflix-create-profile-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
}

.btn-netflix-submit {
  background: linear-gradient(135deg, #9d8dff, #876aff 55%, #6f57ef);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 12px 32px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}

.btn-netflix-submit:hover {
  background: #c11119;
  transform: scale(1.02);
}

.btn-netflix-cancel {
  background: transparent;
  color: #808080;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 11px 28px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.btn-netflix-cancel:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.btn-netflix-delete {
  background: transparent;
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.45);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 11px 24px;
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.18s ease;
}

.btn-netflix-delete:hover {
  background: rgba(255, 69, 58, 0.15);
  border-color: #ff453a;
  color: #ff6961;
}

.btn-netflix-delete.hidden {
  display: none !important;
}

/* ── Apple / Netflix Grade Multiscreens ────────────────────── */
.netflix-multiscreen-view {
  padding: 0;
  background: #08090e;
  height: 100%;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#view-multiscreens.active,
.netflix-multiscreen-view.active {
  display: flex !important;
}

.multiscreen-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(14, 16, 26, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 10;
}

.multiscreen-tabs.segmented {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  box-sizing: border-box !important;
}

.multiscreen-tabs .ms-card {
  height: 30px !important;
  min-height: 30px !important;
  line-height: 30px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: none !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  outline: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  transition: all 0.18s ease !important;
}

.multiscreen-tabs .ms-card:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.multiscreen-tabs .ms-card.selected {
  background: #6d4aff !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.multiscreen-top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.multiscreen-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(135, 106, 255, 0.12);
  border: 1px solid rgba(135, 106, 255, 0.28);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.multiscreen-live-pill .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3b5c;
  box-shadow: 0 0 8px #ff3b5c;
  animation: msPulse 1.5s infinite;
}

@keyframes msPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.multiscreen-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 24px 24px;
  min-height: 0;
  box-sizing: border-box;
}

.multiscreen-preview {
  flex: 1;
  display: grid;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.multiscreen-preview[data-ms-count="2"],
.multiscreen-preview:has(> :nth-child(2):last-child) {
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr !important;
}
.multiscreen-preview[data-ms-count="2"] > :nth-child(1),
.multiscreen-preview:has(> :nth-child(2):last-child) > :nth-child(1) {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
.multiscreen-preview[data-ms-count="2"] > :nth-child(2),
.multiscreen-preview:has(> :nth-child(2):last-child) > :nth-child(2) {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

.multiscreen-preview[data-ms-count="3"],
.multiscreen-preview:has(> :nth-child(3):last-child) {
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr 1fr !important;
}
.multiscreen-preview[data-ms-count="3"] > :nth-child(1),
.multiscreen-preview:has(> :nth-child(3):last-child) > :nth-child(1) {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
}
.multiscreen-preview[data-ms-count="3"] > :nth-child(2),
.multiscreen-preview:has(> :nth-child(3):last-child) > :nth-child(2) {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
.multiscreen-preview[data-ms-count="3"] > :nth-child(3),
.multiscreen-preview:has(> :nth-child(3):last-child) > :nth-child(3) {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

.multiscreen-preview[data-ms-count="4"],
.multiscreen-preview:has(> :nth-child(4):last-child) {
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: 1fr 1fr !important;
}
.multiscreen-preview[data-ms-count="4"] > :nth-child(1),
.multiscreen-preview:has(> :nth-child(4):last-child) > :nth-child(1) {
  grid-column: 1 !important;
  grid-row: 1 !important;
}
.multiscreen-preview[data-ms-count="4"] > :nth-child(2),
.multiscreen-preview:has(> :nth-child(4):last-child) > :nth-child(2) {
  grid-column: 2 !important;
  grid-row: 1 !important;
}
.multiscreen-preview[data-ms-count="4"] > :nth-child(3),
.multiscreen-preview:has(> :nth-child(4):last-child) > :nth-child(3) {
  grid-column: 1 !important;
  grid-row: 2 !important;
}
.multiscreen-preview[data-ms-count="4"] > :nth-child(4),
.multiscreen-preview:has(> :nth-child(4):last-child) > :nth-child(4) {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

.multiscreen-live-pane {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #05060a;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.multiscreen-live-pane:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.multiscreen-live-pane.is-focused {
  border-color: #876aff !important;
  box-shadow: 0 0 24px rgba(135, 106, 255, 0.4), 0 8px 30px rgba(0, 0, 0, 0.7) !important;
}

.multiscreen-live-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}

.ms-pane-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 13, 0.45);
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.2s ease;
}

.ms-spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #876aff;
  border-radius: 50%;
  animation: msSpin 0.8s linear infinite;
}

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

.ms-pane-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.multiscreen-live-pane:hover .ms-pane-top-bar,
.multiscreen-live-pane.is-focused .ms-pane-top-bar {
  opacity: 1;
}

.ms-pane-channel-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.ms-pane-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ms-pane-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 17, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ms-pane-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.08);
}

.ms-pane-btn.active {
  background: #6d4aff !important;
  border-color: #876aff !important;
  box-shadow: 0 0 12px rgba(109, 74, 255, 0.55);
}

.ms-pane-btn .icon {
  width: 15px;
  height: 15px;
}

.ms-pane-focus-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.multiscreen-live-pane:hover:not(.is-focused) .ms-pane-focus-hint {
  opacity: 1;
}



/* ── Standby Card (Single-Connection Safe Mode) ─────────────── */
.ms-standby-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(28, 20, 54, 0.94) 0%, rgba(8, 9, 15, 0.98) 100%);
  gap: 10px;
  z-index: 2;
  cursor: pointer;
  transition: all 0.22s ease;
  padding: 16px;
  text-align: center;
}

.multiscreen-live-pane:hover .ms-standby-card {
  background: radial-gradient(circle at center, rgba(38, 28, 74, 0.96) 0%, rgba(10, 11, 20, 0.99) 100%);
}

.ms-standby-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #a78bfa;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.ms-standby-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ms-standby-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-standby-prog {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 85%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-standby-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  background: rgba(135, 106, 255, 0.16);
  border: 1px solid rgba(135, 106, 255, 0.35);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.multiscreen-live-pane:hover .ms-standby-pill {
  background: #876aff;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(135, 106, 255, 0.5);
}

/* ── Empty MultiScreen Slot ────────────────────────────────── */
.multiscreen-live-pane.is-empty {
  background: rgba(255, 255, 255, 0.02) !important;
  border: 2px dashed rgba(255, 255, 255, 0.12) !important;
  cursor: pointer;
}

.multiscreen-live-pane.is-empty:hover {
  background: rgba(109, 74, 255, 0.06) !important;
  border-color: rgba(135, 106, 255, 0.45) !important;
  transform: translateY(-2px);
}

.ms-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.ms-empty-add-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(109, 74, 255, 0.18);
  border: 1.5px solid rgba(135, 106, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(109, 74, 255, 0.25);
}

.multiscreen-live-pane.is-empty:hover .ms-empty-add-btn {
  background: #6d4aff;
  transform: scale(1.12);
  box-shadow: 0 0 24px rgba(109, 74, 255, 0.6);
}

.ms-empty-add-btn .icon {
  width: 24px;
  height: 24px;
}

.ms-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.ms-empty-sub {
  font-size: 12.5px;
  font-weight: 500;
  color: #a0a0b0;
}

/* ── MultiScreen Channel Picker Modal ──────────────────────── */
.ms-picker-card {
  max-width: 520px !important;
  width: 90% !important;
  max-height: 80vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
}

.ms-picker-card .pqs-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 22px 14px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.ms-picker-card .pqs-modal-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  text-align: left !important;
}

.ms-picker-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  flex: 1;
}

.ms-picker-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
}

.ms-picker-search-bar .icon {
  width: 18px;
  height: 18px;
  color: #71717a;
  flex-shrink: 0;
}

.ms-picker-search-bar input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  width: 100%;
  outline: none;
}

.ms-picker-categories {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.ms-picker-categories::-webkit-scrollbar {
  display: none;
}

.ms-picker-cat-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ms-picker-cat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ms-picker-cat-btn.active {
  background: #6d4aff;
  color: #fff;
}

.ms-picker-channel-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 380px;
  padding-right: 4px;
}

.ms-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
  color: #fff;
}

.ms-picker-item:hover {
  background: rgba(109, 74, 255, 0.15);
  border-color: rgba(135, 106, 255, 0.35);
  transform: translateX(3px);
}

.ms-picker-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ms-picker-item-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.ms-picker-item-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ms-picker-item-name {
  font-size: 13.5px;
  font-weight: 600;
}

.ms-picker-item-cat {
  font-size: 11px;
  color: #71717a;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ── Apple-Grade Player Settings ───────────────────────────── */
.netflix-player-settings-view {
  padding: 0;
  background: #0e0e14;
  height: 100%;
  display: none;
  overflow-y: auto;
}

#view-player.active,
.netflix-player-settings-view.active {
  display: block !important;
}

.apple-settings-container {
  max-width: 1080px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 22px 24px 60px;
  animation: fadeIn 0.25s ease;
}

.apple-settings-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.apple-settings-page-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
  text-align: center;
}

.apple-settings-top-spacer {
  width: 100px;
}

.apple-settings-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.apple-settings-group {
  display: flex;
  flex-direction: column;
}

.apple-group-label {
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  padding-left: 12px;
}

.apple-group-card {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
}

.apple-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: #ffffff;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: background 0.15s ease;
}

.apple-settings-row:last-child {
  border-bottom: none;
}

.apple-settings-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.apple-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
}

.apple-row-left .icon,
.apple-row-left .lucide {
  width: 18px;
  height: 18px;
  color: #a0a0b0;
}

.apple-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.apple-row-value {
  font-size: 14px;
  color: #888899;
}

.apple-row-right .icon-chevron {
  width: 15px;
  height: 15px;
  color: #52525b;
}

.apple-settings-row:hover .icon-chevron {
  color: #ffffff;
  transform: translateX(2px);
}

/* ── Apple-Grade Settings Views ────────────────────────────── */
.netflix-account-view,
.netflix-sources-view,
.netflix-playlist-type-view,
.netflix-language-view,
.netflix-support-view,
.netflix-legal-view,
.netflix-parental-view,
.netflix-notifications-view,
.netflix-downloads-view,
.netflix-recordings-view,
.netflix-analytics-view,
.netflix-admin-view {
  padding: 0;
  background: #0e0e14;
  height: 100%;
  display: none;
  overflow-y: auto;
}

#view-account.active,
.netflix-account-view.active,
#view-sources.active,
.netflix-sources-view.active,
#view-playlist-type.active,
.netflix-playlist-type-view.active,
#view-language.active,
.netflix-language-view.active,
#view-support.active,
.netflix-support-view.active,
#view-legal.active,
.netflix-legal-view.active,
#view-parental.active,
.netflix-parental-view.active,
#view-notifications.active,
.netflix-notifications-view.active,
#view-downloads.active,
.netflix-downloads-view.active,
#view-recordings.active,
.netflix-recordings-view.active,
#view-analytics.active,
.netflix-analytics-view.active,
#view-admin.active,
.netflix-admin-view.active {
  display: block !important;
}

/* Group Card List Items */
.apple-group-card .notification-list,
.apple-group-card .download-list,
.apple-group-card .recording-list,
.apple-group-card .source-manager-list {
  display: flex;
  flex-direction: column;
}

.apple-group-card .notification-item,
.apple-group-card .download-item,
.apple-group-card .recording-item,
.apple-group-card .source-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #ffffff;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  border-radius: 0;
}

.apple-group-card .notification-item:last-child,
.apple-group-card .download-item:last-child,
.apple-group-card .recording-item:last-child,
.apple-group-card .source-card:last-child {
  border-bottom: none;
}

.apple-group-card .notification-item:hover,
.apple-group-card .download-item:hover,
.apple-group-card .recording-item:hover,
.apple-group-card .source-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.apple-group-card .empty-state {
  padding: 32px 20px;
  text-align: center;
  color: #888899;
}

/* ── Notifications View & Items ── */
.apple-group-card .notification-item {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.apple-group-card .notification-item.is-unread {
  background: rgba(135, 106, 255, 0.04);
}

.apple-group-card .notification-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.apple-group-card .notification-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(135, 106, 255, 0.12);
  color: #876aff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.apple-group-card .notification-item:hover .notification-icon {
  transform: scale(1.04);
}

.apple-group-card .notification-item.is-unread .notification-icon {
  background: rgba(135, 106, 255, 0.22);
  color: #a794ff;
}

.apple-group-card .notification-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.apple-group-card .notification-copy strong {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apple-group-card .notification-copy span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apple-group-card .notification-copy small {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 1px;
}

.apple-group-card .unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #876aff;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(135, 106, 255, 0.6);
  margin: 0 4px;
}

.notif-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
  padding: 0;
  margin-left: 6px;
}

.notif-delete-btn:hover {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
  transform: scale(1.08);
}

.notif-delete-btn:active {
  transform: scale(0.95);
}

.notif-delete-btn i,
.notif-delete-btn svg {
  width: 15px;
  height: 15px;
}

#notifications-read-all.is-disabled,
#notifications-clear.is-disabled {
  opacity: 0.4 !important;
  pointer-events: none !important;
  cursor: default !important;
}

.notif-detail-modal-card {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  background: rgba(26, 26, 32, 0.94);
}

/* ── Recording Items & Actions ── */
.recording-item.is-recording-now {
  background: rgba(229, 9, 20, 0.08) !important;
  border-bottom: 1px solid rgba(229, 9, 20, 0.3) !important;
}

.recording-icon.rec-icon-live {
  background: rgba(229, 9, 20, 0.25) !important;
  color: #ff3344 !important;
  border-radius: 50% !important;
  animation: recDotBlink 1.2s infinite alternate;
}

.apple-group-card .recording-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.apple-group-card .recording-copy strong {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apple-group-card .recording-copy small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apple-group-card .recording-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.apple-group-card .recording-actions .text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apple-group-card .recording-actions .text-button .icon {
  width: 14px;
  height: 14px;
}

.apple-group-card .recording-actions .text-button:hover,
.apple-group-card .recording-actions .text-button:focus-visible,
.tv-remote-active .apple-group-card .recording-actions .text-button:focus {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  outline: none;
  transform: translateY(-1px);
}

.apple-group-card .recording-actions .text-button.rec-play-btn {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: #ffffff;
}

.apple-group-card .recording-actions .text-button.rec-play-btn:hover,
.tv-remote-active .apple-group-card .recording-actions .text-button.rec-play-btn:focus {
  background: rgba(var(--accent-rgb), 0.35);
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.35);
}

.apple-group-card .recording-actions .text-button.rec-download-btn {
  background: rgba(52, 199, 89, 0.15);
  border-color: rgba(52, 199, 89, 0.35);
  color: #34c759;
}

.apple-group-card .recording-actions .text-button.rec-download-btn:hover,
.tv-remote-active .apple-group-card .recording-actions .text-button.rec-download-btn:focus {
  background: rgba(52, 199, 89, 0.25);
  border-color: rgba(52, 199, 89, 0.6);
  box-shadow: 0 0 12px rgba(52, 199, 89, 0.3);
}

.apple-group-card .recording-actions .text-button.danger {
  color: #ff6b6b;
  border-color: rgba(255, 77, 79, 0.25);
  background: rgba(255, 77, 79, 0.08);
}

.apple-group-card .recording-actions .text-button.danger:hover,
.tv-remote-active .apple-group-card .recording-actions .text-button.danger:focus {
  background: rgba(255, 77, 79, 0.2);
  border-color: rgba(255, 77, 79, 0.5);
  box-shadow: 0 0 12px rgba(255, 77, 79, 0.3);
}

.tv-remote-active :focus {
  outline: 3px solid var(--accent) !important;
  outline-offset: 3px !important;
}

.language-card-container {
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border: none !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.apple-language-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.apple-lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  color: #ffffff;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

.apple-lang-row:last-child {
  border-bottom: none;
}

.apple-lang-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.apple-lang-row.selected {
  background: rgba(135, 106, 255, 0.12);
}

.apple-lang-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apple-lang-native {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.apple-lang-native.is-arabic {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.apple-lang-sub {
  font-size: 12.5px;
  color: #8e8e9a;
  font-weight: 400;
}

.apple-lang-row.selected .apple-lang-sub {
  color: #a1a1aa;
}

.apple-lang-right {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.apple-lang-check {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.apple-group-card .analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.apple-group-card .admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

/* ── In-Player Quick Settings Modal (Minimal Glassmorphic, Borderless) ── */
.player-quick-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-quick-settings-modal.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}

.player-quick-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.player-quick-settings-card {
  position: relative;
  width: 92%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(14, 14, 20, 0.85);
  border: none;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
  border-radius: 20px;
  padding: 14px 20px 22px;
  box-sizing: border-box;
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  animation: pqsCardPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@keyframes pqsCardPop {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.pqs-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
}

.pqs-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.pqs-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}

.pqs-close-btn .icon {
  width: 16px;
  height: 16px;
}

.pqs-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pqs-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.pqs-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-left: 4px;
}

.pqs-group-box {
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 14px;
  overflow: hidden;
}

.pqs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pqs-row:last-child {
  border-bottom: none;
}

.pqs-row-left {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #efeff1;
  font-size: 13.5px;
  font-weight: 500;
}

.pqs-row-left .icon {
  width: 16px;
  height: 16px;
  color: #9ca3af;
  flex-shrink: 0;
}

.pqs-segmented {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}

.pqs-seg-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pqs-seg-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pqs-seg-btn.active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 2px 10px rgba(135, 106, 255, 0.45);
}

/* ═══════════════════════════════════════════════════════════════════
   UNIFIED SYSTEM THEME: Splash Background, Form Inputs & Buttons
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Unified Background (Matching Splash Screen) ── */
body,
#app,
.splash,
.main,
.view,
.zen-page,
#setup,
#profile-picker,
#create-profile,
.netflix-settings-view {
  background: var(--zen-page-bg) !important;
  background-attachment: fixed !important;
}

.apple-settings-container {
  background: transparent !important;
}

#view-home,
#view-movies,
#view-series,
#view-live,
#view-sports,
#view-replay,
#view-settings,
#view-player,
#view-support,
#view-legal,
#view-parental,
.netflix-parental-view,
#view-notifications,
#view-downloads,
#view-recordings,
#view-account,
#view-sources,
#view-playlist-type,
#view-language,
#view-analytics,
#view-admin,
#view-multiscreens,
.view {
  background: transparent !important;
}

.setup-nav-bar {
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 480px !important;
  margin: 0 auto 12px !important;
}

/* ── 2. Unified Inputs (Matching "Votre IPTV" / Setup Form) ── */
.field input,
.field select,
.field textarea,
.zen-field,
.zen-input,
.apple-settings-row input:not([type="checkbox"]):not([type="radio"]),
.apple-settings-row select,
.apple-settings-row textarea,
.modal-field input:not([type="checkbox"]):not([type="radio"]),
.modal-field select,
.modal-field textarea,
.source-input,
.netflix-profile-input,
.parental-pin-input,
.setup-wrap input,
.setup-wrap select {
  font-family: var(--font-ui) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background: var(--zen-field-bg) !important;
  border: 1px solid var(--zen-field-border) !important;
  border-radius: var(--zen-field-radius) !important;
  padding: 12px 14px !important;
  min-height: var(--zen-field-height) !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}

.apple-settings-row select {
  min-width: 140px;
}

/* ── Seamless Pill Search Inputs ── */
.top-menu-search-input,
.search-bar input,
.top-menu-search input,
.search-box input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  min-height: unset !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  line-height: 1.2 !important;
  outline: none !important;
}

.top-menu-search-input:focus,
.search-bar input:focus,
.top-menu-search input:focus,
.search-box input:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.field input::placeholder,
.field textarea::placeholder,
.apple-settings-row input::placeholder,
.modal-field input::placeholder {
  color: var(--text-mute) !important;
  opacity: 1 !important;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.zen-field:focus-within,
.apple-settings-row input:focus,
.modal-field input:focus {
  border-color: var(--zen-field-focus) !important;
  box-shadow: 0 0 0 3px rgba(157, 141, 255, 0.18) !important;
  background: #282a38 !important;
}

select {
  appearance: none !important;
  background:
    linear-gradient(45deg, transparent 50%, var(--text-dim) 50%) calc(100% - 20px) 21px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%) calc(100% - 15px) 21px / 6px 6px no-repeat,
    var(--zen-field-bg) !important;
  padding-right: 42px !important;
  cursor: pointer !important;
}

select option {
  background: #1a1c26 !important;
  color: #ffffff !important;
}

/* ── 3. Unified Buttons (Matching "Votre IPTV" / Setup Form) ── */
.btn-primary,
.btn-submit,
.netflix-create-profile-save,
#create-profile-submit,
#sources-add-btn,
.apple-settings-btn-primary {
  font-family: var(--font-ui) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: 0.01em !important;
  min-height: 46px !important;
  padding: 12px 22px !important;
  border-radius: 6px !important;
  border: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: linear-gradient(135deg, #9d8dff, #876aff 55%, #6f57ef) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(135, 106, 255, 0.32) !important;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease !important;
}

.btn-primary:hover,
.btn-submit:hover,
.netflix-create-profile-save:hover,
#create-profile-submit:hover,
#sources-add-btn:hover,
.apple-settings-btn-primary:hover {
  filter: brightness(1.08) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 28px rgba(135, 106, 255, 0.42) !important;
}

.btn-primary:active,
.btn-submit:active,
.netflix-create-profile-save:active {
  transform: translateY(0) !important;
  filter: brightness(0.98) !important;
}

.btn-ghost,
.btn-secondary,
.netflix-create-profile-cancel,
#create-profile-cancel,
.apple-settings-btn-secondary {
  font-family: var(--font-ui) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  min-height: 46px !important;
  padding: 12px 20px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease !important;
}

.btn-ghost:hover,
.btn-secondary:hover,
.netflix-create-profile-cancel:hover,
#btn-m3u-only:hover,
#create-profile-cancel:hover,
.apple-settings-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  transform: translateY(-1px) !important;
}

/* ── Netflix-Style Expandable Volume Slider ── */
.player-volume-group {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 2px 4px;
  border-radius: 999px;
  transition: background 0.18s ease;
}

.player-volume-group:hover,
.player-volume-group.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.player-volume-slider-wrap {
  width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease, margin 0.18s ease;
  margin-left: 0;
}

.player-volume-group:hover .player-volume-slider-wrap,
.player-volume-group:focus-within .player-volume-slider-wrap,
.player-volume-group.is-active .player-volume-slider-wrap {
  width: 92px;
  max-width: 92px;
  opacity: 1;
  pointer-events: auto;
  margin-left: 6px;
  margin-right: 8px;
}

.player-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  min-height: 6px;
  border-radius: 9999px;
  outline: none;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  box-shadow: none;
  touch-action: none;
  background: rgba(255, 255, 255, 0.25);
}

.player-volume-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 9999px;
  background: transparent;
}

.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  margin-top: -4px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.player-volume-slider:hover::-webkit-slider-thumb,
.player-volume-slider:active::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(135, 106, 255, 0.8), 0 2px 6px rgba(0, 0, 0, 0.6);
}

.player-volume-slider::-moz-range-track {
  height: 6px;
  border-radius: 9999px;
  background: transparent;
}

.player-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.player-volume-slider:hover::-moz-range-thumb {
  transform: scale(1.2);
}

/* ── Video Player Rotate Device to Landscape Prompt ────────── */
.player-rotate-prompt {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  pointer-events: auto;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideRotatePromptDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-rotate-prompt.hidden {
  display: none !important;
}

@keyframes slideRotatePromptDown {
  from {
    opacity: 0;
    transform: translate(-50%, -24px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.player-rotate-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 18, 28, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(109, 74, 255, 0.25);
  border-radius: 999px;
  padding: 8px 14px 8px 12px;
  color: #ffffff;
}

.player-rotate-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(109, 74, 255, 0.25);
  border: 1px solid rgba(135, 106, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a78bfa;
  flex-shrink: 0;
}

.player-rotate-icon-wrap .rotate-phone-icon {
  width: 18px;
  height: 18px;
  animation: phoneRotateAnim 2.4s ease-in-out infinite;
}

@keyframes phoneRotateAnim {
  0%, 15% {
    transform: rotate(0deg);
  }
  45%, 70% {
    transform: rotate(-90deg);
  }
  90%, 100% {
    transform: rotate(0deg);
  }
}

.player-rotate-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.player-rotate-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.player-rotate-text span {
  font-size: 11px;
  color: #a0a0b0;
}

.player-rotate-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7c5cff, #6d4aff);
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(109, 74, 255, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.player-rotate-action-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #8f72ff, #7c5cff);
}

.player-rotate-action-btn .icon {
  width: 13px;
  height: 13px;
}

.player-rotate-dismiss-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.player-rotate-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.player-rotate-dismiss-btn .icon {
  width: 14px;
  height: 14px;
}

/* ── Live Category Toolbar & Manage Button ──────────────────── */
.live-cat-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-cat-manage-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(135, 106, 255, 0.18);
  border: 1px solid rgba(135, 106, 255, 0.45);
  color: #e0e7ff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(135, 106, 255, 0.2);
  transition: all 0.2s ease;
}

.live-cat-manage-btn:hover {
  background: rgba(135, 106, 255, 0.35);
  border-color: #a78bfa;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(135, 106, 255, 0.35);
}

.live-cat-manage-btn .icon {
  width: 12px;
  height: 12px;
  color: #c4b5fd;
}

.live-cat-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  margin-left: auto;
  flex-shrink: 0;
}

.live-cat-lock-badge.is-unlocked {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.live-cat-lock-icon {
  width: 11px;
  height: 11px;
}

/* ── Category Manager Modal ─────────────────────────────────── */
.cat-manager-card {
  width: 640px !important;
  max-width: 95vw !important;
  height: 82vh !important;
  max-height: 720px !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: rgba(18, 20, 32, 0.95) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(135, 106, 255, 0.2) !important;
}

.cat-manager-card .pqs-top-bar {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cat-manager-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-manager-counter {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(135, 106, 255, 0.16);
  border: 1px solid rgba(135, 106, 255, 0.35);
  color: #c4b5fd;
  letter-spacing: 0.03em;
}

.cat-manager-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 14px 22px;
  overflow: hidden;
}

.cat-manager-search-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.cat-manager-search-bar .icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.cat-manager-search-bar input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.cat-manager-search-bar input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(135, 106, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(135, 106, 255, 0.15);
}

.cat-manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cat-manager-filter-tabs {
  display: inline-flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-filter-tab {
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-filter-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.cat-filter-tab.active {
  background: rgba(135, 106, 255, 0.3);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cat-manager-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cat-quick-btn {
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-quick-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cat-quick-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.cat-quick-btn.danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

.cat-manager-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.cat-manager-list::-webkit-scrollbar {
  width: 6px;
}

.cat-manager-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 3px;
}

.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  gap: 12px;
  transition: all 0.15s ease;
}

.cat-row:hover {
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.14);
}

.cat-row.is-hidden {
  opacity: 0.45;
  background: rgba(0, 0, 0, 0.2);
}

.cat-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.cat-reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.cat-reorder-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  width: 22px;
  height: 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all 0.12s ease;
}

.cat-reorder-btn:hover:not(:disabled) {
  background: rgba(135, 106, 255, 0.35);
  color: #fff;
  border-color: #876aff;
}

.cat-reorder-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.cat-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.cat-row-icon .icon {
  width: 14px;
  height: 14px;
}

.cat-row-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.cat-row-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-row-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.cat-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cat-action-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-action-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.cat-action-icon-btn .icon {
  width: 15px;
  height: 15px;
}

.cat-action-icon-btn.is-pinned {
  background: rgba(234, 179, 8, 0.18);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.cat-action-icon-btn.is-locked {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.cat-visibility-toggle {
  width: 36px;
  height: 32px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-visibility-toggle .icon {
  width: 16px;
  height: 16px;
}

.cat-visibility-toggle.is-hidden {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.35);
}

.cat-manager-footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cat-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-footer-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cat-footer-btn .icon {
  width: 14px;
  height: 14px;
}

.cat-done-btn {
  padding: 8px 24px !important;
  font-size: 13px !important;
}

/* ── Parental Control PIN Modal ─────────────────────────────── */
.pin-modal-card {
  width: 360px !important;
  max-width: 90vw !important;
  padding: 0 !important;
  border-radius: 24px !important;
  background: rgba(18, 20, 32, 0.96) !important;
  backdrop-filter: blur(32px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(135, 106, 255, 0.25) !important;
  overflow: hidden !important;
}

.pin-modal-card .pqs-top-bar {
  padding: 14px 18px 0;
  border: none;
}

.pin-modal-body {
  padding: 0 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pin-lock-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.2);
}

.pin-lock-icon .icon {
  width: 26px;
  height: 26px;
}

.pin-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}

.pin-modal-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 20px;
  max-width: 260px;
}

.pin-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-dot.is-filled {
  background: #876aff;
  border-color: #a78bfa;
  box-shadow: 0 0 12px rgba(135, 106, 255, 0.6);
  transform: scale(1.15);
}

.pin-dots-container.shake {
  animation: pinShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes pinShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 260px;
  margin-bottom: 12px;
}

.pin-key {
  aspect-ratio: 1;
  max-height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-ui);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pin-key:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.04);
}

.pin-key:active,
.pin-key:focus-visible {
  background: rgba(135, 106, 255, 0.4);
  border-color: #876aff;
  box-shadow: 0 0 0 3px rgba(135, 106, 255, 0.3);
  outline: none;
}

.pin-key-action {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.pin-key-action .icon {
  width: 18px;
  height: 18px;
}

.pin-error-msg {
  font-size: 12px;
  font-weight: 600;
  color: #f87171;
  min-height: 18px;
  margin-top: 4px;
}

/* ── Change PIN Modal ───────────────────────────────────────── */
.change-pin-card {
  width: min(450px, 94vw) !important;
  max-width: 450px !important;
  padding: 0 !important;
  border-radius: 16px !important;
  background: rgba(18, 20, 32, 0.96) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6) !important;
  overflow: hidden !important;
}

.change-pin-card .pqs-top-bar,
.change-pin-card .change-pin-header {
  padding: 22px 24px 0 24px !important;
  border-bottom: none !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
}

.change-pin-card .change-pin-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
  margin: 0 0 3px 0 !important;
  display: block !important;
}

.change-pin-card .change-pin-subtitle {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  margin: 0 !important;
  display: block !important;
}

.change-pin-body {
  padding: 16px 24px 24px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important; /* Unified spacing: field margin-bottom controls spacing evenly */
}

.change-pin-body .field {
  margin-bottom: 12px !important;
}

.change-pin-body .field label {
  display: block !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  margin-bottom: 5px !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

.change-pin-body input[type="password"] {
  width: 100% !important;
  min-height: 46px !important;
  height: 46px !important;
  padding: 10px 14px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  outline: none !important;
  box-sizing: border-box !important;
  letter-spacing: 0.35em !important;
  text-align: center !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
}

.change-pin-body input[type="password"]:focus {
  border-color: #876aff !important;
  box-shadow: 0 0 0 3px rgba(135, 106, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.change-pin-submit-btn {
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 11px 18px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  margin-top: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: none !important;
  cursor: pointer !important;
  background: linear-gradient(135deg, #876aff, #6f57ef) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(135, 106, 255, 0.35) !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease !important;
}

.change-pin-submit-btn:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.08) !important;
  box-shadow: 0 8px 24px rgba(135, 106, 255, 0.45) !important;
}

.change-pin-submit-btn:active {
  transform: translateY(0) !important;
}

/* ── Legal Document Viewer Modal Styles ── */
.legal-modal-card {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(18, 18, 24, 0.95) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85) !important;
}

#legal-modal-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 16px 0 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#legal-modal-body h4:first-child {
  margin-top: 0;
}

#legal-modal-body p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.65;
  color: #b0b0c4;
}

#legal-modal-body ul {
  margin: 0 0 12px 18px;
  padding: 0;
  color: #b0b0c4;
  font-size: 13px;
  line-height: 1.65;
}

#legal-modal-body li {
  margin-bottom: 5px;
}

#legal-modal-body .legal-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(135, 106, 255, 0.15);
  border: 1px solid rgba(135, 106, 255, 0.25);
  color: #c1b2ff;
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 14px;
}

#legal-modal-body .license-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

#legal-modal-body .license-card h5 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

#legal-modal-body .license-card p {
  margin: 0;
  font-size: 12px;
  color: #8e8e9f;
}

/* ── Support Center Action Modal & Cards ── */
.support-modal-card {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(18, 18, 24, 0.96) !important;
  backdrop-filter: blur(32px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(180%) !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.85) !important;
}

.support-faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.support-faq-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.support-faq-q {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.support-faq-icon {
  width: 15px;
  height: 15px;
  color: #876aff;
  flex-shrink: 0;
}

.support-faq-a {
  font-size: 12.5px;
  line-height: 1.6;
  color: #9c9cb2;
}

.support-diag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}

@media (max-width: 480px) {
  .support-diag-grid {
    grid-template-columns: 1fr;
  }
}

.support-diag-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.support-diag-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7f7f94;
  margin-bottom: 4px;
}

.support-diag-val {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.support-diag-status {
  font-size: 11px;
  color: #34d399;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.support-diag-card.active-testing {
  border-color: rgba(135, 106, 255, 0.45) !important;
  background: rgba(135, 106, 255, 0.08) !important;
  box-shadow: 0 0 16px rgba(135, 106, 255, 0.2);
}

.support-diag-progress-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 6px;
}

.support-diag-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #876aff, #34d399);
  border-radius: 999px;
  transition: width 0.2s ease-out;
}

.support-diag-stage-text {
  font-size: 11.5px;
  color: #a0a0b2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
}

.support-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  gap: 12px;
}

.support-contact-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.support-contact-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(135, 106, 255, 0.15);
  color: #876aff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.support-contact-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.support-contact-desc {
  font-size: 11.5px;
  color: #888899;
  word-break: break-all;
}

.support-plan-card {
  background: linear-gradient(135deg, rgba(135, 106, 255, 0.12), rgba(111, 87, 239, 0.06));
  border: 1px solid rgba(135, 106, 255, 0.3);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.support-feature-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-feature-item {
  font-size: 12.5px;
  color: #d1d1e0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-feature-item i {
  color: #34d399;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}


