:root {
  --bg-gtv: #0e1015;
  --bg-gtv-elevated: #171a21;
  --bg-gtv-card: #1c2029;
  --focus-white: #ffffff;
  --brand-red: #e50914;
  --imdb-gold: #f5c518;
  --match-green: #46d369;
  --text-primary: #f1f3f4;
  --text-secondary: #9aa0a6;
  --text-muted: #5f6368;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

html, body {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: var(--bg-gtv);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tv-focusable {
  outline: none;
  cursor: pointer;
  transition:
    transform 210ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 210ms cubic-bezier(0.22, 1, 0.36, 1);
}

svg.ic {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

svg.ic-fill {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
  flex-shrink: 0;
}

/* ============================================================================
   FULL-BLEED AMBIENT HERO BACKDROP (GOOGLE TV / APPLE TV+ STYLE)
   ============================================================================ */
#gtv-hero-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  width: 92vw;
  height: 92vh;
  z-index: 0;
  background-size: cover;
  background-position: center 15%;
  background-repeat: no-repeat;
  transition: background-image 350ms ease;
  pointer-events: none;
}

#gtv-hero-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, #0e1015 0%, #0e1015 16%, rgba(14, 16, 21, 0.84) 42%, rgba(14, 16, 21, 0.2) 72%, rgba(14, 16, 21, 0.04) 100%),
    linear-gradient(180deg, rgba(14, 16, 21, 0.45) 0%, rgba(14, 16, 21, 0.04) 24%, rgba(14, 16, 21, 0.22) 56%, rgba(14, 16, 21, 0.84) 79%, #0e1015 95%, #0e1015 100%);
  pointer-events: none;
}

/* ============================================================================
   MAIN SCROLLABLE STAGE WITH GENEROUS BREATHING ROOM (46px Horizontal Margin)
   ============================================================================ */
#app-stage {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 46px 80px 46px;
}

#app-stage::-webkit-scrollbar {
  width: 0px;
  display: none;
}

/* Google TV Floating Top Bar (Airy & Minimalist) */
#top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.gtv-nav-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.gtv-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e50914, #99060d);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.gtv-capsule {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.11);
  padding: 4px;
  border-radius: 999px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 8.5px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.15px;
  white-space: nowrap;
}

.nav-btn.icon-only {
  width: 32px;
  padding: 0;
}

.nav-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 700;
}

/* While gliding across top nav buttons, show ONLY the single focused white pill — no competing gray pill! */
.gtv-capsule.nav-focus-inside .nav-btn.active:not(.tv-focused) {
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 600;
}

.nav-btn:focus,
.nav-btn.tv-focused,
.nav-btn:hover {
  background: #ffffff !important;
  color: #0e1015 !important;
  font-weight: 700;
}

.gtv-nav-right {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.gtv-divider {
  opacity: 0.35;
}

/* ============================================================================
   GOOGLE TV / APPLE TV+ BORDERLESS FULL-BLEED HERO STAGE
   ============================================================================ */
#hero-banner {
  position: relative;
  min-height: 294px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 0 18px 0;
  margin-bottom: 12px;
}

.hero-content {
  max-width: 510px;
}

.hero-logo-img {
  max-width: 260px;
  max-height: 62px;
  object-fit: contain;
  object-position: left bottom;
  margin-bottom: 6px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.7));
}

.hero-provider-tag {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 5px;
}

.hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.6px;
  color: #ffffff;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-overview {
  font-size: 12px;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gtv-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 14px;
}

.gtv-match {
  color: var(--match-green);
  font-weight: 800;
}

.imdb-badge {
  background: var(--imdb-gold);
  color: #000000;
  font-weight: 900;
  font-size: 9px;
  padding: 1.5px 4px;
  border-radius: 3px;
}

.age-badge {
  background: #ea580c;
  color: #ffffff;
  font-weight: 900;
  font-size: 9.5px;
  min-width: 19px;
  height: 17px;
  padding: 0 5px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.age-badge.age-L { background: #16a34a; color: #ffffff; }
.age-badge.age-10 { background: #0284c7; color: #ffffff; }
.age-badge.age-12 { background: #eab308; color: #0e1015; }
.age-badge.age-14 { background: #ea580c; color: #ffffff; }
.age-badge.age-16 { background: #dc2626; color: #ffffff; }
.age-badge.age-18 { background: #111114; color: #ffffff; border: 1.5px solid #dc2626; }

.gtv-genre-inline {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.hd-badge {
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tv-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: none;
}

.tv-btn-primary {
  background: rgba(255, 255, 255, 0.92);
  color: #0e1015;
}

.tv-btn-glass {
  background: rgba(255, 255, 255, 0.14);
  color: #f1f3f4;
}

.tv-btn:focus,
.tv-btn.tv-focused,
.tv-btn:hover {
  background: #ffffff !important;
  color: #0e1015 !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}

.hero-dots-indicator {
  position: absolute;
  right: 4px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.h-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.h-dot.active {
  background: #ffffff;
  transform: scale(1.25);
}

/* ============================================================================
   CONTINUOUS HORIZONTAL RAILS ("LISTAS CORRIDAS") WITH BREATHING ROOM
   ============================================================================ */
.content-rail {
  margin-bottom: 22px;
}

.rail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 10px;
}

.rail-title {
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(241, 243, 244, 0.56);
  letter-spacing: -0.2px;
  transition: color 120ms ease;
}

.content-rail.rail-active .rail-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.35px;
}

.rail-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 196px;
  gap: 14px;
  overflow-x: auto;
  overflow-y: visible;
  margin-left: -46px;
  margin-right: -46px;
  padding: 12px 46px 14px 46px;
  scroll-padding-left: 46px;
  scroll-padding-right: 46px;
}

.rail-track::-webkit-scrollbar {
  display: none;
}

/* ============================================================================
   16:9 WIDESCREEN CARD WITH OFFICIAL TITLE ON THE COVER ITSELF!
   ============================================================================ */
.gtv-card {
  position: relative;
  flex: 0 0 180px;
  width: 180px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: transparent;
  border: none;
  text-align: left;
}

.gtv-card-media {
  position: relative;
  width: 100%;
  height: 101px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-gtv-card);
  border: none;
  transition: box-shadow 140ms cubic-bezier(0.2, 0, 0, 1);
}

.gtv-card-media img.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gtv-card-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #20242f, #14171e);
}

/* Official Movie Logo / Title Overlaid Directly on the Cover when backdrop is textless */
.gtv-cover-logo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(10, 12, 16, 0.78) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px 12px;
  pointer-events: none;
}

.gtv-cover-logo-overlay img.logo-png {
  max-width: 72%;
  max-height: 42px;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
}

.gtv-cover-title-art {
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.3px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rail-track .gtv-card:focus,
.rail-track .gtv-card.tv-focused,
.rail-track .gtv-card:hover {
  flex: 0 0 220px;
  width: 220px;
  z-index: 8;
}

.rail-track .gtv-card:focus .gtv-card-media,
.rail-track .gtv-card.tv-focused .gtv-card-media,
.rail-track .gtv-card:hover .gtv-card-media {
  height: 124px;
  box-shadow: 0 0 0 2px #0e1015, 0 0 0 3.5px #ffffff, 0 14px 30px rgba(0, 0, 0, 0.88);
}

.genre-hub-grid .gtv-card:focus .gtv-card-media,
.genre-hub-grid .gtv-card.tv-focused .gtv-card-media,
.genre-hub-grid .gtv-card:hover .gtv-card-media,
.catalog-grid .gtv-card:focus .gtv-card-media,
.catalog-grid .gtv-card.tv-focused .gtv-card-media,
.catalog-grid .gtv-card:hover .gtv-card-media,
.gtv-live-results-strip .gtv-card:focus .gtv-card-media,
.gtv-live-results-strip .gtv-card.tv-focused .gtv-card-media,
.gtv-live-results-strip .gtv-card:hover .gtv-card-media {
  transform: scale(1.025);
  box-shadow: 0 0 0 2px #0e1015, 0 0 0 3.5px #ffffff, 0 12px 26px rgba(0, 0, 0, 0.85);
}

.gtv-card-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 4;
}

.gtv-card-progress-fill {
  height: 100%;
  background: var(--brand-red);
}

.gtv-card-badge-top {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 4;
  background: rgba(14, 16, 21, 0.84);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
}

.gtv-card-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(14, 16, 21, 0.78);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Caption Below the Card: Clean meta when unfocused, larger bold title + expanded artwork on focus (Google TV style) */
.gtv-card-caption {
  padding: 2px 2px 0 2px;
  min-height: 24px;
  opacity: 0.72;
}

.gtv-card:focus .gtv-card-caption,
.gtv-card.tv-focused .gtv-card-caption,
.gtv-card:hover .gtv-card-caption,
.gtv-card.always-caption .gtv-card-caption {
  opacity: 1;
}

.gtv-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.rail-track .gtv-card:not(.always-caption):not(:focus):not(.tv-focused):not(:hover) .gtv-card-title {
  display: none;
}

.gtv-card:focus .gtv-card-title,
.gtv-card.tv-focused .gtv-card-title,
.gtv-card:hover .gtv-card-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 2px;
}

.gtv-card-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gtv-card:focus .gtv-card-sub,
.gtv-card.tv-focused .gtv-card-sub,
.gtv-card:hover .gtv-card-sub {
  color: #e2e8f0;
  font-size: 10.5px;
}

/* ============================================================================
   "PROCURAR POR GÊNERO" PHOTOGRAPHIC CARDS (Exact Match to Google TV!)
   ============================================================================ */
.genre-card {
  position: relative;
  flex: 0 0 132px;
  width: 132px;
  height: 154px;
  border-radius: 14px;
  overflow: hidden;
  border: none;
  background-color: #1c2029;
  background-size: cover;
  background-position: center top;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 10px;
  text-align: center;
  will-change: transform;
  transition:
    transform 140ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 140ms cubic-bezier(0.2, 0, 0, 1);
}

.genre-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--genre-gradient, linear-gradient(180deg, transparent 20%, rgba(15, 23, 42, 0.96) 78%));
  z-index: 1;
}

.genre-card:focus,
.genre-card.tv-focused,
.genre-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 2px #0e1015, 0 0 0 3.5px #ffffff, 0 12px 28px rgba(0, 0, 0, 0.85);
  z-index: 20;
}

.genre-card-footer {
  position: relative;
  z-index: 2;
}

.genre-card-sub {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.genre-card-name {
  font-size: 14.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ============================================================================
   "VER TUDO" END-OF-RAIL CARD & DEDICATED GENRE HUB PAGE
   ============================================================================ */
.gtv-see-all-card {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: transparent;
  border: none;
  color: #ffffff;
}

.gtv-see-all-media {
  position: relative;
  width: 180px;
  height: 101px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(28, 34, 48, 0.9) 0%, rgba(16, 19, 27, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.gtv-see-all-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1), transparent 68%);
  pointer-events: none;
}

.gtv-see-all-icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.gtv-see-all-label {
  position: relative;
  z-index: 1;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.1px;
  color: #ffffff;
}

.gtv-see-all-sub {
  position: relative;
  z-index: 1;
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.56);
}

.gtv-see-all-card:focus,
.gtv-see-all-card.tv-focused,
.gtv-see-all-card:hover {
  width: 220px;
}

.gtv-see-all-card:focus .gtv-see-all-media,
.gtv-see-all-card.tv-focused .gtv-see-all-media,
.gtv-see-all-card:hover .gtv-see-all-media {
  width: 220px;
  height: 124px;
  background: linear-gradient(145deg, #252c3e 0%, #141824 62%, #22141c 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 0 2px #0e1015, 0 0 0 3.5px #ffffff, 0 16px 34px rgba(0, 0, 0, 0.88);
}

.gtv-see-all-card:focus .gtv-see-all-icon,
.gtv-see-all-card.tv-focused .gtv-see-all-icon,
.gtv-see-all-card:hover .gtv-see-all-icon {
  background: #ffffff;
  color: #0e1015;
  border-color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.42);
}

.gtv-see-all-card:focus .gtv-see-all-sub,
.gtv-see-all-card.tv-focused .gtv-see-all-sub,
.gtv-see-all-card:hover .gtv-see-all-sub {
  color: rgba(255, 255, 255, 0.78);
}

.genre-hub-hero {
  position: relative;
  min-height: 220px;
  margin: -12px -46px 20px -46px;
  padding: 24px 46px 26px 46px;
  background-color: #10131a;
  background-size: cover;
  background-position: center 22%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.genre-hub-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0e1015 0%, rgba(14, 16, 21, 0.88) 46%, rgba(14, 16, 21, 0.25) 100%),
    linear-gradient(180deg, rgba(14, 16, 21, 0.5) 0%, transparent 32%, #0e1015 100%);
  z-index: 0;
}

.genre-hub-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.genre-hub-kicker {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

.genre-hub-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.08;
  margin-bottom: 6px;
}

.genre-hub-filters {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.genre-hub-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.genre-hub-toolbar .genre-hub-filters {
  margin-top: 0;
}

.genre-hub-grid {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 14px;
  padding: 6px 0 22px 0;
}

.genre-hub-grid .gtv-card {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  flex: none;
}

.genre-hub-grid .gtv-card-caption {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  min-height: 36px;
}

.genre-hub-grid .gtv-card-media {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
  aspect-ratio: auto;
  overflow: hidden;
}

.genre-hub-grid .gtv-card-title,
.genre-hub-grid .gtv-card:focus .gtv-card-title,
.genre-hub-grid .gtv-card.tv-focused .gtv-card-title,
.genre-hub-grid .gtv-card:hover .gtv-card-title {
  display: block;
  height: 17px;
  line-height: 17px;
  font-size: 12.5px;
  font-weight: 700;
}

.genre-hub-grid .gtv-card-sub {
  height: 15px;
  line-height: 15px;
}

.genre-hub-loadmore-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 0 36px 0;
}

.genre-hub-loadmore-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}

.btn-load-more-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15px;
  transition: transform 140ms cubic-bezier(0.2, 0, 0, 1), background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.btn-load-more-premium:focus,
.btn-load-more-premium.tv-focused,
.btn-load-more-premium:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0e1015;
  transform: scale(1.04);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
}

/* ============================================================================
   GRID VIEW (SEARCH)
   ============================================================================ */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 18px 16px;
  padding: 6px 2px 30px 2px;
}

.catalog-grid .gtv-card {
  min-width: 0;
  width: 100%;
  flex: none;
}

.catalog-grid .gtv-card-media {
  width: 100%;
  height: 0;
  padding-top: 56.25%;
  aspect-ratio: auto;
}

/* ============================================================================
   GOOGLE TV SEARCH TAB & PASTEL GENRE MOSAIC (EXACT PHOTO 1 & 2 STYLE)
   ============================================================================ */
.gtv-search-home {
  padding-top: 6px;
}

.gtv-search-pill {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid transparent;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 18px;
  transition: transform 80ms ease, background 80ms ease;
}

.gtv-search-pill svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.gtv-search-pill:focus,
.gtv-search-pill.tv-focused,
.gtv-search-pill:hover {
  background: #ffffff;
  color: #0e1015;
  transform: scale(1.01);
}

.gtv-search-genre-heading {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 12px 2px;
  letter-spacing: -0.1px;
}

.gtv-genre-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding-bottom: 24px;
}

.gtv-genre-tile {
  height: 68px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--tile-bg, #5aaee0);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 10px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: transform 80ms ease, border-color 80ms ease;
}

.gtv-genre-tile:focus,
.gtv-genre-tile.tv-focused,
.gtv-genre-tile:hover {
  border-color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
}

/* ============================================================================
   GOOGLE TV CLEAN TYPING OVERLAY & FLOATING GBOARD KEYBOARD (PHOTO 2)
   ============================================================================ */
#search-typing-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: radial-gradient(circle at 50% 0%, #171e2b 0%, #0d1119 55%, #090c12 100%);
  display: none;
  flex-direction: column;
  padding: 24px 46px 18px 46px;
}

#search-typing-overlay.open {
  display: flex;
}

#search-typing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
}

.gtv-typing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
}

.gtv-typing-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.gtv-typing-input-wrap svg {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

#gtv-search-real-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

#gtv-search-real-input::placeholder {
  color: rgba(255, 255, 255, 0.34);
  font-weight: 500;
}

.gtv-typing-middle {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gtv-live-results-strip {
  position: relative;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: -46px;
  margin-right: -46px;
  padding: 10px 46px 12px 46px;
}

.gtv-live-results-strip::-webkit-scrollbar {
  display: none;
}

.gtv-live-results-strip .gtv-card {
  width: 168px;
}

.gtv-kb-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 2px;
}

.gtv-keyboard-box {
  width: 472px;
  background: rgba(58, 66, 78, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 12px 12px 12px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gtv-kb-suggestions {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  margin-bottom: 2px;
}

.gtv-kb-chip {
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gtv-kb-chip:focus,
.gtv-kb-chip.tv-focused,
.gtv-kb-chip:hover {
  background: #ffffff;
  color: #0e1015;
  font-weight: 700;
}

.gtv-kb-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
}

.gtv-kb-row.bottom-row {
  grid-template-columns: 1.2fr 0.85fr 0.85fr 3.6fr 0.85fr 0.85fr 1.8fr;
}

.gtv-kb-key {
  position: relative;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gtv-kb-subdigit {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.gtv-kb-key.spec-key {
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
}

.gtv-kb-key.gtv-kb-submit {
  background: #a8c7fa;
  color: #0e1015;
  font-weight: 700;
}

.gtv-kb-key:focus,
.gtv-kb-key.tv-focused,
.gtv-kb-key:hover,
.gtv-kb-key.gtv-kb-submit:focus,
.gtv-kb-key.gtv-kb-submit.tv-focused {
  background: #ffffff;
  color: #0e1015;
  font-weight: 700;
  transform: scale(1.05);
}

.gtv-kb-key:focus .gtv-kb-subdigit,
.gtv-kb-key.tv-focused .gtv-kb-subdigit,
.gtv-kb-key:hover .gtv-kb-subdigit {
  color: rgba(14, 16, 21, 0.65);
}

.search-results-panel {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.filter-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pill-btn {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11.5px;
  font-weight: 600;
}

.pill-btn.active {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-weight: 700;
}

.pill-btn:focus,
.pill-btn.tv-focused,
.pill-btn:hover {
  background: #ffffff;
  color: #0e1015;
  font-weight: 700;
}

/* ============================================================================
   FULL-BLEED CINEMA DETAILS PAGE (APPLE TV+ / GOOGLE TV FULL PAGE)
   ============================================================================ */
#details-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-gtv);
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 60px 0;
}

#details-modal.open {
  display: block;
}

.details-backdrop-stage {
  position: relative;
  width: 100%;
  min-height: 410px;
  background-color: #0e1015;
  background-size: cover;
  background-position: center 18%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 46px 28px 46px;
}

.details-backdrop-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0e1015 0%, rgba(14, 16, 21, 0.92) 38%, rgba(14, 16, 21, 0.45) 68%, rgba(14, 16, 21, 0.15) 100%),
    linear-gradient(180deg, rgba(14, 16, 21, 0.45) 0%, transparent 25%, rgba(14, 16, 21, 0.72) 72%, #0e1015 100%);
  z-index: 0;
}

.details-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.details-type-pill {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(14, 16, 21, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 5px 14px;
}

.details-main-hero {
  position: relative;
  z-index: 2;
  max-width: 660px;
}

.details-logo-img {
  max-width: 310px;
  max-height: 78px;
  object-fit: contain;
  object-position: left bottom;
  margin-bottom: 10px;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.85));
}

.details-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.06;
  margin-bottom: 10px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.details-tagline {
  font-size: 11.5px;
  font-weight: 600;
  font-style: italic;
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 6px;
}

.details-synopsis {
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 10px;
  max-width: 600px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.details-credits-line {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
}

.details-credits-line strong {
  color: rgba(255, 255, 255, 0.92);
}

.details-body {
  position: relative;
  z-index: 2;
  padding: 4px 46px 20px 46px;
}

.details-section-heading {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
  margin: 18px 0 12px 0;
}

.details-cast-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-left: -46px;
  margin-right: -46px;
  padding: 8px 46px 14px 46px;
}

.details-cast-track::-webkit-scrollbar {
  display: none;
}

.cast-card {
  width: 96px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 8px 6px;
  color: #ffffff;
}

.cast-card img,
.cast-avatar-fallback {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: #1c2029;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.cast-card:focus,
.cast-card.tv-focused,
.cast-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.cast-card-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cast-card-role {
  font-size: 9.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.seasons-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.episode-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 14px;
  border-radius: 14px;
  background: var(--bg-gtv-elevated);
  border: 2px solid transparent;
  margin-bottom: 9px;
}

.episode-row:focus,
.episode-row.tv-focused,
.episode-row:hover {
  background: #222631;
  border-color: #ffffff;
  transform: scale(1.01);
}

.ep-thumb-wrap {
  position: relative;
  width: 136px;
  height: 76px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0a0c10;
}

.ep-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-thumb-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.25);
}

.ep-body {
  flex: 1;
  min-width: 0;
}

.ep-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.ep-overview {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 4px 0;
}

.ep-status-line {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ep-check-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ep-check-btn.watched {
  background: #ffffff;
  border-color: #ffffff;
  color: #0e1015;
}

.ep-check-btn:focus,
.ep-check-btn.tv-focused,
.ep-check-btn:hover {
  background: #ffffff;
  color: #0e1015;
  border-color: #ffffff;
  transform: scale(1.08);
}

/* ============================================================================
   NETFLIX & APPLE TV+ MODERN VIDEO PLAYER HUD & DRAWERS
   ============================================================================ */
#player-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: none;
}

#player-modal.open {
  display: block;
}

#native-video,
#embed-iframe {
  width: 100vw;
  height: 100vh;
  border: none;
  background: #000;
}

/* ============================================================================
   CINEMATOGRAPHIC SHIMMER SKELETON & MODERN PLAYER LOADER (ZERO-LAG GPU SAFE)
   ============================================================================ */
@keyframes gtvShimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

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

@keyframes gtvFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gtv-loading-screen {
  padding: 26px 46px;
  animation: gtvFadeIn 140ms ease;
}

.gtv-skel-hero {
  height: 210px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 800px 100%;
  animation: gtvShimmer 1.3s infinite linear;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px 34px;
  margin-bottom: 24px;
}

.gtv-skel-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gtv-skel-card {
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.11) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 800px 100%;
  animation: gtvShimmer 1.3s infinite linear;
}

#player-loader {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: radial-gradient(circle at center, rgba(16, 20, 28, 0.85) 0%, rgba(5, 7, 11, 0.96) 100%);
  background-size: cover;
  background-position: center;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#player-loader.active {
  display: flex;
  animation: gtvFadeIn 150ms ease;
}

#player-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.72);
  z-index: 0;
}

#player-loader > * {
  position: relative;
  z-index: 2;
}

.player-loader-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: #ffffff;
  animation: gtvSpin 0.75s linear infinite;
}

.gtv-tab-enter {
  animation: gtvFadeIn 120ms ease;
}

#seek-indicator {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  background: rgba(14, 16, 21, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: none;
  pointer-events: none;
}

#player-hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 46px 28px 46px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, transparent 22%, transparent 66%, rgba(0, 0, 0, 0.88) 100%);
  transition: opacity 150ms ease;
}

#player-hud.hud-hidden {
  opacity: 0;
  pointer-events: none;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-top-iframe-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

#player-modal.iframe-mode #hud-bottom-controls {
  display: none !important;
}

#player-modal.iframe-mode #player-hud {
  pointer-events: none;
  background: none;
  justify-content: flex-start;
  padding: 0;
}

#player-modal.iframe-mode .hud-top {
  pointer-events: auto;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.45) 72%, transparent 100%);
  padding: 20px 36px 28px 36px;
}

#player-modal.iframe-mode #player-hud.hud-hidden .hud-top {
  pointer-events: none;
}

#player-modal.iframe-mode .hud-top-iframe-actions {
  display: flex;
}

.hud-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-back-btn:focus,
.hud-back-btn.tv-focused,
.hud-back-btn:hover {
  background: #ffffff;
  color: #0e1015;
}

.hud-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.78);
}

.timeline-slider {
  flex: 1;
  height: 3.5px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.26);
  border-radius: 99px;
  cursor: pointer;
}

.timeline-slider:focus,
.timeline-slider.tv-focused {
  height: 6px;
  background: rgba(255, 255, 255, 0.55);
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
}

.timeline-slider.tv-focused::-webkit-slider-thumb,
.timeline-slider:focus::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  background: var(--brand-red);
  border: 2px solid #ffffff;
}

.hud-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hud-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-right-links {
  gap: 6px;
}

.hud-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11.5px;
  font-weight: 600;
}

/* Netflix TV Ghost Action Links — Zero box clutter when unfocused! */
.hud-action-btn.hud-ghost-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  padding: 0 12px;
}

.hud-action-btn:focus,
.hud-action-btn.tv-focused,
.hud-action-btn:hover {
  background: #ffffff;
  color: #0e1015;
  font-weight: 700;
}

.player-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.player-drawer-overlay.open {
  display: flex;
}

.player-drawer-card {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  background: #181b22;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.drawer-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  text-align: left;
}

.drawer-option-btn.selected {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.drawer-option-btn:focus,
.drawer-option-btn.tv-focused,
.drawer-option-btn:hover {
  background: #ffffff;
  color: #0e1015;
  font-weight: 700;
}

#upnext-card {
  position: absolute;
  right: 42px;
  bottom: 96px;
  z-index: 25;
  background: #181b22;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 12px 16px;
  display: none;
  width: 230px;
}

#ota-toast {
  position: fixed;
  top: 20px;
  right: 42px;
  z-index: 999;
  background: #181b22;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 16px;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}

/* ============================================================================
   NETFLIX-STYLE APP STARTUP SPLASH (DARK GRADIENT + PULSING EMBLEM)
   ============================================================================ */
#app-splash {
  position: fixed;
  inset: 0;
  z-index: 950;
  background:
    radial-gradient(ellipse 68% 54% at 50% 48%, rgba(229, 9, 20, 0.22) 0%, rgba(20, 12, 18, 0.88) 42%, #05060a 78%, #000000 100%),
    linear-gradient(180deg, #000000 0%, #0b0d14 50%, #000000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  opacity: 1;
  transform: scale(1);
  transition: opacity 420ms cubic-bezier(0.4, 0, 0.2, 1), transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

#app-splash.leaving {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

#app-splash.done {
  display: none;
  pointer-events: none;
}

.splash-emblem {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: obsidianSplashPulse 1.4s ease-in-out infinite;
}

.splash-mark {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: linear-gradient(145deg, #f40612 0%, #b80710 60%, #7a040a 100%);
  box-shadow: 0 0 42px rgba(229, 9, 20, 0.65), 0 12px 32px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -1px;
}

.splash-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 7px;
  color: #ffffff;
  text-shadow: 0 4px 28px rgba(229, 9, 20, 0.55);
}

.splash-tv-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e50914;
  color: #ffffff;
}

.splash-pulse-bar {
  width: 132px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.splash-pulse-bar::after {
  content: "";
  display: block;
  width: 50%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #e50914, #ffffff, #e50914, transparent);
  animation: obsidianSplashSweep 1.15s ease-in-out infinite;
}

@keyframes obsidianSplashPulse {
  0%, 100% {
    transform: scale(0.96);
    filter: drop-shadow(0 0 18px rgba(229, 9, 20, 0.35));
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 38px rgba(229, 9, 20, 0.78));
  }
}

@keyframes obsidianSplashSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(220%); }
}

/* ============================================================================
   STREAM INTEGRITY BADGES, PLAYER UNAVAILABLE ACTIONS & HEALTH PANEL
   ============================================================================ */
.avail-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.avail-pill.ok {
  background: rgba(70, 211, 105, 0.16);
  border: 1px solid rgba(70, 211, 105, 0.42);
  color: #6ee787;
}

.avail-pill.ext {
  background: rgba(245, 197, 24, 0.14);
  border: 1px solid rgba(245, 197, 24, 0.4);
  color: #fde047;
}

.avail-pill.cinema {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.42);
  color: #fca5a5;
}

#player-loader.has-actions {
  z-index: 15;
  pointer-events: auto;
}

.player-loader-actions {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.player-loader-actions.open {
  display: flex;
  pointer-events: auto;
}

.drawer-option-btn.danger-opt {
  border: 1px solid rgba(229, 9, 20, 0.45);
  color: #fca5a5;
}

.drawer-option-btn.danger-opt:focus,
.drawer-option-btn.danger-opt.tv-focused,
.drawer-option-btn.danger-opt:hover {
  background: #e50914;
  border-color: #ffffff;
  color: #ffffff;
}

.health-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.health-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 14px;
}

/* ============================================================================
   LIVE TV CHANNELS & CUSTOM M3U CONFIGURATION
   ============================================================================ */
.livetv-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.livetv-cat-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.livetv-cat-pill {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.livetv-cat-pill.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
}

.livetv-cat-pill:focus,
.livetv-cat-pill.tv-focused,
.livetv-cat-pill:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #0e1015;
  font-weight: 700;
}

.livetv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(192px, 1fr));
  gap: 14px;
  padding-bottom: 42px;
}

.livetv-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.livetv-card:focus,
.livetv-card.tv-focused,
.livetv-card:hover {
  outline: none;
  background: rgba(255, 255, 255, 0.13);
  border-color: #ffffff;
  transform: scale(1.035);
}

.livetv-logo-wrap {
  position: relative;
  width: 100%;
  height: 82px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.1), rgba(10, 14, 24, 0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}

.livetv-logo-wrap img {
  max-width: 78%;
  max-height: 62px;
  object-fit: contain;
}

.livetv-monogram {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.livetv-live-dot {
  position: absolute;
  top: 7px;
  left: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(229, 9, 20, 0.9);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.livetv-live-dot::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
}

.m3u-panel-card {
  margin-top: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
}

.m3u-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.m3u-input {
  flex: 1 1 280px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 12px;
  font-family: monospace;
}

.m3u-input:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
}
