/* CSS Variables & Theme (Hot Player Update) */
:root {
  --bg-dark: #0b1120;
  --bg-royal-blue: #0b1120;
  /* Consolidated to dark theme */
  --text-white: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.5);
  --accent-purple-main: #a855f7;
  --accent-yellow: #facc15;
  /* Hot Player Accent */
  --font-main: 'Outfit', sans-serif;

  --bg-panel-dark: #12121f;
  --bg-card: rgba(255, 255, 255, 0.05);
  /* Transparent tiles */
}

/* Video Buffering Spinner - Big Purple Circle */
.video-spinner {
  width: 80px;
  height: 80px;
  border: 6px solid rgba(168, 85, 247, 0.2);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: video-spin 1s linear infinite;
}

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

/* RESTORED GLOBAL RESETS & BODY SIZE */
html,
body {
  overflow: hidden !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 16px !important;
  /* Lock root font-size for consistent rem across all TV sizes */
}

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

body {
  width: 1920px;
  height: 1080px;
  background-color: transparent !important;
  color: var(--text-white);
  font-family: var(--font-main);
  overflow: hidden;
}

/* ... keep shared styles ... */

/* 3. Main Menu Screen (Hot Player Override) */
#mainMenuScreen {
  background-color: #0b1120 !important;
  /* Deep Dark Blue/Black */
  background-image: none !important;
}

/* Hot Player Tiles */
.tile {
  width: 320px;
  /* Increased from 300px */
  height: 280px;
  /* Increased from 240px */
  background: rgba(255, 255, 255, 0.03) !important;
  border: 2px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3) !important;
}

.tile:focus {
  background: rgba(168, 85, 247, 0.2) !important;
  border-color: var(--accent-purple-main) !important;
  transform: scale(1.08);
  /* Scale up on focus */
  box-shadow: 0 20px 60px rgba(168, 85, 247, 0.4) !important;
  z-index: 10;
}

.tile i {
  color: white !important;
  text-shadow: none !important;
}

/* Button Pills - Dark Rectangles */
.btn-pill {
  background: #1e2330 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  /* Less rounded */
  color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: none !important;
}

.btn-pill:focus {
  background: #2a3040 !important;
  border-color: var(--accent-yellow) !important;
  color: white !important;
}

/* Main Menu centered layout handles positioning via Tailwind/Utility classes in HTML */



/* 4. Channel List Screen - Base */
#channelListScreen {
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
  width: 100% !important;
  height: 100% !important;
  position: absolute;
  inset: 0;
  overflow: hidden;
  align-items: stretch;
  /* CRITICAL: Ensure children take full width */
}

/* Header Override */
#channelListScreen>div:first-child {
  width: 100% !important;
  flex-shrink: 0;
}

/* Sidebar Icons Strip (Far Left) */
.sidebar-icons {
  width: 75px;
  /* Fine-tuned: was 85px */
  background: #0a0a0f;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 25px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.side-icon {
  width: 55px;
  /* Fine-tuned: was 60px */
  height: 55px;
  /* Fine-tuned: was 60px */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  /* Fine-tuned: was 28px */
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 15px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.side-label {
  position: absolute;
  left: 65px;
  background: #7c3aed;
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 16px;
  /* Fine-tuned */
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  text-transform: capitalize;
}

.side-label::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 5px solid #7c3aed;
}

.side-icon:focus .side-label {
  opacity: 1;
  visibility: visible;
  left: 65px;
}

.side-icon.active {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.1);
}

.side-icon.focusable:focus {
  background: rgba(168, 85, 247, 0.3);
  color: white;
  animation: bloom-focus 2s ease-in-out infinite;
  border: 2px solid #a855f7;
  border-radius: 12px;
}

.categories-panel {
  width: 360px;
  /* Reverted to 360px */
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.channels-panel {
  width: 480px;
  /* Reverted to 480px */
  background: #020617;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

/* Column Headers */
.column-header {
  height: 62px;
  /* Fine-tuned: was 70px */
  background: #312e81;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  border-bottom: 2px solid #4338ca;
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  /* Fine-tuned: was 1.5rem */
  flex-shrink: 0;
  text-transform: capitalize;
}

.column-header i {
  color: #a855f7;
  font-size: 1.2rem;
}

/* Hide scrollbars for cleaner look on TV */
#categoryContainer::-webkit-scrollbar,
#channelContainer::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* "EU | FRANCE GENERALE" is yellow in the list. The top header is blue. Let's stick to a clean header. */


.header-title {
  font-size: 20px;
  color: white;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 20px;
  opacity: 0.7;
}

.cat-item {
  padding: 14px 25px;
  font-size: 20px;
  /* Fine-tuned: was 22px */
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.5);
  background: transparent !important;
  border-left: 4px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: 12px;
}

.cat-item::after {
  content: '\f054';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.3);
}

.cat-item.active {
  background: #7c3aed !important;
  color: white !important;
  font-weight: 800;
  margin: 8px 15px;
  padding-left: 30px;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.cat-item.active::after {
  color: white;
}

.cat-item.focusable:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white;
}

.cat-item.active.focusable:focus {
  background: #7c3aed !important;
  transform: scale(1.02);
}

#categorySortBtn {
  transition: all 0.2s ease;
}

#categorySortBtn:focus {
  background: rgba(255, 255, 255, 0.2) !important;
  color: var(--accent-purple-light) !important;
  transform: scale(1.2) !important;
  box-shadow: 0 0 15px var(--accent-purple-glow) !important;
}

/* Channel Items - Exact/* Channel Items */
.channel-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px 15px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: transparent;
  border: 3px solid transparent;
  gap: 15px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

/* Logo Box - Left Side */
.channel-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 72px;
  /* Fine-tuned: was 80px */
  height: 62px;
  /* Fine-tuned: was 70px */
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.channel-logo-img {
  width: 48px;
  /* Fine-tuned: was 55px */
  height: 48px;
  /* Fine-tuned: was 55px */
  object-fit: contain;
}

.channel-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  /* Very subtle empty space */
}

/* Info Column - Right Side */
.channel-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
  overflow: hidden;
}

.channel-num {
  color: #a855f7;
  font-weight: 800;
  font-size: 15px;
  /* Fine-tuned: was 16px */
  line-height: 1.1;
  margin-bottom: 2px;
}

.channel-name {
  color: white;
  font-weight: 700;
  font-size: 20px;
  /* Fine-tuned: was 24px */
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Active State (Selection per Photo) */
.channel-item.active {
  background: #4c1d95;
  /* Deep purple background per photo selection */
  border: 2px solid #a855f7;
  /* High contrast border */
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.channel-item.active .channel-num {
  color: white;
  /* Contrast number when selected? Or keep purple? Photo shows white/bright number on selected */
  color: #e9d5ff;
}

.channel-item.focusable:focus {
  z-index: 2;
  background: rgba(76, 29, 149, 0.6) !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.5);
}

.channel-item.active.focusable:focus {
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.7);
}

/* Dynamic Header Mode Label */
.header-mode-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(124, 58, 237, 0.25);
  /* backdrop-filter: blur(8px); [REMOVED FOR TIZEN HOLE-PUNCH] */
  border: 1px solid rgba(168, 85, 247, 0.5);
  padding: 8px 24px;
  border-radius: 30px;
  color: #f3e8ff;
  font-weight: 700;
  font-size: 0.95rem;
  display: none;
  /* Controlled by JS */
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(168, 85, 247, 0.2);
  animation: header-label-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
}

/* Mobile Interactivity for Mode Label */
body.touch-active .header-mode-label {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease, box-shadow 0.2s ease;
}

body.touch-active .header-mode-label:active {
  transform: translate(-50%, -50%) scale(0.92);
  background: rgba(139, 92, 246, 0.5) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(244, 63, 94, 0.3);
}

.header-mode-label i {
  color: #c084fc;
  font-size: 1.1rem;
}

@keyframes header-label-pop {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Favorites Heart Styles */
.favorite-heart {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 14px;
  color: #a855f7;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

.favorite-heart.active {
  opacity: 1;
  transform: scale(1);
  color: #a855f7;
}

/* Category Search */
.search-container {
  height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 0px solid var(--accent-purple-main);
}

.search-container.active {
  height: 90px;
  /* Increased from 70px */
  border-bottom-width: 3px;
}

.search-input-wrapper {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.search-input-wrapper .search-icon {
  color: var(--accent-purple-main);
  font-size: 1.2rem;
}

#categorySearchInput {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px 20px;
  color: white;
  font-size: 1.6rem;
  /* Increased from 1.1rem */
  outline: none;
  transition: all 0.3s ease;
}

#categorySearchInput:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-purple-main);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.pulse-once {
  animation: heart-pulse 0.5s ease-out;
}

@keyframes heart-pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.5);
  }

  100% {
    transform: scale(1);
  }
}

.fav-category span {
  color: #c084fc !important;
  font-weight: 800 !important;
}

.offline-item {
  opacity: 0.5;
  filter: grayscale(1);
}

/* Poster Skeleton & Shimmer */
.poster-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.poster-skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.05) 20%,
      rgba(255, 255, 255, 0.1) 60%,
      rgba(255, 255, 255, 0));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Tizen-Compatible Vanity CSS (Replacing Tailwind v4) */
/* Reset */
:root {
  --color-black: #000000;
  --color-white: #ffffff;
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;
  --color-slate-950: #020617;

  --color-gray-100: #f3f4f6;
  --color-gray-400: #9ca3af;

  --color-red-500: #ef4444;
  --color-yellow-400: #facc15;
  --color-green-500: #22c55e;
  --color-blue-600: #2563eb;
  --color-indigo-400: #818cf8;
  --color-indigo-500: #6366f1;
  --color-indigo-600: #4f46e5;
  --color-purple-500: #a855f7;
  --color-purple-900: #581c87;

  --spacing: 0.25rem;
}

/* Core Resets */
*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

html,
body {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  /* Lock root font-size for consistent rem across all TV sizes */
}

/* Layout Utilities */
.block {
  display: block;
}

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.table {
  display: table;
}

.flex-row {
  flex-direction: row;
}

.flex-col {
  flex-direction: column;
}

.flex-1 {
  flex: 1 1 0%;
}

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

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

/* Positioning */
.static {
  position: static;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bottom-0 {
  bottom: 0;
}

.z-50 {
  z-index: 50;
}

/* Sizing */
.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.w-screen {
  width: 100vw;
}

.h-screen {
  height: 100vh;
}

.w-auto {
  width: auto;
}

.h-auto {
  height: auto;
}

/* Spacing (Common Only) */
.p-0 {
  padding: 0;
}

.p-2 {
  padding: 0.5rem;
}

.p-4 {
  padding: 1rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.m-0 {
  margin: 0;
}

.m-auto {
  margin: auto;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.ml-2 {
  margin-left: 0.5rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

/* Colors - Backgrounds */
.bg-transparent {
  background-color: transparent;
}

.bg-black {
  background-color: #000000;
}

.bg-white {
  background-color: #ffffff;
}

.bg-slate-900 {
  background-color: #0f172a;
}

.bg-slate-800 {
  background-color: #1e293b;
}

.bg-indigo-600 {
  background-color: #4f46e5;
}

.bg-red-500 {
  background-color: #ef4444;
}

.bg-green-500 {
  background-color: #22c55e;
}

/* Colors - Opacity variants (Original used color-mix/oklch) */
.bg-black\/20 {
  background-color: rgba(0, 0, 0, 0.2);
}

.bg-black\/80 {
  background-color: rgba(0, 0, 0, 0.8);
}

.bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.05);
}

.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1);
}

.bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.2);
}

.bg-green-500\/20 {
  background-color: rgba(34, 197, 94, 0.2);
}

.bg-red-500\/20 {
  background-color: rgba(239, 68, 68, 0.2);
}

.bg-indigo-500\/20 {
  background-color: rgba(99, 102, 241, 0.2);
}

.bg-slate-900\/95 {
  background-color: rgba(15, 23, 42, 0.95);
}

/* Colors - Text */
.text-white {
  color: #ffffff;
}

.text-black {
  color: #000000;
}

.text-gray-400 {
  color: #9ca3af;
}

.text-red-500 {
  color: #ef4444;
}

.text-green-500 {
  color: #22c55e;
}

.text-yellow-400 {
  color: #facc15;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Typography */
.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.capitalize {
  text-transform: capitalize;
}

.whitespace-nowrap {
  white-space: nowrap;
}

/* Borders */
.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-full {
  border-radius: 9999px;
}

.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-white {
  border-color: #ffffff;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.border-transparent {
  border-color: transparent;
}

/* Shadows */
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* Gradients (Simple Fallbacks) */
.bg-gradient-to-b {
  background: linear-gradient(to bottom, var(--tw-gradient-stops, #000, #000));
}

.bg-gradient-to-r {
  background: linear-gradient(to right, var(--tw-gradient-stops, #000, #000));
}

.bg-gradient-to-br {
  background: linear-gradient(to bottom right, var(--tw-gradient-stops, #000, #000));
}

/* Transitions */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specific Application Fixes */
.selection\:bg-fuchsia-500::selection {
  background-color: #d946ef;
}

.selection\:text-white::selection {
  color: #ffffff;
}

/* Scrollbar Hide */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* Additional Typography & Layout for Vanilla CSS Migration */
.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-base {
  font-size: 1rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-red-400 {
  color: #f87171;
}

.text-blue-400 {
  color: #60a5fa;
}

.text-purple-400 {
  color: #c084fc;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-70 {
  opacity: 0.7;
}

.opacity-90 {
  opacity: 0.9;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-8 {
  gap: 2rem;
}

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

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

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

.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.col-span-1 {
  grid-column: span 1 / span 1;
}

.col-span-2 {
  grid-column: span 2 / span 2;
}

.col-span-3 {
  grid-column: span 3 / span 3;
}

.col-span-4 {
  grid-column: span 4 / span 4;
}

.col-span-5 {
  grid-column: span 5 / span 5;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-3xl {
  border-radius: 1.5rem;
}

/* Component: List Screen Header */
.list-screen-header {
  height: 60px;
  background: linear-gradient(to right, #1e1b4b, #581c87);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 2px solid #a855f7;
  flex-shrink: 0;
  position: relative;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-brand span:first-child {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.brand-accent {
  color: #a855f7;
}

.screen-type-badge {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
}

.current-category-label {
  color: #ccc;
  font-size: 0.9rem;
}

.header-playlist-box {
  background: rgba(139, 92, 246, 0.2);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.9rem;
}

.playlist-highlight {
  color: #c084fc;
  font-weight: bold;
}

/* Component: Main Menu Screen */
.main-menu-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 20px;
  background: transparent;
}

/* Component: Content Grid Items */
.grid-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
  outline: none;
}

.grid-item:hover,
.grid-item:focus {
  transform: scale(1.05);
  z-index: 10;
}

.grid-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.grid-item-poster {
  aspect-ratio: 2/3;
  width: 100%;
  height: auto;
  min-height: 300px;
  /* Ensure minimum height for proper sizing */
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  background: #1e293b;
}

.grid-item-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* [FIX] Android TV does not trigger the proprietary JS lazy loader, rendering them permanently invisible 
     if left at opacity: 0. Removing opacity restriction so images naturally appear upon network resolution. */
  opacity: 1;
  transition: opacity 0.5s ease;
}

.poster-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 4rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.poster-placeholder::after {
  content: 'No Image';
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

.grid-item-rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.grid-item-rating-badge i {
  color: #fbbf24;
}

.grid-item-title-below {
  color: white;
  font-size: 0.9rem;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  min-height: 2.6rem;
}

/* Component: Footer & Bottom Bar Refinements */
.control-btn-centered {
  min-width: 180px;
  justify-content: center;
}

.footer-disclaimer {
  color: #ef4444;
  font-weight: bold;
}

/* Component: Modal System */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  /* backdrop-filter: blur(12px); [REMOVED FOR TIZEN HOLE-PUNCH] */
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-container {
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 24px;
  padding: 40px;
  width: 500px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.modal-icon-box {
  width: 80px;
  height: 80px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.modal-icon-box i {
  font-size: 2.5rem;
  color: #a855f7;
}

.modal-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: white;
}

.modal-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.1rem;
  margin-bottom: 35px;
}

.btn-modal-secondary {
  flex: 1;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
}

.btn-modal-primary {
  flex: 1;
  padding: 15px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  transition: all 0.2s;
  box-shadow: 0 10px 20px rgba(168, 85, 247, 0.3);
}

/* Premium Charging Screen (Smartest Player) */
.premium-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease-out;
}

.brand-logo-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.account-status-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px 30px;
  margin-bottom: 50px;
  text-align: center;
  /* backdrop-filter: blur(10px); [REMOVED FOR TIZEN HOLE-PUNCH] */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  min-width: 400px;
}

.loader-circle-box {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.premium-spinner {
  width: 100%;
  height: 100%;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #facc15;
  /* Yellow Accent */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.center-icon {
  position: absolute;
  font-size: 1.5rem;
  color: white;
  opacity: 0.8;
}

.loader-text {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Base Layout for Premium Loader */
.loading-overlay-base {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f172a;
  /* Dark Royal Blue/Black */
  z-index: 9999;
  display: flex;
  /* Flex is toggled by JS, but good default */
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* Utility: Hidden */
.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* --- GRID ITEM FAVORITES --- */
.grid-item-favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.3s ease;
}

.grid-item-favorite-btn i.favorite-heart {
  position: static;
  opacity: 1;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.5);
  transform: scale(1);
}

.grid-item-favorite-btn i.favorite-heart.active {
  color: #ef4444;
}

.favorite-heart.pulse-once {
  animation: heartPulse 0.4s ease-out;
}

@keyframes heartPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }

  100% {
    transform: scale(1);
  }
}

/* --- VOD SELECTION OVERLAY --- */
.grid-item:hover .grid-item-poster::after,
.grid-item:focus .grid-item-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0) 0%, rgba(168, 85, 247, 0.3) 100%);
  border: 4px solid #a855f7;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
  z-index: 4;
  pointer-events: none;
}

.grid-item:hover .grid-item-title-below,
.grid-item:focus .grid-item-title-below {
  color: #c084fc;
  font-weight: 800;
}

/* ==========================================================================
   MOBILE RESPONSIVE OVERRIDES (ADDED FOR PHONE/TABLET SUPPORT)
   These rules ONLY activate when body has the `is-mobile-device` class,
   which is set by scaling.js using touch+UA detection. 
   Android TVs and Fire Sticks will NEVER get this class.
   ========================================================================== */

/* ===== 0. GLOBAL FOUNDATION ===== */
body.is-mobile-device {
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  font-size: 15px !important;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body.is-mobile-device #app {
  width: 100vw !important;
  height: 100vh !important;
  position: relative !important;
  transform: none !important;
  left: 0 !important;
  top: 0 !important;
}

body.is-mobile-device .screen {
  width: 100% !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* ===== 1. SPLASH SCREEN ===== */
body.is-mobile-device #splashScreen {
  padding: 30px 20px !important;
  gap: 20px !important;
  justify-content: center !important;
  overflow: hidden !important;
}

body.is-mobile-device #splashScreen img[alt="Jelvi Player Logo"] {
  height: 40px !important;
  min-height: 40px !important;
}

body.is-mobile-device #splashScreen .jelvi-circle-loader {
  width: 80px !important;
  height: 80px !important;
  margin: 20px auto 20px !important;
}

body.is-mobile-device #splashScreen .jelvi-circle-loader img {
  height: 30px !important;
}

body.is-mobile-device #splashScreen #loadingStatus {
  font-size: 1.1rem !important;
}

body.is-mobile-device #splashScreen .footer-info {
  position: relative !important;
  bottom: auto !important;
  margin-top: auto !important;
  padding-bottom: 10px !important;
}

body.is-mobile-device #splashScreen .footer-info div {
  font-size: 0.85rem !important;
}

/* ===== 2. LOADING OVERLAY ===== */
body.is-mobile-device #loadingOverlay {
  padding: 20px !important;
}

body.is-mobile-device #loadingOverlay .brand-logo-loader img {
  height: 3rem !important;
}

body.is-mobile-device #loadingOverlay .jelvi-circle-loader {
  width: 70px !important;
  height: 70px !important;
}

body.is-mobile-device #loadingOverlay .loader-text {
  font-size: 1rem !important;
}

body.is-mobile-device #loadingOverlay #loadingProgressContainer {
  width: 80% !important;
  max-width: 250px !important;
}

body.is-mobile-device #loadingOverlay .playlist-status-card {
  width: 90% !important;
  max-width: 350px !important;
}

/* ===== 3. ACTIVATION SCREEN ===== */
body.is-mobile-device #activationScreen {
  padding: 20px 16px !important;
  overflow-y: auto !important;
}

body.is-mobile-device #activationScreen img[alt="Jelvi Player"] {
  height: 2.5rem !important;
}

body.is-mobile-device #activationScreen .act-alert {
  width: 60px !important;
  height: 60px !important;
  font-size: 28px !important;
  margin-bottom: 15px !important;
}

body.is-mobile-device #activationScreen .act-title {
  font-size: 1.4rem !important;
  margin-bottom: 8px !important;
}

body.is-mobile-device #activationScreen .act-desc {
  font-size: 0.95rem !important;
  max-width: 100% !important;
}

body.is-mobile-device #activationScreen .act-info-box {
  flex-direction: column !important;
  padding: 15px !important;
  gap: 15px !important;
  width: 100% !important;
  margin-bottom: 20px !important;
}

body.is-mobile-device #activationScreen .act-info-box>div[id="activationQrCode"] {
  margin-right: 0 !important;
  margin-bottom: 10px !important;
}

body.is-mobile-device #activationScreen .act-info-box div[style*="text-align: left"] {
  text-align: center !important;
}

body.is-mobile-device #activationScreen .act-info-box div[style*="font-size: 1.8rem"] {
  font-size: 0.9rem !important;
}

body.is-mobile-device #activationScreen .act-info-box div[style*="font-size: 2rem"] {
  font-size: 1rem !important;
}

body.is-mobile-device #activationScreen .act-info-box div[style*="font-size: 1.2rem"] {
  font-size: 0.75rem !important;
}

body.is-mobile-device #activationScreen .act-button {
  padding: 12px 20px !important;
  font-size: 0.9rem !important;
  margin-right: 8px !important;
}

body.is-mobile-device #activationScreen .footer-disclaimer {
  font-size: 0.8rem !important;
}

/* ===== 4. PLAYLIST SELECTION SCREEN ===== */
body.is-mobile-device #playlistSelectionScreen {
  padding: 20px !important;
}

body.is-mobile-device #playlistSelectionScreen .app-title img {
  height: 3rem !important;
}

body.is-mobile-device #playlistSelectionScreen div[style*="font-size: 1.8rem"] {
  font-size: 1.1rem !important;
  margin-bottom: 20px !important;
}

body.is-mobile-device #playlistSliderContainer {
  height: 250px !important;
}

/* ===== 5. MAIN MENU SCREEN (Inherits TV style for premium look on mobile) ===== */

/* ===== 6. CHANNEL LIST SCREEN ===== */
body.is-mobile-device #channelListScreen {
  overflow: hidden !important;
}

/* 6a. Top Header Bar */
body.is-mobile-device .list-screen-header {
  padding: 8px 12px !important;
  height: auto !important;
  min-height: 45px !important;
  flex-shrink: 0 !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

body.is-mobile-device .list-screen-header .header-brand {
  gap: 6px !important;
}

body.is-mobile-device .list-screen-header .header-brand img {
  height: 1.2rem !important;
}

body.is-mobile-device .screen-type-badge {
  font-size: 0.65rem !important;
  padding: 2px 6px !important;
}

body.is-mobile-device .current-category-label {
  font-size: 0.7rem !important;
}

body.is-mobile-device .header-info-card {
  display: none !important;
}

body.is-mobile-device .header-mode-label {
  font-size: 0.65rem !important;
  padding: 4px 10px !important;
}

/* 6b. Sidebar → Bottom Tab Bar */
body.is-mobile-device .sidebar-icons {
  width: 100% !important;
  height: 52px !important;
  flex-direction: row !important;
  justify-content: space-around !important;
  align-items: center !important;
  padding: 0 !important;
  padding-top: 0 !important;
  border-right: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 1000 !important;
  background: #0a0a0f !important;
  overflow-x: auto !important;
  gap: 0 !important;
}

body.is-mobile-device .sidebar-icons>div[style*="height: 1px"] {
  display: none !important;
}

body.is-mobile-device .side-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  font-size: 18px !important;
  flex-shrink: 0 !important;
  border-radius: 8px !important;
}

body.is-mobile-device .side-icon[style*="margin-top: auto"] {
  margin-top: 0 !important;
}

body.is-mobile-device .side-icon[style*="margin-top: 10px"],
body.is-mobile-device .side-icon[style*="margin-top: 20px"] {
  margin-top: 0 !important;
}

body.is-mobile-device .side-label {
  display: none !important;
}

/* 6c. Main Content Row */
body.is-mobile-device #mainContentRow {
  flex: 1 !important;
  position: relative !important;
  overflow: hidden !important;
  margin-bottom: 52px !important;
}

/* 6d. Categories Panel — Default Mobile (Movies/Series use this) */
body.is-mobile-device .categories-panel {
  width: 100% !important;
  height: 100% !important;
  border-right: none !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 10 !important;
  transition: transform 0.3s ease !important;
}

body.is-mobile-device .categories-panel .column-header {
  height: 44px !important;
  font-size: 0.95rem !important;
  padding: 0 12px !important;
}

body.is-mobile-device .cat-item {
  padding: 12px 16px !important;
  font-size: 0.9rem !important;
  margin-bottom: 2px !important;
  min-height: 44px !important;
}

body.is-mobile-device .cat-item.active {
  margin: 4px 8px !important;
  padding-left: 16px !important;
}

body.is-mobile-device #categorySearchInput {
  font-size: 0.95rem !important;
  padding: 10px 14px !important;
}

body.is-mobile-device .search-container.active {
  height: 60px !important;
}

/* 6e. Channels Panel — Default Mobile (Movies/Series use this) */
body.is-mobile-device .channels-panel {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 100% !important;
  z-index: 20 !important;
  background: #020617 !important;
  transition: transform 0.3s ease !important;
}

body.is-mobile-device #channelListScreen.show-channels .categories-panel {
  transform: translateX(-100%) !important;
}

body.is-mobile-device #channelListScreen.show-channels .channels-panel {
  transform: translateX(-100%) !important;
}

body.is-mobile-device .channels-panel .column-header {
  height: 44px !important;
  font-size: 0.95rem !important;
  padding: 0 12px !important;
}

body.is-mobile-device .channel-item {
  padding: 8px 10px !important;
  margin-bottom: 4px !important;
  gap: 10px !important;
  min-height: 50px !important;
}

body.is-mobile-device .channel-logo-container {
  width: 44px !important;
  height: 38px !important;
}

body.is-mobile-device .channel-logo-img {
  width: 32px !important;
  height: 32px !important;
}

body.is-mobile-device .channel-name {
  font-size: 0.85rem !important;
}

body.is-mobile-device .channel-num {
  font-size: 0.7rem !important;
}

/* Mobile back button in channel drawer */
body.is-mobile-device .mobile-back-btn {
  display: inline-block !important;
  font-size: 1.1rem !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
  min-width: 36px !important;
  min-height: 36px !important;
}

/* 6f. View Mode: Live (Preview + EPG area) */
body.is-mobile-device #viewModeLive {
  flex-direction: column !important;
}

body.is-mobile-device #previewPlayerContainer {
  width: 100% !important;
  height: 180px !important;
  min-height: 120px !important;
}

body.is-mobile-device #epgInfoArea {
  display: none !important;
}

/* ====================================================================
   6-GLOBAL. MOBILE SIDEBAR & CATEGORIES — All Sections
   Applied on all mobile screens (hide-epg-title)
   ==================================================================== */

body.hide-epg-title .sidebar-icons {
  width: 130px !important;
  gap: 6px !important;
}

body.hide-epg-title .side-icon {
  width: 100px !important;
  height: 100px !important;
  font-size: 2.4rem !important;
  border-radius: 18px !important;
}

body.hide-epg-title .side-label {
  font-size: 1.1rem !important;
}

body.hide-epg-title .categories-panel {
  width: 700px !important;
  flex-shrink: 0 !important;
}

body.hide-epg-title .categories-panel .column-header {
  height: 80px !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  padding: 0 20px !important;
}

body.hide-epg-title .cat-item {
  padding: 22px 26px !important;
  font-size: 2rem !important;
  min-height: 115px !important;
  margin-bottom: 6px !important;
  border-radius: 18px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* Mobile back button: stylish pill for all sections */
body.hide-epg-title .mobile-back-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2.2rem !important;
  min-width: 80px !important;
  min-height: 70px !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(244, 63, 94, 0.3)) !important;
  color: white !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.2s ease !important;
  margin-right: 10px !important;
}

body.hide-epg-title .mobile-back-btn:active {
  transform: scale(0.92) !important;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.5), rgba(244, 63, 94, 0.5)) !important;
}

/* Channels panel header & column-header bigger on mobile */
body.hide-epg-title .channels-panel .column-header {
  height: 80px !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  padding: 0 20px !important;
}

/* Series Detail: bigger seasons & episodes for mobile */
body.hide-epg-title .season-card {
  padding: 20px 24px !important;
  font-size: 1.8rem !important;
  min-height: 100px !important;
  margin-bottom: 6px !important;
  border-radius: 16px !important;
}

body.hide-epg-title .episode-card {
  padding: 18px 20px !important;
  font-size: 1.6rem !important;
  min-height: 90px !important;
  margin-bottom: 6px !important;
  border-radius: 16px !important;
  gap: 16px !important;
}

body.hide-epg-title .episode-card .episode-thumb,
body.hide-epg-title .episode-card img {
  width: 120px !important;
  height: 70px !important;
  border-radius: 10px !important;
}

body.hide-epg-title .episode-card .episode-title {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
}

body.hide-epg-title .episode-card .episode-info,
body.hide-epg-title .episode-card .episode-duration {
  font-size: 1.2rem !important;
}

/* ====================================================================
   6-LIVE. MOBILE DRILL-DOWN for Live TV & Catch Up
   Only active when JS adds .mobile-live-drilldown to #channelListScreen
   ==================================================================== */

/* Hide channels panel by default in drill-down mode */
body.hide-epg-title #channelListScreen.mobile-live-drilldown .channels-panel {
  display: none !important;
}

/* When show-channels is active: hide categories, show channels */
body.hide-epg-title #channelListScreen.mobile-live-drilldown.show-channels .categories-panel {
  display: none !important;
}

body.hide-epg-title #channelListScreen.mobile-live-drilldown.show-channels .channels-panel {
  display: flex !important;
  width: 700px !important;
  flex-shrink: 0 !important;
}

/* Bigger channel items in drill-down mode */
body.hide-epg-title #channelListScreen.mobile-live-drilldown .channel-item {
  padding: 20px 24px !important;
  min-height: 115px !important;
  gap: 22px !important;
  border-radius: 18px !important;
  margin-bottom: 6px !important;
}

body.hide-epg-title #channelListScreen.mobile-live-drilldown .channel-logo-container {
  width: 100px !important;
  height: 90px !important;
}

body.hide-epg-title #channelListScreen.mobile-live-drilldown .channel-logo-img {
  width: 80px !important;
  height: 80px !important;
}

body.hide-epg-title #channelListScreen.mobile-live-drilldown .channel-name {
  font-size: 2.2rem !important;
  font-weight: 600 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

body.hide-epg-title #channelListScreen.mobile-live-drilldown .channel-num {
  font-size: 1.6rem !important;
  min-width: 50px !important;
}



/* 6g. View Mode: Grid (Movies/Series) */
body.is-mobile-device #viewModeGrid {
  overflow-y: auto !important;
  padding-bottom: 20px !important;
}

body.is-mobile-device #contentGrid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
  gap: 10px !important;
  padding: 10px !important;
}

body.is-mobile-device .grid-item {
  width: 100% !important;
  margin: 0 !important;
}

body.is-mobile-device .grid-item-poster {
  width: 100% !important;
  aspect-ratio: 2/3 !important;
  height: auto !important;
}

body.is-mobile-device .grid-item-poster img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.is-mobile-device .grid-item-title-below {
  font-size: 0.7rem !important;
  padding: 4px 2px !important;
  line-height: 1.2 !important;
}

body.is-mobile-device .movie-card {
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}

body.is-mobile-device .poster-container {
  width: 100% !important;
  aspect-ratio: 2/3 !important;
  height: auto !important;
}

body.is-mobile-device .card-info {
  display: none !important;
}

/* ===== 7. DETAIL SCREENS (Movie + Series) ===== */
body.is-mobile-device #movieDetailScreen,
body.is-mobile-device #seriesDetailScreen {
  flex-direction: column !important;
  overflow-y: auto !important;
  height: 100vh !important;
  padding-bottom: 70px !important;
}

body.is-mobile-device #movieDetailScreen>div,
body.is-mobile-device #seriesDetailScreen>div {
  width: 100% !important;
  max-width: 100% !important;
}

/* Movie Detail Left (Player Area) */
body.is-mobile-device #movieDetailLeft,
body.is-mobile-device #seriesDetailLeft {
  width: 100% !important;
  height: 220px !important;
  min-height: 180px !important;
  flex-shrink: 0 !important;
}

body.is-mobile-device #moviePreviewPlayerContainer,
body.is-mobile-device #seriesPreviewPlayerContainer {
  width: 100% !important;
  height: 100% !important;
}

/* Movie Detail Right (Metadata) */
body.is-mobile-device #movieMetadataArea,
body.is-mobile-device #seriesDetailRight {
  width: 100% !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  padding: 12px 16px !important;
  overflow-y: visible !important;
}

body.is-mobile-device #seriesDetailRight {
  background-size: cover !important;
}

/* Series episode/season lists */
body.is-mobile-device .season-card {
  padding: 10px 12px !important;
  font-size: 0.9rem !important;
  min-height: 44px !important;
}

body.is-mobile-device .episode-card {
  padding: 10px 12px !important;
  font-size: 0.9rem !important;
  min-height: 44px !important;
}

/* Detail screen sidebar icons */
body.is-mobile-device #movieDetailLeft .side-icon,
body.is-mobile-device #seriesDetailLeft .side-icon {
  width: 40px !important;
  height: 40px !important;
  font-size: 16px !important;
}

/* ===== 8. VIDEO PLAYER & HUD ===== */
body.is-mobile-device #playerInternalHUD {
  bottom: 10px !important;
  width: 96% !important;
  left: 2% !important;
  padding: 8px !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  font-size: 0.8rem !important;
}

body.is-mobile-device #uhdLiveHUD,
body.is-mobile-device #uhdSeriesHUD {
  padding: 10px !important;
}

body.is-mobile-device #uhdLiveHUD button,
body.is-mobile-device #uhdSeriesHUD button {
  min-width: 44px !important;
  min-height: 44px !important;
  font-size: 1rem !important;
}

body.is-mobile-device #zapBanner {
  top: 10px !important;
  left: 10px !important;
  padding: 10px 16px !important;
  font-size: 0.8rem !important;
  border-radius: 10px !important;
}

body.is-mobile-device #zapBanner img {
  width: 36px !important;
  height: 36px !important;
}

/* ===== 9. SETTINGS OVERLAY (Two-column layout for TV + Mobile) ===== */
/* Inspired by Vivo Player: clean, readable, two-column where possible */

/* --- General restructured panel styles (all devices) --- */
.settings-panel[data-mobile-restructured="true"] {
  width: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  height: auto !important;
  border-radius: 24px !important;
  padding: 28px 32px !important;
  overflow: hidden !important;
  background: linear-gradient(145deg, #1a2332 0%, #0f1923 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important;
}

.settings-overlay:has(.settings-panel[data-mobile-restructured="true"]) {
  padding: 30px !important;
}

/* Legal content overlay touch scrolling */
#legalContentBody {
  -webkit-overflow-scrolling: touch !important;
  overflow-y: auto !important;
}

body.hide-epg-title .settings-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 9999 !important;
  background: rgba(0, 0, 0, 0.92) !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 30px !important;
  display: none !important;
}

body.hide-epg-title .settings-overlay.active {
  display: flex !important;
  z-index: 10000 !important;
}

body.hide-epg-title .settings-panel {
  width: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  height: auto !important;
  border-radius: 24px !important;
  padding: 28px 32px !important;
  overflow: hidden !important;
  background: linear-gradient(145deg, #1a2332 0%, #0f1923 100%) !important;
  border: 1px solid rgba(168, 85, 247, 0.2) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important;
}

body.hide-epg-title .settings-panel h2 {
  font-size: 2.2rem !important;
  margin-bottom: 16px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
}

body.hide-epg-title .settings-close-btn {
  font-size: 1.4rem !important;
  padding: 12px 26px !important;
  top: 22px !important;
  right: 24px !important;
  border-radius: 12px !important;
  background: rgba(244, 63, 94, 0.2) !important;
  border: 1px solid rgba(244, 63, 94, 0.3) !important;
}

/* Toggle rows: side by side in 2-column grid */
body.hide-epg-title .settings-row {
  padding: 14px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  flex-wrap: nowrap !important;
}

body.hide-epg-title .settings-row-label {
  font-size: 1.7rem !important;
  font-weight: 600 !important;
}

/* Hide toggle descriptions on mobile to save space */
body.hide-epg-title .settings-row>div[style*="width: 100%"] {
  display: none !important;
}

/* QR codes area: side by side, compact */
body.hide-epg-title .settings-panel>div[style*="justify-content: space-around"] {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  gap: 40px !important;
  margin-top: 14px !important;
  margin-bottom: 10px !important;
  padding: 16px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* QR code titles bigger */
body.hide-epg-title .settings-panel>div[style*="justify-content: space-around"]>div>div[style*="font-size: 1.3rem"] {
  font-size: 1.5rem !important;
  margin-bottom: 10px !important;
}

/* QR code URL text */
body.hide-epg-title .settings-panel>div[style*="justify-content: space-around"]>div>div[style*="font-size: 1.2rem"] {
  font-size: 1.3rem !important;
}

/* Smaller QR images to fit */
body.hide-epg-title .settings-panel canvas,
body.hide-epg-title .settings-panel>div[style*="justify-content: space-around"] img {
  width: 120px !important;
  height: 120px !important;
}

body.hide-epg-title .qr-card {
  padding: 10px !important;
}

body.hide-epg-title .qr-card canvas,
body.hide-epg-title .qr-card img {
  width: 120px !important;
  height: 120px !important;
}

/* Legal section: horizontal row */
body.hide-epg-title .settings-panel>div[style*="border-top"] {
  margin-top: 10px !important;
  padding-top: 10px !important;
}

body.hide-epg-title .legal-item {
  padding: 10px 0 !important;
}

body.hide-epg-title .legal-item .settings-row-label {
  font-size: 1.5rem !important;
}

/* Info overlay: bigger info text */
body.hide-epg-title .settings-panel>div[style*="margin: 10px"] {
  margin: 8px 0 !important;
  padding: 14px 20px !important;
}

body.hide-epg-title .settings-panel>div[style*="margin: 10px"] span[style*="font-size: 1.3rem"] {
  font-size: 1.5rem !important;
}

body.hide-epg-title .settings-panel>div[style*="margin: 10px"] span[style*="font-size: 1.4rem"] {
  font-size: 1.6rem !important;
}

/* Purchase panel: bigger subscription text */
body.hide-epg-title #purchaseOverlay .settings-panel>div[style*="text-align: center"] span[style*="font-size: 0.85rem"] {
  font-size: 1.3rem !important;
}

body.hide-epg-title #purchaseOverlay .settings-panel>div[style*="text-align: center"] div[style*="font-size: 1.3rem"] {
  font-size: 1.8rem !important;
}

body.hide-epg-title #purchaseOverlay .settings-panel>div[style*="background: rgba(15, 23, 42"] {
  padding: 14px !important;
  margin-top: 10px !important;
}

body.hide-epg-title #purchaseOverlay .settings-panel>div[style*="background: rgba(15, 23, 42"] div[style*="font-size: 0.95rem"] {
  font-size: 1.4rem !important;
}

/* Open Website buttons: bigger on mobile */
body.hide-epg-title .qr-open-website-btn {
  display: inline-flex !important;
  font-size: 1.3rem !important;
  padding: 10px 20px !important;
  margin-top: 10px !important;
}

/* In-App Browser Overlay (mobile only) */
#inAppBrowser {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483647;
  background: #0f0a1e;
  flex-direction: column;
}

#inAppBrowser.open {
  display: flex;
}

#inAppBrowser .iab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1a1145, #0f0a1e);
  border-bottom: 2px solid rgba(244, 63, 94, 0.3);
  flex-shrink: 0;
}

#inAppBrowser .iab-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin: 0 20px;
}

#inAppBrowser .iab-close {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.3), rgba(168, 85, 247, 0.3));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
}

#inAppBrowser iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: white;
}

/* Open Website button under QR codes (cross-platform) */
.qr-open-website-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(244, 63, 94, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.qr-open-website-btn:active {
  transform: scale(0.95);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.5), rgba(244, 63, 94, 0.5));
}

body.is-mobile-device .settings-panel {
  width: 100% !important;
  max-width: 100% !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  padding: 16px !important;
  overflow-y: auto !important;
}

body.is-mobile-device .settings-panel h2 {
  font-size: 1.3rem !important;
  margin-bottom: 12px !important;
}

body.is-mobile-device .settings-close-btn {
  font-size: 0.9rem !important;
  padding: 8px 16px !important;
  top: 12px !important;
  right: 12px !important;
}

body.is-mobile-device .settings-row {
  padding: 12px 0 !important;
}

body.is-mobile-device .settings-row-label {
  font-size: 0.9rem !important;
}

body.is-mobile-device .toggle-switch {
  min-width: 48px !important;
  min-height: 28px !important;
}

/* Hide mobile-only search back btn by default (TV) */
.mobile-only-back-btn {
  display: none !important;
}

body.hide-epg-title .mobile-only-back-btn {
  display: flex !important;
}

/* ===== 10. SEARCH OVERLAY ===== */
body.is-mobile-device #smartSearchOverlay {
  padding: 10px !important;
}

body.is-mobile-device #smartSearchOverlay input {
  font-size: 1rem !important;
  padding: 10px 14px !important;
}

body.is-mobile-device #searchKeyboard {
  width: 100% !important;
  padding: 10px !important;
  gap: 8px !important;
}

body.is-mobile-device #searchKeyboard>div {
  gap: 6px !important;
}

body.is-mobile-device .kb-key {
  height: 65px !important;
  min-width: 0 !important;
  font-size: 1.6rem !important;
  border-radius: 8px !important;
  flex: 1 !important;
}

body.is-mobile-device .kb-key.special {
  font-size: 1.3rem !important;
}

body.is-mobile-device #smartSearchResults {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
  gap: 10px !important;
}

/* ===== 11. EXIT DIALOG ===== */

/* ===== 12. MAINTENANCE & NOTIFICATION MODALS ===== */
body.is-mobile-device #maintenanceScreen h2 {
  font-size: 1.5rem !important;
}

body.is-mobile-device #maintenanceScreen p {
  font-size: 0.9rem !important;
}

body.is-mobile-device #maintenanceIcon {
  font-size: 3rem !important;
}

body.is-mobile-device #globalNotifContent {
  width: 90% !important;
  padding: 20px !important;
}

body.is-mobile-device #globalNotifTitle {
  font-size: 1.3rem !important;
}

body.is-mobile-device #globalNotifMessage {
  font-size: 0.9rem !important;
}

/* ===== 13. GLOBAL SCROLL LOCK OVERRIDE ===== */
/* On mobile, allow natural touch scrolling inside panels */
body.is-mobile-device #categoryContainer,
body.is-mobile-device #channelContainer,
body.is-mobile-device #contentGrid,
body.is-mobile-device #viewModeGrid,
body.is-mobile-device .settings-panel {
  -webkit-overflow-scrolling: touch !important;
  overflow-y: auto !important;
}

/* ===== 14. TOUCH TARGET MINIMUM SIZES ===== */
body.is-mobile-device .focusable,
body.is-mobile-device [tabindex] {
  min-height: 40px !important;
}

body.is-mobile-device .cat-item,
body.is-mobile-device .channel-item,
body.is-mobile-device .side-icon,
body.is-mobile-device .control-btn,
body.is-mobile-device .act-button {
  cursor: pointer !important;
  -webkit-tap-highlight-color: rgba(168, 85, 247, 0.3) !important;
}

/* Disable TV-specific focus animations that look janky on touch */
body.is-mobile-device .side-icon.focusable:focus {
  animation: none !important;
}

body.is-mobile-device .tile:focus {
  transform: none !important;
}

/* ==========================================================================
   END MOBILE RESPONSIVE OVERRIDES
   ========================================================================== */

/* --- SERIES DETAIL UI ENHANCEMENTS --- */
.season-card,
.episode-card {
  transition: all 0.2s ease !important;
}

.season-card:hover,
.season-card:focus,
.episode-card:hover,
.episode-card:focus {
  background: rgba(168, 85, 247, 0.3) !important;
  border: 1.5px solid #a855f7 !important;
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
  outline: none !important;
}

.season-card.active {
  background: rgba(168, 85, 247, 0.45) !important;
  border: 1.5px solid #a855f7 !important;
}

.episode-card.active {
  background: rgba(168, 85, 247, 0.15) !important;
  border-left: 4px solid #a855f7 !important;
}

/* --- MOVIE DETAIL ENHANCEMENTS --- */
#movieBackdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.1) 100%);
  pointer-events: none;
}

#moviePlayBtn:focus {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.6) !important;
  border: 1px solid white !important;
}

#movieDescriptionBox:focus {
  background: rgba(168, 85, 247, 0.1) !important;
  border: 1.5px solid #a855f7 !important;
  transform: none !important;
}

#moviePreviewPlayerContainer:focus {
  border-color: #facc15 !important;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
}

/* --- ROBUST PREVIEW PLAYER LOADER --- */
.preview-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 17, 32, 0.98);
  z-index: 1000;
  display: none;
  /* Toggled to 'flex' by JS */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.loader-label {
  color: #a855f7;
  font-weight: 900;
  font-size: 2.8rem;
  text-transform: uppercase;
  letter-spacing: 10px;
  animation: connecting-pulse 1.2s infinite ease-in-out;
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.7);
  text-align: center;
  margin: 0;
}

.circular-progress-container {
  width: 180px;
  height: 180px;
  display: none;
  /* Toggled to 'flex' by JS */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.3s;
}

.progress-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 0 15px rgba(168, 85, 247, 0.8);
}

@keyframes connecting-pulse {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

.hidden-state {
  display: none !important;
}

/* ==================== */
/* VOD Card Spinner     */
/* ==================== */
.card-spinner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1000;
  backdrop-filter: blur(2px);
  border-radius: inherit;
  /* Inherit from poster */
}

/* Global Navigation Lock */
body.nav-locked .grid-item,
body.nav-locked .category-item,
body.nav-locked .nav-item {
  pointer-events: none !important;
  opacity: 0.7;
  /* Visual feedback for locked state */
}

/* Spinner Animation */
.premium-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Lock ultra-wide screens to original 16:9 player dimensions */
@media screen and (min-aspect-ratio: 19/9) {

  /* Allow BOTH the Categories and Channels panels to expand flexibly ONLY in LIVE TV across the varying excess horizontal space */
  body.hide-epg-title #channelListScreen.mobile-live-drilldown.show-channels .channels-panel,
  body.hide-epg-title #channelListScreen.mobile-live-drilldown .categories-panel {
    width: auto !important;
    flex: 1 1 auto !important;
  }

  /* Clamp the Player+EPG right-side column to EXACTLY 1090px, restoring perfect 16:9 vertical heights */
  body.hide-epg-title #channelListScreen.mobile-live-drilldown.show-channels #viewModeLive>div:last-child,
  body.hide-epg-title #viewModeLive>div:last-child {
    flex: 0 0 1090px !important;
    max-width: 1090px !important;
    width: 1090px !important;
  }
}

/* ==============================================
   MOBILE EXCLUSIVE: MAIN MENU 
   (Uses .hide-epg-title as scaling.js adds it on mobile)
   ============================================== */

/* Distribute the grid to fill more width and add larger gaps */
body.hide-epg-title #mainMenuScreen .tile-grid {
  padding: 0 50px !important;
  gap: 50px !important;
}

/* Dynamically expand each tile but cap the maximum stretch */
body.hide-epg-title #mainMenuScreen .tile-card {
  flex: 1 1 0 !important;
  width: auto !important;
  height: 330px !important;
  margin: 0 !important;
  max-width: 450px !important;
}

/* Larger interior icon */
body.hide-epg-title #mainMenuScreen .tile-card .tile-icon {
  font-size: 4rem !important;
  margin-bottom: 20px !important;
}

/* Larger interior label */
body.hide-epg-title #mainMenuScreen .tile-card .tile-label {
  font-size: 1.6rem !important;
}

/* Tweak bottom bar buttons to be meatier and spaced out */
body.hide-epg-title #mainMenuScreen .bottom-bar {
  gap: 30px !important;
}

body.hide-epg-title #mainMenuScreen .control-btn,
body.hide-epg-title #mainMenuScreen #menuPurchaseBtn {
  padding: 30px 45px !important;
  font-size: 1.8rem !important;
  border-radius: 16px !important;
}

body.hide-epg-title #mainMenuScreen .control-btn i,
body.hide-epg-title #mainMenuScreen #menuPurchaseBtn i {
  font-size: 2rem !important;
  margin-right: 18px !important;
}

/* ==============================================
   MOBILE EXCLUSIVE: SERIES DETAIL SCREENS (ULTRA-WIDE STRETCH)
   ============================================== */
/* Increase poster column width */
body.hide-epg-title #seriesDetailScreen>div:nth-child(3)>div:nth-child(2) {
  width: 420px !important;
}

/* Stretch episodes column to completely eat any remaining horizontal dead space */
body.hide-epg-title #seriesDetailScreen>div:nth-child(3)>div:nth-child(3) {
  width: auto !important;
  flex: 1 1 auto !important;
}

/* ==============================================
   MOBILE EXCLUSIVE: MASSIVE LOADING & SPLASH SCALING
   ============================================== */
/* Splash Screen Logo */
body.hide-epg-title #splashScreen img[alt="Jelvi Player Logo"] {
  height: 8rem !important;
  min-height: 90px !important;
}

/* Loading Overlay Logo (Keep it smaller) */
body.hide-epg-title #loadingOverlay .brand-logo-loader img {
  height: 6rem !important;
}

/* Generic Circular Loaders (Loading Overlay, etc - Smaller) */
body.hide-epg-title .jelvi-circle-loader {
  width: 130px !important;
  height: 130px !important;
  margin: 30px auto !important;
}

body.hide-epg-title .jelvi-spinning-circle {
  border-width: 6px !important;
}

body.hide-epg-title .jelvi-circle-loader img {
  height: 45px !important;
}

/* Splash Screen Exclusive Circular Loader (Bigger) */
body.hide-epg-title #splashScreen .jelvi-circle-loader {
  width: 220px !important;
  height: 220px !important;
  margin: 50px auto !important;
}

body.hide-epg-title #splashScreen .jelvi-spinning-circle {
  border-width: 8px !important;
}

body.hide-epg-title #splashScreen .jelvi-circle-loader img {
  height: 70px !important;
}

/* Fix Splash Screen ID overlap by restoring regular document flow */
body.hide-epg-title #splashScreen .footer-info {
  position: relative !important;
  bottom: auto !important;
  margin-top: 30px !important;
  padding-bottom: 20px !important;
  z-index: 100 !important;
}

/* Search Screen Loader (Search Icon + Start typing text) */
body.hide-epg-title #searchResultsContainer i.fa-search {
  font-size: 15rem !important;
  margin-bottom: 60px !important;
}

body.hide-epg-title #searchResultsContainer div {
  font-size: 3.5rem !important;
  margin-top: 30px !important;
}

body.hide-epg-title #searchHint {
  font-size: 1.5rem !important;
}

body.hide-epg-title #searchInputDisplay {
  min-height: 80px !important;
}

/* Loading Text & Status */
body.hide-epg-title #loadingStatus,
body.hide-epg-title #loadingOverlayText,
body.hide-epg-title .jelvi-loader-text,
body.hide-epg-title .loader-label {
  font-size: 3rem !important;
  margin-top: 40px !important;
}

/* Video Preview Circular Progress SVG (Fetching movies/series) */
body.hide-epg-title .circular-progress-container svg.progress-ring {
  transform: scale(2.5) !important;
  transform-origin: center !important;
  margin: 60px !important;
}

body.hide-epg-title .circular-progress-container .progress-percentage {
  font-size: 3rem !important;
}

/* Progress bar width boost for loading screen */
body.hide-epg-title #loadingProgressContainer {
  width: 600px !important;
  height: 12px !important;
  border-radius: 6px !important;
}

body.hide-epg-title #loadingProgressText {
  font-size: 2rem !important;
}

/* ==============================================
   RESPONSIVE: FIX MAIN MENU BOTTOM BAR OVERFLOW ON SMALL SCREENS
   ============================================== */
@media screen and (max-width: 1024px) {

  /* Scale down the massive buttons on actual phone screens so they fit and wrap if needed */
  body.hide-epg-title #mainMenuScreen .bottom-bar {
    gap: 10px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  body.hide-epg-title #mainMenuScreen .control-btn,
  body.hide-epg-title #mainMenuScreen #menuPurchaseBtn {
    padding: 12px 18px !important;
    font-size: 1.1rem !important;
    border-radius: 12px !important;
    flex: 0 1 auto !important;
  }

  body.hide-epg-title #mainMenuScreen .control-btn i,
  body.hide-epg-title #mainMenuScreen #menuPurchaseBtn i {
    font-size: 1.2rem !important;
    margin-right: 8px !important;
  }
}