/**
 * SANSAT PLAYER PRO — APPLE TV LUXURY DESIGN SYSTEM (V3.0)
 * Theme: Obsidian Deep Black (#000000 / #050508), Apple Frosted Glass Acrylic, Pure High-Contrast White (#ffffff)
 * Full Responsive Dual Engine: 10-foot TV Spatial Remote + Touch Mobile-First (Portrait & Landscape)
 */

:root {
  --bg-dark: #000000;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.12);
  --bg-surface: #0a0a0f;
  --bg-pill: rgba(255, 255, 255, 0.07);

  --apple-white: #ffffff;
  --apple-black: #000000;
  --apple-blue: #0a84ff;
  --apple-glow: rgba(255, 255, 255, 0.28);

  --primary-red: #ffffff;
  --primary-red-hover: rgba(255, 255, 255, 0.85);
  --primary-red-glow: rgba(255, 255, 255, 0.25);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-muted: rgba(255, 255, 255, 0.45);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #ffffff;

  --status-active: #30d158;
  --status-error: #ff453a;

  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* =========================================================
   FOCUS & NAVIGATION (APPLE TV SPOTLIGHT)
========================================================= */
:focus,
.nav-focused,
.focusable:focus {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.35) !important;
  z-index: 10;
}

/* =========================================================
   1. SPLASH SCREEN (APPLE MINIMALIST)
========================================================= */
.splash-screen {
  position: fixed;
  inset: 0;
  background-color: #000000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-glow-aura {
  position: absolute;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: splashPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes splashPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.9; }
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.splash-logo-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.splash-logo-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
}

.splash-logo-icon svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

.splash-brand {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.splash-brand span {
  color: rgba(255, 255, 255, 0.65);
}

.splash-loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

.splash-loader-progress {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  animation: splashSlide 1.2s infinite ease-in-out;
}

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

.splash-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* =========================================================
   2. TOP NAVIGATION HEADER (APPLE TV FROSTED GLASS)
========================================================= */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 28px;
  background: rgba(10, 10, 15, 0.78);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.header-logo-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.header-logo-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.header-logo-title span {
  color: rgba(255, 255, 255, 0.65);
}

.header-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.header-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.header-pill svg {
  background: transparent;
  padding: 0;
  width: 16px;
  height: 16px;
  color: inherit;
  flex-shrink: 0;
  border: none;
}

.header-pill span {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  background: transparent;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.header-pill:hover,
.header-pill.nav-focused {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.header-pill.active {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25) !important;
}

.header-pill.active svg,
.header-pill.active span {
  color: #000000 !important;
  stroke: #000000 !important;
}

.header-right-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-icon-btn:hover,
.header-icon-btn.nav-focused {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* =========================================================
   3. MAIN DASHBOARD (HOME SCREEN)
========================================================= */
.dashboard-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 32px;
  height: calc(100vh - 68px);
  overflow-y: auto;
}

.hero-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  flex: 1;
  align-items: center;
  max-height: 480px;
  margin: auto 0;
  width: 100%;
}

.hero-card {
  height: 100%;
  max-height: 440px;
  min-height: 320px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(18, 19, 26, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.hero-card:hover,
.hero-card.nav-focused {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, rgba(32, 34, 46, 0.85) 100%);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.75), 0 0 28px rgba(255, 255, 255, 0.2);
  transform: translateY(-6px) scale(1.03);
}

.hero-card-icon {
  width: 88px;
  height: 88px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-card-icon svg {
  width: 80px;
  height: 80px;
  stroke: #ffffff;
  stroke-width: 1.8;
}

.hero-card-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

/* Dashboard Bottom Status Bar */
.dashboard-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  margin-top: 16px;
}

.bottom-pill-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.bottom-pill-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bottom-pill-val {
  color: #fff;
  font-weight: 700;
}

.bottom-pill-box .label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.bottom-pill-box .val {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.bottom-pill-box .val-red {
  color: #ffffff;
  font-weight: 800;
}

.bottom-center-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

.bottom-center-info .playlist-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.2px;
  text-align: center;
}

.bottom-center-info .days-remaining {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
}

.bottom-weather-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.weather-city {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.weather-clock {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* =========================================================
   4. CHANNELS, VOD, AND SERIES SHARED LAYOUT
========================================================= */
.channels-layout {
  display: flex;
  width: 100%;
  height: calc(100vh - 68px);
  overflow: hidden;
}

.groups-sidebar {
  width: 260px;
  background: rgba(12, 13, 18, 0.75);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  gap: 5px;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.group-item {
  font-family: inherit;
  padding: 10px 14px;
  min-height: 42px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.1px;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.group-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.group-item.active {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25) !important;
  border-color: #ffffff !important;
}

.group-item:focus,
.group-item.nav-focused {
  outline: 2px solid #ffffff !important;
  outline-offset: -1px !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.3) !important;
}

.channels-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
  overflow: hidden;
}

.channels-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
}

.channels-count-badge {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

/* =========================================================
   5. LIVE TV CHANNELS LIST ITEMS (APPLE TV STYLE)
========================================================= */
.channels-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-card-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  gap: 16px;
}

.channel-card-row:hover,
.channel-card-row.focused {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  transform: translateX(4px);
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25) !important;
}

.channel-card-row:hover .channel-name-txt,
.channel-card-row.focused .channel-name-txt {
  color: #000000 !important;
}

.channel-card-row:hover .channel-num-badge,
.channel-card-row.focused .channel-num-badge {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #000000 !important;
}

.channel-num-badge {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  min-width: 38px;
  text-align: center;
}

.channel-logo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.channel-logo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.channel-info-box {
  flex: 1;
  overflow: hidden;
}

.channel-name-txt {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-group-tag {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   6. VOD & SERIES MOVIE POSTER CARDS (APPLE TV POSTERS)
========================================================= */
.media-posters-grid {
  flex: 1 1 0px !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain !important;
  padding: 24px;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  gap: 20px;
}

.movie-poster-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  min-height: 240px;
  height: auto !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  flex-shrink: 0 !important;
}

.movie-poster-card:hover,
.movie-poster-card.focused,
.movie-poster-card.nav-focused {
  border-color: rgba(255, 255, 255, 0.8) !important;
  transform: translateY(-5px) scale(1.04) !important;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 255, 255, 0.25) !important;
  z-index: 10;
}

.movie-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.movie-poster-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  background: linear-gradient(135deg, #12131c, #1a1c29);
  z-index: 0;
}

.movie-poster-placeholder svg {
  width: 36px;
  height: 36px;
  opacity: 0.35;
  margin-bottom: 6px;
}

.movie-poster-scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 10px 8px;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 7, 10, 0.95) 90%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.movie-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.movie-card-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   7. SETTINGS SCREEN
========================================================= */
.settings-screen-wrapper {
  padding: 24px 32px;
  height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg-dark);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.settings-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-back-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.settings-columns-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  flex: 1;
}

.settings-categories-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(12, 13, 18, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  height: fit-content;
}

.settings-cat-item {
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-cat-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.settings-cat-item.active {
  background: #ffffff !important;
  color: #000000 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25) !important;
}

.settings-options-col {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-option-item {
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.settings-option-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.settings-option-item.selected {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* =========================================================
   8. VIDEO PLAYER FULLSCREEN & OSD
========================================================= */
.player-container {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 100;
  overflow: hidden;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Modern Luxury Player OSD */
.player-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 19, 28, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.player-back-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: scale(1.04);
}

.player-status-indicator {
  position: absolute;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 104;
  background: rgba(14, 15, 22, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  transition: opacity 0.3s;
}

.player-center-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(18, 19, 28, 0.85);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 101;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-center-indicator.flash {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* TOP OSD BAR */
.player-osd-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(7, 7, 10, 0.95) 0%, rgba(7, 7, 10, 0.6) 60%, transparent 100%);
  z-index: 103;
  transition: opacity 0.35s, transform 0.35s;
}

.player-osd-top.hidden {
  opacity: 0;
  transform: translateY(-24px);
  pointer-events: none;
}

.player-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-top-center {
  flex: 1;
  text-align: center;
  max-width: 60%;
  padding: 0 16px;
}

.player-media-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.player-media-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-badge-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.player-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e50914;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.4);
}

.player-live-dot {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: livePulse 1.2s infinite ease-in-out;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* BOTTOM OSD BAR */
.player-osd-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(0deg, rgba(7, 7, 10, 0.98) 0%, rgba(7, 7, 10, 0.7) 65%, transparent 100%);
  z-index: 103;
  transition: opacity 0.35s, transform 0.35s;
}

.player-osd-bottom.hidden {
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
}

/* TIMELINE SEEKER */
.player-timeline-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.player-time-txt {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #ddd;
  min-width: 50px;
  text-align: center;
}

.player-seeker-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: height 0.15s;
}

.player-seeker-track:hover {
  height: 9px;
}

.player-seeker-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 6px;
  width: 0%;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.player-seeker-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #ffffff;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.15s;
}

.player-seeker-track:hover .player-seeker-thumb {
  opacity: 1;
}

/* CONTROLS ROW */
.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.player-btn-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-ctrl-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-ctrl-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.4);
}

.player-ctrl-btn.btn-play-pause {
  width: 48px;
  height: 48px;
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.35);
}

.player-ctrl-btn.btn-play-pause svg {
  fill: #000000;
  stroke: #000000;
}

.player-ctrl-btn.btn-play-pause:hover {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.88);
}

/* =========================================================
   8. PLAYLISTS & ACTIVATION SCREEN (APPLE TV FROSTED CARDS)
========================================================= */
.playlists-screen-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 20px 60px 20px;
  overflow-y: auto;
  min-height: 100%;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.05) 0%, transparent 60%), #000000;
}

.playlists-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1480px;
  margin-bottom: 28px;
}

.playlists-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.playlists-device-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  font-size: 13px;
}

.playlists-device-info .mac-row {
  color: var(--text-secondary);
  font-family: monospace;
}

.playlists-device-info .key-row {
  color: var(--text-secondary);
}

.playlists-device-info .highlight-red {
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}

.playlists-empty-box {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  padding: 52px 44px;
  max-width: 740px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.playlists-empty-icon {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #ffffff;
}

.playlists-empty-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.playlists-empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 480px;
}

.playlists-credentials-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.playlists-cred-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.playlists-cred-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.playlists-cred-value {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  font-family: monospace;
}

.playlists-cred-value.cred-key {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.playlists-upload-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 20px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.playlists-upload-link:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: translateY(-2px);
}

.playlists-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
}

.playlists-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.02);
}

.playlists-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  width: 100%;
  max-width: 1480px;
  margin: 10px 0 30px 0;
}

.playlist-select-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.playlist-select-card:hover,
.playlist-select-card.focused {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.25) !important;
}

.playlist-select-card:hover .playlist-card-title,
.playlist-select-card.focused .playlist-card-title {
  color: #000000 !important;
}

.playlist-select-card:hover .playlist-badge-type,
.playlist-select-card.focused .playlist-badge-type {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #000000 !important;
}

.playlist-card-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.playlist-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.playlist-badge-type {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

.playlists-footer-disclaimer {
  max-width: 700px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.playlists-footer-disclaimer a {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* =========================================================
   9. MOBILE & PORTRAIT RESPONSIVENESS (MOBILE FIRST FIX)
========================================================= */
@media (max-width: 768px), (orientation: portrait) {
  html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #app {
    height: auto !important;
    min-height: 100dvh !important;
    min-height: -webkit-fill-available !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  .app-main {
    flex: 1 0 auto !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  .app-header {
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    padding: 0 12px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(0, 0, 0, 0.92) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    gap: 6px !important;
  }

  .header-left {
    flex: 0 0 auto !important;
    width: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .header-logo {
    gap: 6px !important;
  }

  .header-logo-badge {
    padding: 2px 6px !important;
    font-size: 10px !important;
  }

  .header-logo-title {
    font-size: 15px !important;
  }

  .header-separator {
    display: none !important;
  }

  .header-nav-pills {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    overflow: visible !important;
    max-width: none !important;
  }

  /* ON MOBILE: USE CLEAN ICON BUTTONS ONLY - HIDE TEXT LABELS */
  .header-pill span {
    display: none !important;
  }

  .header-pill {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    flex-shrink: 0 !important;
  }

  .header-pill svg {
    width: 17px !important;
    height: 17px !important;
    stroke: currentColor !important;
  }

  .header-pill.active {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3) !important;
  }

  .header-pill.active svg {
    stroke: #000000 !important;
    color: #000000 !important;
  }

  .header-right-icons {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .header-icon-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .header-icon-btn svg {
    width: 17px !important;
    height: 17px !important;
  }

  .header-icon-btn:hover,
  .header-icon-btn.nav-focused {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
  }

  .dashboard-screen {
    padding: 14px 16px 24px;
    height: auto;
    min-height: calc(100vh - 58px);
    overflow-y: auto;
  }

  /* 2x2 Grid for Mobile Hero Cards */
  .hero-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
    max-height: none;
    margin: 12px 0 16px;
  }

  .hero-card {
    height: 135px;
    min-height: 135px;
    max-height: 135px;
    padding: 12px;
    border-radius: 16px;
  }

  .hero-card-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
  }

  .hero-card-icon svg {
    width: 38px;
    height: 38px;
  }

  .hero-card-title {
    font-size: 15px;
    font-weight: 700;
  }

  .dashboard-bottom-bar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .bottom-center-info {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin: 8px auto !important;
  }

  .bottom-center-info .playlist-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-align: center !important;
    width: 100% !important;
  }

  .bottom-center-info .days-remaining {
    font-size: 12.5px !important;
    font-weight: 800 !important;
    color: var(--text-muted) !important;
    text-align: center !important;
    width: 100% !important;
  }

  /* CHANNELS, VOD, AND SERIES ON MOBILE: CHIPS BAR + FULL WIDTH */
  .channels-layout {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 58px) !important;
    height: calc(100vh - 58px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .groups-sidebar {
    width: 100% !important;
    height: auto !important;
    max-height: 52px !important;
    min-height: 48px !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 8px 12px !important;
    gap: 8px !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    flex-shrink: 0 !important;
  }

  .group-item {
    padding: 7px 16px !important;
    font-size: 13px !important;
    border-radius: 20px !important;
    flex-shrink: 0 !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.75) !important;
  }

  .group-item.active {
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25) !important;
    border-color: #ffffff !important;
  }

  .sidebar-title {
    display: none !important;
  }

  .channels-main {
    flex: 1 1 0px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .channels-toolbar {
    padding: 10px 14px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
  }

  .search-input {
    width: 100% !important;
    max-width: none !important;
  }

  .channels-list-container {
    padding: 10px 14px !important;
    flex: 1 1 0px !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .channel-card-row {
    padding: 10px 14px !important;
    gap: 12px !important;
  }

  /* 3-Column Poster Grid on Mobile: NEVER SQUASHED, FULL 2:3 RATIO */
  .media-posters-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    gap: 10px !important;
    padding: 12px 10px 120px 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
    flex: 1 1 0px !important;
    min-height: 0 !important;
  }

  .movie-poster-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    aspect-ratio: 2 / 3 !important;
    min-height: 140px !important;
    height: auto !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
  }

  .movie-card-title {
    font-size: 11px !important;
  }

  .movie-card-sub {
    font-size: 9px !important;
  }

  /* Settings Mobile */
  .settings-screen-wrapper {
    padding: 16px !important;
  }

  .settings-columns-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Player Mobile Portrait OSD: Floating Glass Card */
  .player-osd-bottom {
    position: absolute !important;
    bottom: max(24px, env(safe-area-inset-bottom, 24px)) !important;
    left: 14px !important;
    right: 14px !important;
    padding: 14px 18px !important;
    background: rgba(12, 13, 20, 0.9) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8) !important;
    gap: 10px !important;
  }

  .player-back-btn {
    top: 16px !important;
    left: 16px !important;
    padding: 8px 16px !important;
  }

  /* Playlists Mobile */
  .playlists-screen-wrapper {
    padding: 24px 16px 120px 16px !important;
    min-height: 100dvh !important;
    min-height: -webkit-fill-available !important;
    height: auto !important;
    justify-content: flex-start !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .playlists-top-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .playlists-device-info {
    text-align: left !important;
  }

  .playlists-empty-box {
    margin: 10px auto 24px auto !important;
    padding: 28px 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .playlists-credentials-box {
    flex-direction: column !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .playlists-cards-container {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================
   10. MOBILE LANDSCAPE RESPONSIVENESS (IPHONE / ANDROID)
   Ensures entire UI fits 100% in viewport height without vertical scrolling
   Matching IBO Player layout reference (media_1792456449591_321bc7c4)
========================================================= */
@media (orientation: landscape) and (max-height: 550px), (max-height: 500px) {
  html, body {
    overflow: hidden !important;
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }

  #app {
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .app-main {
    flex: 1 1 0px !important;
    min-height: 0 !important;
    height: calc(100vh - 44px) !important;
    height: calc(100dvh - 44px) !important;
    overflow: hidden !important;
  }

  /* Slim 44px Header in Landscape */
  .app-header {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 16px !important;
    background: rgba(10, 11, 16, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .header-logo-title {
    font-size: 15px !important;
  }

  .header-logo-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .header-nav-pills {
    display: flex !important;
    gap: 8px !important;
  }

  .header-pill {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    border-radius: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .header-pill svg {
    width: 14px !important;
    height: 14px !important;
  }

  .header-pill span {
    display: inline !important;
  }

  .header-right-icons {
    display: flex !important;
    gap: 6px !important;
  }

  .header-icon-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }

  .header-icon-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* 2. Dashboard: 100% Fits in Screen Height - No Scroll */
  .dashboard-screen {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    padding: 4px 16px 6px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .hero-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    flex: 1 1 auto !important;
    max-height: 185px !important;
    align-items: stretch !important;
    margin: auto 0 !important;
    width: 100% !important;
  }

  .hero-card {
    height: 100% !important;
    max-height: 175px !important;
    min-height: 120px !important;
    padding: 8px 6px !important;
    border-radius: 16px !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(18, 19, 26, 0.75) 100%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  }

  .hero-card:hover,
  .hero-card.nav-focused {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, rgba(32, 34, 46, 0.85) 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
  }

  .hero-card-icon {
    width: 44px !important;
    height: 44px !important;
    margin-bottom: 6px !important;
  }

  .hero-card-icon svg {
    width: 36px !important;
    height: 36px !important;
  }

  .hero-card-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
    text-align: center !important;
  }

  /* 3. Compact Bottom Status Bar in Landscape */
  .dashboard-bottom-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
  }

  .bottom-pill-box {
    padding: 6px 12px !important;
    border-radius: 12px !important;
    font-size: 10.5px !important;
    gap: 2px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .bottom-pill-box .label {
    font-size: 10px !important;
  }

  .bottom-pill-box .val,
  .bottom-pill-box .val-red {
    font-size: 10.5px !important;
  }

  .bottom-center-info {
    font-size: 10.5px !important;
    text-align: center !important;
  }

  .bottom-center-info .playlist-name {
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .bottom-center-info .days-remaining {
    font-size: 10.5px !important;
    font-weight: 800 !important;
  }

  .bottom-weather-box {
    padding: 6px 12px !important;
    border-radius: 12px !important;
    gap: 10px !important;
  }

  .weather-city {
    font-size: 11.5px !important;
  }

  .weather-clock {
    font-size: 10px !important;
  }

  .bottom-weather-box svg {
    width: 22px !important;
    height: 22px !important;
  }

  /* 4. Channels / VOD / Series in Mobile Landscape */
  .channels-layout {
    display: flex !important;
    flex-direction: row !important;
    height: calc(100vh - 44px) !important;
    height: calc(100dvh - 44px) !important;
    overflow: hidden !important;
  }

  .groups-sidebar {
    width: 210px !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 8px 6px !important;
    gap: 4px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex-direction: column !important;
    white-space: normal !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: none !important;
    flex-shrink: 0 !important;
  }

  .sidebar-title {
    display: block !important;
    font-size: 11px !important;
    padding: 6px 10px 4px !important;
    letter-spacing: 0.5px !important;
  }

  .group-item {
    padding: 8px 12px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    border-radius: 10px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    font-family: inherit !important;
  }

  .group-item.active {
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25) !important;
    border-color: #ffffff !important;
  }

  .channels-toolbar {
    height: 44px !important;
    min-height: 44px !important;
    padding: 6px 14px !important;
    gap: 10px !important;
  }

  .search-input {
    height: 32px !important;
    font-size: 13px !important;
    padding: 4px 12px !important;
  }

  .media-posters-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important;
    gap: 10px !important;
    padding: 10px 14px 40px !important;
  }

  .movie-poster-card {
    min-height: 140px !important;
  }

  .channel-card-row {
    padding: 8px 12px !important;
    gap: 10px !important;
  }

  /* PLAYER OSD IN MOBILE LANDSCAPE: Elevated Floating Glass Card (Never stuck at bottom) */
  .player-osd-bottom {
    position: absolute !important;
    bottom: max(18px, env(safe-area-inset-bottom, 18px)) !important;
    left: max(32px, env(safe-area-inset-left, 32px)) !important;
    right: max(32px, env(safe-area-inset-right, 32px)) !important;
    padding: 10px 22px 12px 22px !important;
    background: rgba(12, 13, 20, 0.92) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 22px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85) !important;
    gap: 8px !important;
  }

  .player-timeline-row {
    gap: 10px !important;
  }

  .player-time-txt {
    font-size: 11px !important;
    min-width: 42px !important;
  }

  .player-seeker-track {
    height: 5px !important;
  }

  .player-ctrl-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .player-ctrl-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  .player-ctrl-btn.btn-play-pause {
    width: 44px !important;
    height: 44px !important;
  }

  .player-ctrl-btn.btn-play-pause svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* =========================================================
   SMRATERS PRO 12-CARD SETTINGS GRID (PHOTO 4 EXACT SPEC)
========================================================= */
.smarters-settings-wrapper {
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  background: radial-gradient(circle at 50% 20%, #151828 0%, #08090e 100%);
  padding: 30px 48px;
  box-sizing: border-box;
}

.smarters-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 1480px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.smarters-brand-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
}

.smarters-brand-title span {
  color: var(--primary-red, #e50914);
}

.smarters-settings-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin: 0;
}

.smarters-settings-clock {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.smarters-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto 40px auto;
}

@media (max-width: 1100px) {
  .smarters-settings-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .smarters-settings-wrapper {
    padding: 16px 14px;
  }
  .smarters-settings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .smarters-settings-title {
    font-size: 18px;
  }
}

.smarters-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  min-height: 140px;
}

.smarters-card:hover,
.smarters-card:focus,
.smarters-card.nav-focused {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.2);
  outline: none;
}

.smarters-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(229, 9, 20, 0.12);
  color: var(--primary-red, #e50914);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.smarters-card:hover .smarters-card-icon,
.smarters-card:focus .smarters-card-icon {
  background: var(--primary-red, #e50914);
  color: #ffffff;
  transform: scale(1.1);
}

.smarters-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.smarters-card-desc {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SMARTERS MODALS */
.smarters-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.smarters-modal-dialog {
  background: #12141e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.smarters-modal-header {
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.smarters-modal-header h3 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.smarters-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}

.smarters-modal-close:hover {
  color: #ffffff;
}

.smarters-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.smarters-opt-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 14px 18px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
}

.smarters-opt-btn:hover,
.smarters-opt-btn:focus,
.smarters-opt-btn.nav-focused {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
  outline: none;
  transform: translateX(4px);
}

.smarters-opt-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 800;
  border-color: #ffffff;
}

/* =========================================================
   CHANNELS TV CARD GRID (SQUARE CARDS WITH BIG LOGO)
========================================================= */
.channels-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 40px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  align-content: flex-start;
  box-sizing: border-box;
}

@media (min-width: 1400px) {
  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
    padding: 22px 28px 50px 28px;
  }
}

@media (max-width: 600px) {
  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
    padding: 12px 10px 40px 10px;
  }
}

.channel-grid-card {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 12px 12px 12px;
  aspect-ratio: 1 / 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.channel-grid-card:hover,
.channel-grid-card:focus,
.channel-grid-card.nav-focused {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 255, 255, 0.22);
  outline: none;
  z-index: 2;
}

.channel-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.channel-card-logo-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 6px 6px 6px;
  min-height: 0;
}

.channel-card-logo-wrap img {
  max-width: 82%;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s;
}

.channel-grid-card:hover .channel-card-logo-wrap img,
.channel-grid-card:focus .channel-card-logo-wrap img {
  transform: scale(1.08);
}

.channel-card-meta {
  width: 100%;
  text-align: center;
  margin-top: 6px;
}

.channel-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 33px;
  word-break: break-word;
}

.channel-card-group {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* CHANNELS LIST VIEW CONTAINER */
.channels-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 40px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =========================================================
   HOME SCREEN 3-HERO-CARDS & UTILITY ACTIONS (SMARTERS / IBO)
========================================================= */
.dashboard-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 36px 28px 36px;
  height: calc(100vh - 68px);
  overflow-y: auto;
  box-sizing: border-box;
}

.hero-cards-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  width: 100% !important;
  max-width: 1480px !important;
  margin: auto auto 24px auto !important;
  gap: 28px !important;
  align-items: stretch;
}

.hero-card {
  height: 100%;
  min-height: 360px;
  max-height: 460px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08) 0%, rgba(18, 20, 30, 0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
}

.hero-card:hover,
.hero-card.nav-focused {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.18) 0%, rgba(32, 36, 52, 0.95) 100%);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 32px rgba(255, 255, 255, 0.25);
  transform: translateY(-8px) scale(1.03);
}

.hero-card-icon {
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-card-icon svg {
  width: 82px;
  height: 82px;
  stroke: #ffffff;
  stroke-width: 1.8;
}

.hero-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
}

@media (max-width: 900px) {
  .hero-cards-3 {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
  }
  .hero-card {
    min-height: 260px;
    max-height: 340px;
    border-radius: 20px;
  }
  .hero-card-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
  }
  .hero-card-icon svg {
    width: 54px;
    height: 54px;
  }
  .hero-card-title {
    font-size: 18px;
  }
}

@media (max-width: 580px) {
  .hero-cards-3 {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .hero-card {
    min-height: 130px;
    flex-direction: row;
    gap: 20px;
    padding: 16px 24px;
  }
  .hero-card-icon {
    margin-bottom: 0;
    width: 48px;
    height: 48px;
  }
  .hero-card-icon svg {
    width: 40px;
    height: 40px;
  }
}

.dashboard-util-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 0 auto 24px auto;
  max-width: 1480px;
  width: 100%;
  flex-wrap: wrap;
}

.util-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.util-btn:hover,
.util-btn:focus,
.util-btn.nav-focused {
  background: rgba(255, 255, 255, 0.16);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 255, 255, 0.2);
  outline: none;
}

.dashboard-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

/* =========================================================
   DOWNLOADS SCREEN STYLES
========================================================= */
.downloads-screen-wrapper {
  width: 100%;
  height: calc(100vh - 68px);
  overflow-y: auto;
  padding: 32px 40px;
  box-sizing: border-box;
}

.downloads-header,
.downloads-filter-bar,
.downloads-content-grid {
  max-width: 1480px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.downloads-header {
  margin-bottom: 24px;
}

.downloads-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.downloads-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.downloads-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.downloads-filter-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 24px;
  border-radius: 22px;
  cursor: pointer;
  transition: all 0.18s;
}

.downloads-filter-pill:hover,
.downloads-filter-pill:focus,
.downloads-filter-pill.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 800;
}

.downloads-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
}

.downloads-empty-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 64px 36px;
  text-align: center;
  max-width: 720px;
  width: 90%;
  margin: 40px auto 0 auto;
}

.downloads-empty-icon {
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 16px;
}

.downloads-empty-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.downloads-empty-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 26px 0;
  line-height: 1.5;
}

.downloads-explore-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  font-size: 14px;
  font-weight: 800;
  padding: 13px 32px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
}

.downloads-explore-btn:hover,
.downloads-explore-btn:focus {
  transform: scale(1.05);
}

/* =========================================================
   27-INCH PC, 2K / 4K / LARGE TV EXPANSIVE MEDIA QUERIES
========================================================= */
@media (min-width: 1700px) {
  .hero-cards-3,
  .dashboard-util-row,
  .dashboard-bottom-bar,
  .playlists-top-header,
  .playlists-cards-container,
  .downloads-header,
  .downloads-filter-bar,
  .downloads-content-grid,
  .smarters-settings-header,
  .smarters-settings-grid {
    max-width: 1680px !important;
  }

  .hero-card {
    min-height: 420px;
    max-height: 520px;
  }

  .hero-card-icon {
    width: 110px;
    height: 110px;
    margin-bottom: 28px;
  }

  .hero-card-icon svg {
    width: 96px;
    height: 96px;
  }

  .hero-card-title {
    font-size: 28px;
  }

  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)) !important;
    gap: 22px !important;
    padding: 28px 36px 60px 36px !important;
  }

  .groups-sidebar {
    width: 310px !important;
  }

  .group-item {
    font-size: 14.5px !important;
    min-height: 48px !important;
    padding: 13px 18px !important;
  }
}

/* =========================================================
   GENUINE RTL ARABIC SUPPORT
========================================================= */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .groups-sidebar {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

html[dir="rtl"] .group-item {
  text-align: right;
}

html[dir="rtl"] .channel-card-badge {
  left: auto;
  right: 8px;
}

html[dir="rtl"] .smarters-opt-btn {
  text-align: right;
}

html[dir="rtl"] .smarters-opt-btn:hover,
html[dir="rtl"] .smarters-opt-btn:focus,
html[dir="rtl"] .smarters-opt-btn.nav-focused {
  transform: translateX(-4px);
}

html[dir="rtl"] .movie-poster-card:hover,
html[dir="rtl"] .movie-poster-card:focus,
html[dir="rtl"] .movie-poster-card.nav-focused {
  transform: scale(1.05);
}
