:root {
  --bg-main: #0C0D14;
  --bg-sidebar: #0F111D;
  --bg-card: #151828;
  --bg-card-hover: #202438;
  --accent-cyan: #7DD3FC; /* Frost Cyan */
  --accent-blue: #6366F1;
  --accent-red: #FF5252;
  --accent-gold: #EED699; /* Champagne */
  --accent-clock: #EED699; /* Champagne */
  --text-main: #FFFFFF;
  --text-muted: #8B91A8;
  --text-high-contrast: #E2E8F0;
  --border-subtle: #1E2235;
  --sidebar-w: 260px;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  user-select: none;
}

/* ==============================================================
   LOGIN OVERLAY SCREEN
============================================================== */
#login-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #111A33 0%, #0C0D14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-card {
  width: 90%;
  max-width: 440px;
  background: rgba(10, 16, 32, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(129, 131, 248, 0.25);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(129, 131, 248, 0.15);
  text-align: center;
}

.login-logo {
  height: 65px;
  object-fit: contain;
  margin-bottom: 20px;
}

.login-card h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.login-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.input-group {
  margin-bottom: 16px;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  width: 100%;
  padding: 13px 16px;
  background: #0E1528;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(129, 131, 248, 0.3);
  background: #141D35;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(229, 9, 20, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.dns-status {
  margin-top: 18px;
  font-size: 11px;
  color: #00E676;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==============================================================
   MAIN APP LAYOUT (SIDEBAR + MAIN CONTENT VIEWPORT)
============================================================== */
#app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #0B101D 0%, #0C0D14 100%);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  flex-shrink: 0;
  z-index: 100;
}

.sidebar-logo-container {
  padding: 6px 14px 20px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-logo {
  height: 44px;
  object-fit: contain;
  align-self: flex-start;
}

.sidebar-tagline {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  padding-left: 2px;
}

.top-clock-pill {
  background: #171E30;
  border: 1px solid #2A334D;
  color: var(--accent-clock);
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 54px;
  padding: 0 20px;
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item i {
  font-size: 20px;
  width: 26px;
  text-align: center;
}

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

.nav-item.active {
  background: linear-gradient(90deg, #252A42, #1D2236);
  border: 1px solid #353D5E;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: none;
}

.nav-logout {
  margin-top: auto;
  color: #ff5252;
}

.nav-logout:hover {
  background: rgba(255, 82, 82, 0.15);
  color: #ff7b7b;
}

/* Main Viewport Container */
.main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ==============================================================
   HOME SCREEN (FAVORITES -> QUICK LAUNCH -> PINNED BANNER)
============================================================== */
.home-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  height: 100%;
  padding: 24px 36px 20px 36px;
  overflow-y: auto;
}

.home-favorites-section {
  flex-shrink: 0;
}

.section-header {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.section-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Horizontal Channel Row */
.horizontal-channel-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.horizontal-channel-row::-webkit-scrollbar {
  height: 6px;
}
.horizontal-channel-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.channel-card {
  flex: 0 0 175px;
  height: 180px;
  background: #0E1528;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.channel-card:hover {
  transform: scale(1.04);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(129, 131, 248, 0.35);
  background: #141E38;
}

.channel-card img {
  height: 85px;
  max-width: 85%;
  object-fit: contain;
  margin-bottom: 12px;
}

.channel-card .channel-name {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.channel-card .fav-star {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #FFC107;
  font-size: 16px;
}

/* Empty Favorites Card */
.empty-favorites-box {
  background: #111A2E;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.empty-favorites-box:hover {
  border-color: var(--accent-cyan);
  background: #162544;
  box-shadow: 0 0 20px rgba(129, 131, 248, 0.25);
}

.empty-favorites-box i {
  font-size: 28px;
  color: #FFC107;
}

.empty-favorites-box .text h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.empty-favorites-box .text p {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Quick Launch Row */
.quick-launch-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: #151828;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.quick-btn i {
  font-size: 15px;
}

.quick-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(129, 131, 248, 0.35);
  transform: scale(1.03);
}

/* Promotional Slideshow Banner (Full-Image 4:1 TV Banner) */
.slideshow-banner {
  flex: 1;
  min-height: 200px;
  max-height: 250px;
  background: #0A0814;
  border: 1px solid #1E2235;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  margin-top: 0 !important;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  display: flex;
  align-items: center;
  background-color: #0A0814;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 82%;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.slide-title {
  font-size: 23px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.slide-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
  line-height: 1.4;
}

.slide-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(14, 21, 40, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.slide-indicators {
  position: absolute;
  bottom: 12px;
  right: 20px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.3s;
}

.dot.active {
  width: 20px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-red));
}

/* ==============================================================
   GRID / CATEGORY VIEW (LIVE TV, MOVIES, KIDS)
============================================================== */
.content-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 24px;
  overflow: hidden;
  min-height: 0;
}

.filter-bar {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 16px;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.filter-bar::-webkit-scrollbar {
  height: 4px;
}

.filter-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.filter-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: 20px;
  background: #0F172A;
  border: 1px solid var(--border-subtle);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.filter-btn:hover {
  background: #172648;
  border-color: var(--accent-cyan);
  color: #fff;
}

.filter-btn.active {
  background: #1A3B66 !important;
  border: 2px solid var(--accent-cyan) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  box-shadow: 0 0 14px rgba(125, 211, 252, 0.25) !important;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  padding-right: 6px;
  scrollbar-width: thin;
}

.channels-grid::-webkit-scrollbar {
  width: 6px;
}
.channels-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.grid-card {
  height: 125px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.grid-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(129, 131, 248, 0.3);
  background: var(--bg-card-hover);
}

.grid-card img {
  height: 60px;
  max-width: 85%;
  object-fit: contain;
  margin-bottom: 8px;
}

.grid-card .name {
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==============================================================
   VIDEO PLAYER MODAL
============================================================== */
#player-modal {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: none;
  flex-direction: column;
}

.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.player-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.player-close-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

/* Volume Slider Group */
.player-volume-group,
.epg-volume-group {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px 8px 2px 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}

.player-volume-group:hover,
.player-volume-group:focus-within,
.epg-volume-group:hover,
.epg-volume-group:focus-within {
  background: rgba(255, 255, 255, 0.22);
  border-color: var(--accent-cyan, #8183F8);
  box-shadow: 0 0 12px rgba(129, 131, 248, 0.3);
}

.player-volume-slider-wrap,
.epg-volume-slider-wrap {
  width: 80px;
  display: flex;
  align-items: center;
  margin-left: 6px;
  margin-right: 4px;
}

.player-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan, #8183F8);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(129, 131, 248, 0.8);
  transition: transform 0.15s ease;
}

.player-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.player-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-cyan, #8183F8);
  border: none;
  cursor: pointer;
}

.player-close-btn:hover {
  background: var(--accent-red);
}

.video-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  position: relative;
}

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

.loading-spinner {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 4px solid rgba(129, 131, 248, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

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

/* ==============================================================
   LIVE TV LONGER CHANNEL BARS (HORIZONTAL ROWS WITH EPG RUNNING BAR)
============================================================== */
.channel-bars-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.channel-bars-list::-webkit-scrollbar {
  width: 6px;
}
.channel-bars-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.channel-bar-item {
  height: 60px;
  min-height: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0 16px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s ease;
  gap: 16px;
}

.channel-bar-item:hover, .channel-bar-item:focus {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(125, 211, 252, 0.2);
  outline: none;
}

.channel-bar-item.active {
  background: #172238 !important;
  border: 2px solid var(--accent-cyan) !important;
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.25) !important;
}

.channel-row-brand-col {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.channel-row-logo-frame,
.channel-bar-logo {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: #0E1528;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.channel-row-logo-frame img,
.channel-bar-logo img {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.channel-row-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.channel-row-epg-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 3px;
}

.channel-row-now-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.channel-row-onair-dot {
  color: var(--accent-red);
  font-size: 10px;
  font-weight: 900;
}

.channel-row-prog-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.channel-row-time-range {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-high-contrast);
  white-space: nowrap;
  margin-left: auto;
  padding-left: 12px;
}

.channel-row-prog-track {
  width: 100%;
  height: 4px;
  background: #1E2235;
  border-radius: 2px;
  overflow: hidden;
}

.channel-row-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 2px;
}

.channel-row-next-line {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-time-mobile,
.next-sep {
  display: none;
}

.channel-row-fav-btn {
  color: var(--text-muted);
  font-size: 16px;
  padding: 6px;
  cursor: pointer;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.channel-row-fav-btn:hover, .channel-row-fav-btn.active {
  color: var(--accent-gold);
}

.channel-bar-mobile-subtitle {
  display: none;
}

.channel-bar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-dot-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 900;
  color: var(--accent-red);
  letter-spacing: 0.5px;
}

.pulsing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.channel-bar-fav {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.15s;
}

.channel-bar-fav:hover,
.channel-bar-fav.active {
  color: #FFC107;
}

/* RIGHT SIDE: EPG RUNNING TICKER BAR WITH AUTO-SCROLLING MARQUEE */
.channel-bar-epg {
  flex: 1;
  height: 40px;
  background: rgba(15, 20, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  position: relative;
}

.epg-icon-badge {
  color: var(--accent-cyan);
  font-size: 13px;
  flex-shrink: 0;
}

.epg-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.epg-ticker-marquee {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.epg-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  animation: epgTickerScroll 28s linear infinite 2s; /* 2-second initial pause matching app */
  will-change: transform;
}

.channel-bar-item:hover .epg-ticker-track,
.channel-bar-item:focus .epg-ticker-track {
  animation-play-state: paused;
}

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

.epg-item-span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #fff;
}

.epg-tag-now {
  color: var(--accent-cyan);
  font-weight: 900;
  font-size: 10px;
  background: rgba(129, 131, 248, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(129, 131, 248, 0.3);
  letter-spacing: 0.5px;
}

.epg-tag-next {
  color: #FFD54F;
  font-weight: 900;
  font-size: 10px;
  background: rgba(255, 213, 79, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 213, 79, 0.3);
  letter-spacing: 0.5px;
}

.epg-tag-later {
  color: #80D8FF;
  font-weight: 900;
  font-size: 10px;
  background: rgba(128, 216, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(128, 216, 255, 0.25);
  letter-spacing: 0.5px;
}

.epg-time-badge-inline {
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 500;
}

/* EPG Progress Bar inside Row */
.epg-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}

.epg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(129, 131, 248, 0.5);
  transition: width 0.3s;
}

.epg-time-text {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

/* Player Prev / Next Channel Buttons */
.player-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(129, 131, 248, 0.35);
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.18s ease;
}

.player-nav-btn:hover {
  background: rgba(129, 131, 248, 0.25);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(129, 131, 248, 0.4);
  transform: translateY(-1px);
}

/* Smart TV Remote D-Pad Focus Styles (Samsung Tizen, LG webOS, Apple TV) */
[tabindex="0"]:focus,
.tv-focused {
  outline: 2.5px solid var(--accent-cyan) !important;
  outline-offset: 2px;
  box-shadow: 0 0 22px rgba(129, 131, 248, 0.8), inset 0 0 10px rgba(129, 131, 248, 0.3) !important;
  border-color: var(--accent-cyan) !important;
  transform: scale(1.02);
  z-index: 10;
}

.channel-bar-item:focus {
  background: #1c2742 !important;
  outline: 2.5px solid var(--accent-cyan) !important;
  box-shadow: 0 0 20px rgba(129, 131, 248, 0.6) !important;
}

/* ==============================================================
   TODAY'S EVENTS GRID & CARDS (MATCHING ANDROID TV item_sports_card)
============================================================== */
.events-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 4px 8px 30px 4px;
  scrollbar-width: thin;
  scrollbar-color: #1E2842 #091022;
}

.events-grid::-webkit-scrollbar {
  width: 6px;
}
.events-grid::-webkit-scrollbar-track {
  background: #091022;
}
.events-grid::-webkit-scrollbar-thumb {
  background: #1E2842;
  border-radius: 4px;
}

/* Sports Row Item (Matching Android TV item_sports_card.xml) */
.sports-row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 16px;
  min-height: 58px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.sports-row-item:hover,
.sports-row-item:focus {
  background: #172238;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(125, 211, 252, 0.2);
  outline: none;
}

.sports-row-item:active {
  transform: scale(0.995);
}

.sports-row-logo-frame {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.sports-row-logo-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sports-row-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sports-row-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sports-row-subtext {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.sports-badge-cat {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  background: #141C30;
  border: 1px solid #23304E;
  color: var(--accent-cyan);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sports-badge-alt {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(238, 214, 153, 0.12);
  border: 1px solid rgba(238, 214, 153, 0.3);
  color: var(--accent-gold);
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.sports-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.sports-raw-channel {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.sports-row-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #1A3B66;
  border: 1px solid var(--accent-cyan);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sports-row-watch-btn:hover {
  background: var(--accent-cyan);
  color: #060D1A;
}

/* Fallback event-card styling for backward compatibility */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  min-height: 140px;
  height: auto;
  box-sizing: border-box;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 24px rgba(125, 211, 252, 0.2);
  background: #19243d;
}

.event-card:focus {
  outline: 2.5px solid var(--accent-cyan);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.3);
  background: #1c2742;
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.event-sport-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #141C30;
  color: var(--accent-cyan);
  border: 1px solid #23304E;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-time-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.event-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1 0 auto;
  min-height: 40px;
  display: block;
  word-break: break-word;
}

.event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: auto;
}

.event-channel-name {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
}

.event-watch-btn {
  padding: 6px 14px;
  background: #1A3B66;
  border: 1px solid var(--accent-cyan);
  border-radius: 6px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
}

.event-watch-btn:hover {
  background: var(--accent-cyan);
  color: #060D1A;
}

/* ==============================================================
   IN-PLAYER / FULLSCREEN EPG OVERLAY BAR
============================================================== */
.player-epg-bar {
  position: absolute;
  bottom: 24px;
  left: 30px;
  right: 30px;
  background: rgba(8, 14, 28, 0.92);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(129, 131, 248, 0.4);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(129, 131, 248, 0.2);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: auto;
}

.player-epg-bar.hidden {
  opacity: 0 !important;
  transform: translateY(15px) !important;
  pointer-events: none !important;
}

.player-topbar {
  transition: opacity 0.35s ease;
}

.player-topbar.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.player-unmute-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 22px;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--accent-cyan);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 35;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 25px rgba(129, 131, 248, 0.5);
}

.player-unmute-btn:hover,
.player-unmute-btn:active {
  background: var(--accent-cyan);
  color: #000;
  transform: translate(-50%, -50%) scale(1.05);
}

.player-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.player-epg-header-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.player-epg-logo-box {
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 2px;
}
.player-epg-logo-box img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
}

.player-epg-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.player-epg-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.player-epg-time-badge {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.player-epg-program-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: #E2E8F0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulsing-dot-red {
  color: #FF5252;
  font-size: 8px;
  margin-right: 2px;
}

.epg-tag-now {
  color: #FF5252;
  font-weight: 800;
}

.info-sep {
  color: #64748B;
  margin: 0 4px;
}

.player-epg-next-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-tag-next {
  color: var(--accent-cyan);
  font-weight: 800;
}

/* Unified 8-Button Controls Toolbar (Matching Android Mobile App) */
.player-controls-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.player-ctrl-btn {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.player-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent-cyan);
}

.player-ctrl-btn:active {
  transform: scale(0.95);
  background: var(--accent-cyan);
  color: #000;
}

.player-ctrl-aspect {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  min-width: 44px;
}

#player-btn-fav.active i {
  color: #FF5252 !important;
}

/* ==============================================================
   DESKTOP DEFAULT HIDING FOR MOBILE-SPECIFIC ELEMENTS (> 900px)
============================================================== */
.sidebar {
  display: flex !important;
  width: var(--sidebar-w) !important;
}

.search-box-container {
  position: relative !important;
  width: 260px !important;
  display: flex !important;
  align-items: center !important;
}

.mobile-bottom-nav {
  display: none !important;
}

.mobile-header-logo {
  display: none !important;
}

.mobile-search-btn {
  display: none !important;
}

/* ==============================================================
   RESPONSIVE MOBILE & IPHONE / SAFARI OPTIMIZATIONS (<= 900px)
============================================================== */
@media screen and (max-width: 900px) {
  /* 1. Root App Layout */
  #app-layout {
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100vw !important;
    overflow: hidden !important;
  }

  /* 2. Hide Desktop Left Sidebar completely on phones & tablets */
  .sidebar {
    display: none !important;
    width: 0 !important;
  }

  /* 3. Main Viewport: Dynamic Safe Area (0px on Android Chrome, Notch-aware on iOS Safari) */
  .main-viewport {
    width: 100% !important;
    flex: 1 !important;
    height: 100% !important;
    padding-top: 0px !important;
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: calc(56px + max(env(safe-area-inset-bottom, 0px), 8px)) !important;
    overflow-y: hidden !important;
  }

  /* 4. Top Status Bar on Mobile (Compact & Clean) */
  .top-status-bar {
    padding-top: 8px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: 8px !important;
    gap: 10px !important;
  }

  .mobile-header-logo {
    display: block !important;
    height: 26px !important;
    max-width: 95px !important;
    object-fit: contain !important;
  }

  #view-title {
    font-size: 16px !important;
    letter-spacing: 0px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 130px !important;
  }

  .mobile-search-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #0E1528 !important;
    border: 1px solid var(--border-subtle) !important;
    color: #fff !important;
    font-size: 14px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
  }

  /* On mobile, search bar is collapsed into the search button by default */
  .search-box-container {
    display: none !important;
  }

  .search-box-container.mobile-expanded {
    display: flex !important;
    position: absolute !important;
    left: 12px !important;
    right: 12px !important;
    top: 10px !important;
    width: auto !important;
    z-index: 250 !important;
    box-shadow: 0 6px 25px rgba(0,0,0,0.9) !important;
    background: #090E1B !important;
    border-radius: 20px !important;
  }

  .search-box-container.mobile-expanded .mobile-search-close-btn {
    display: block !important;
  }

  #search-input {
    padding: 7px 34px 7px 34px !important;
    font-size: 16px !important; /* iOS Safari auto-zoom prevention */
    border-radius: 18px !important;
  }

  #user-info-pill {
    display: none !important;
  }

  .conn-pill {
    padding: 4px 10px !important;
    font-size: 11px !important;
    flex-shrink: 0 !important;
  }

  /* 5. Mobile Bottom Navigation Bar (Thumb-Friendly, Safe for Safari & Android) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(56px + max(env(safe-area-inset-bottom, 0px), 8px)) !important;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 8px) !important;
    background: rgba(7, 11, 20, 0.96) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 200 !important;
    align-items: center !important;
    justify-content: space-around !important;
  }

  .mobile-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    color: #8E9BAE !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    flex: 1 !important;
    height: 100% !important;
    min-width: 0 !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
  }

  .mobile-nav-item i {
    font-size: 17px !important;
    transition: transform 0.15s ease !important;
  }

  .mobile-nav-item span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .mobile-nav-item.active {
    color: var(--accent-cyan) !important;
  }

  .mobile-nav-item.active i {
    transform: scale(1.15) !important;
    color: var(--accent-cyan) !important;
    filter: drop-shadow(0 0 6px rgba(129, 131, 248, 0.6)) !important;
  }

  .mobile-nav-item:active {
    transform: scale(0.92) !important;
  }

  /* 5. Mobile Tab View Isolation (Prevent Views from Bleeding into Each Other) */
  #view-home[style*="display: none"],
  #view-content[style*="display: none"],
  #view-epg[style*="display: none"],
  #view-events[style*="display: none"],
  #view-search[style*="display: none"],
  #view-settings[style*="display: none"] {
    display: none !important;
  }

  #view-home:not([style*="display: none"]) {
    display: flex !important;
  }

  #view-content:not([style*="display: none"]) {
    display: flex !important;
  }

  #view-epg:not([style*="display: none"]) {
    display: flex !important;
  }

  /* 6. Content Views & Filters */
  .content-view {
    padding: 6px 12px 6px 12px !important;
    min-height: 0 !important;
  }

  .settings-view {
    padding: 6px 12px 10px 12px !important;
    max-width: 100% !important;
  }

  /* Permanently hide iOS install banner */
  #ios-install-banner,
  .ios-install-banner {
    display: none !important;
  }

  .filter-bar {
    gap: 8px !important;
    margin-bottom: 12px !important;
    padding-bottom: 6px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .filter-btn {
    height: 38px !important;
    padding: 0 16px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  /* 7. Full-Width Channel Bars on Mobile with High Readability (No Horizontal Overflow) */
  .channel-bars-list {
    gap: 8px !important;
    padding-right: 0 !important;
  }

  .channel-bar-item {
    height: 68px !important;
    min-height: 68px !important;
    padding: 8px 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .channel-row-brand-col {
    width: 105px !important;
    min-width: 105px !important;
    max-width: 105px !important;
    gap: 6px !important;
  }

  .channel-row-name {
    font-size: 12px !important;
  }

  .channel-row-now-line {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    gap: 5px !important;
    width: 100% !important;
  }

  .channel-row-prog-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    min-width: 0 !important;
    display: block !important;
  }

  .channel-row-time-range,
  .channel-row-next-line .next-time {
    display: none !important;
  }

  .channel-row-next-line {
    font-size: 11px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .channel-row-next-line .now-time-mobile {
    display: inline !important;
    color: var(--accent-gold) !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
  }

  .channel-row-next-line .next-sep {
    display: inline !important;
    color: var(--text-muted) !important;
    margin: 0 2px !important;
    flex-shrink: 0 !important;
  }

  .channel-row-next-line .next-prefix {
    color: var(--accent-cyan) !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
  }

  .channel-row-next-line .next-title {
    color: var(--text-muted) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }

  .channel-bar-left {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    gap: 12px !important;
    display: flex !important;
    align-items: center !important;
  }

  .channel-bar-logo {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }

  .channel-bar-logo img {
    max-width: 40px !important;
    max-height: 40px !important;
  }

  .channel-bar-details {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .channel-bar-title {
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #fff !important;
  }

  /* Rich mobile on-air EPG line */
  .channel-bar-mobile-subtitle {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11.5px !important;
    color: var(--accent-cyan) !important;
    font-weight: 600 !important;
    margin-top: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .channel-bar-mobile-prog-track {
    display: block !important;
    width: 100% !important;
    max-width: 220px !important;
    height: 3.5px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 3px !important;
    margin-top: 4px !important;
    overflow: hidden !important;
  }

  .channel-bar-mobile-prog-fill {
    height: 100% !important;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan)) !important;
    border-radius: 3px !important;
  }

  /* HIDE desktop 2-box EPG deck on mobile to stop horizontal overflow and text collision */
  .channel-bar-epg-deck,
  .channel-bar-epg {
    display: none !important;
  }

  /* 8. Home Dashboard on Mobile (Clean Compact Stack, Zero Dead Space) */
  .home-favorites-section,
  #favorites-row,
  .home-pinned-section {
    display: none !important;
  }

  .home-container {
    padding: 6px 12px 8px 12px !important;
    gap: 6px !important;
    height: 100% !important;
    overflow-y: hidden !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }

  .home-dashboard-row {
    flex-direction: column !important;
    height: auto !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .dash-col {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
  }

  /* 1. Live & EPG Cards Grid */
  .dash-col-refresh {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .dash-refresh-card {
    height: 76px !important;
    min-height: 76px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    margin: 0 !important;
  }

  .dash-card-header {
    margin-bottom: 2px !important;
  }

  .dash-card-label {
    font-size: 9px !important;
  }

  .dash-card-big-title {
    font-size: 13.5px !important;
    line-height: 1.15 !important;
  }

  .dash-card-subtext {
    font-size: 8px !important;
  }

  .dash-pill-btn {
    padding: 3px 7px !important;
    font-size: 8.5px !important;
  }

  /* 2. Account Card */
  .dash-col-account {
    margin: 0 !important;
    padding: 0 !important;
  }

  #dash-account-card,
  .dash-card-full {
    width: 100% !important;
    height: 74px !important;
    min-height: 74px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    margin: 0 !important;
  }

  .dash-account-details-grid {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin: 2px 0 !important;
  }

  .dash-account-row {
    font-size: 10px !important;
    gap: 4px !important;
  }

  .dash-account-row strong {
    font-size: 11px !important;
  }

  .dash-card-footer-row {
    margin-top: 1px !important;
  }

  .dash-conn-active-text {
    font-size: 11px !important;
  }

  /* 3. Speedtest Card */
  .dash-col-speed {
    margin: 0 !important;
    padding: 0 !important;
  }

  #dash-speed-card {
    width: 100% !important;
    height: 92px !important;
    min-height: 92px !important;
    padding: 8px 12px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    margin: 0 !important;
  }

  .dash-speed-number {
    font-size: 22px !important;
  }

  /* 4. Promo Banner (Edge-to-Edge Responsive 1376:384 Aspect Ratio - Never Crops) */
  .slideshow-banner {
    aspect-ratio: 1376 / 384 !important;
    height: auto !important;
    min-height: unset !important;
    max-height: unset !important;
    width: 100% !important;
    padding: 0 !important;
    border-radius: 12px !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: block !important;
    position: relative !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid #1E2235 !important;
  }

  .slideshow-banner .slide {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    inset: 0 !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }

  .slide-indicators {
    bottom: 6px !important;
  }

  .slide-title {
    font-size: 12.5px !important;
    line-height: 1.15 !important;
    margin-bottom: 2px !important;
  }

  .slide-desc {
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .slide-pills {
    display: none !important;
  }

  /* 8b. EPG Guide on Mobile (Sticky Preview Under Categories + Freeze-Pane Timeline) */
  #view-epg {
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 4px 8px 6px 8px !important;
  }

  #epg-category-filter-bar {
    margin-bottom: 4px !important;
    flex-shrink: 0 !important;
  }

  .epg-top-deck {
    display: flex !important;
    flex-direction: column !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: #060B18 !important;
    padding: 0 0 4px 0 !important;
    margin-bottom: 2px !important;
    height: auto !important;
    min-height: 0 !important;
    border: none !important;
    flex-shrink: 0 !important;
  }

  /* Remove EPG info above preview player on mobile */
  .epg-meta-panel,
  .epg-next-panel {
    display: none !important;
  }

  /* Preview video player sits directly under categories */
  .epg-preview-panel {
    display: block !important;
    width: 100% !important;
    height: 165px !important;
    min-height: 165px !important;
    border-radius: 12px !important;
    border: 1.5px solid var(--border-subtle) !important;
    position: relative !important;
    overflow: hidden !important;
    background: #000 !important;
    cursor: pointer !important;
  }

  #epg-preview-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* EPG 3-Day Navigation on Mobile */
  .epg-day-navigation {
    padding: 6px 10px !important;
    gap: 8px !important;
    background: #080E1C !important;
  }

  .epg-day-btn {
    padding: 5px 11px !important;
    font-size: 10px !important;
    border-radius: 16px !important;
  }

  .epg-timeline-indicator {
    font-size: 9.5px !important;
  }

  /* EPG Timeline Container & Freeze-Pane Sticky Channel Column */
  .epg-timeline-container {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 10px !important;
    border: 1px solid var(--border-subtle) !important;
    background: #0A1020 !important;
    position: relative !important;
  }

  .epg-timeline-header-row {
    height: 32px !important;
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background: #0B172E !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    min-width: max-content !important;
  }

  .epg-channel-col-header {
    width: 110px !important;
    min-width: 110px !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 40 !important;
    background: #0B172E !important;
    padding: 0 8px !important;
    font-size: 10px !important;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.6) !important;
  }

  .epg-time-slots-header {
    display: flex !important;
    flex: 1 !important;
    align-items: center !important;
  }

  .epg-time-slot-item {
    width: 135px !important;
    min-width: 135px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }

  .epg-timeline-body {
    overflow: visible !important;
    display: block !important;
    width: max-content !important;
    min-width: 100% !important;
  }

  .epg-timeline-row {
    height: 64px !important;
    min-height: 64px !important;
    display: flex !important;
    align-items: center !important;
    min-width: max-content !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    position: relative !important;
    overflow: visible !important;
  }

  /* Freeze-pane channel cell: locked firmly on left while 72-hour timeline scrolls horizontally */
  .epg-channel-cell {
    width: 110px !important;
    min-width: 110px !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 25 !important;
    background: #080E1C !important;
    padding: 0 6px !important;
    gap: 6px !important;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.6) !important;
  }

  .epg-channel-num {
    font-size: 10px !important;
    min-width: 14px !important;
  }

  .epg-channel-cell img {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    padding: 2px !important;
  }

  .epg-channel-cell span {
    font-size: 11px !important;
  }

  .epg-programs-track {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow: visible !important;
    flex: 1 !important;
  }

  .epg-program-block {
    width: 135px !important;
    min-width: 135px !important;
    height: 52px !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    margin-right: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  /* 9. Sports Center Mobile Card Layout (Matching Mobile App Image 5) */
  .sports-row-item {
    padding: 12px 14px !important;
    gap: 12px !important;
    align-items: flex-start !important;
    min-height: auto !important;
    cursor: pointer !important;
    position: relative !important;
  }

  .sports-row-item:active {
    background: #172238 !important;
    transform: scale(0.98) !important;
  }

  .sports-row-logo-frame {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 8px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
  }

  .sports-row-details {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 6px !important;
  }

  .sports-row-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
    white-space: normal !important;
    word-break: break-word !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.35 !important;
    max-height: none !important;
  }

  .sports-row-subtext {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 11px !important;
  }

  /* On mobile: Hide bulky watch button so title gets 100% width! Entire card is clickable */
  .sports-row-watch-btn {
    display: none !important;
  }

  /* On mobile: Hide raw channel name & category pill to match clean Mobile App layout (shows • LIVE) */
  .sports-raw-channel,
  .sports-badge-cat {
    display: none !important;
  }

  .sports-live-indicator {
    color: var(--accent-red) !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
  }

  .epg-program-block {
    padding: 4px 8px !important;
    border-radius: 8px !important;
    margin-right: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .epg-program-block-title {
    font-size: 10.5px !important;
    font-weight: 800 !important;
    color: #fff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    margin: 1px 0 !important;
    display: block !important;
    flex-shrink: 0 !important;
  }

  .epg-program-block-time {
    font-size: 8.5px !important;
    color: var(--accent-gold) !important;
  }

  /* 9. Single-Column Responsive Today's Events Grid */
  .events-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    padding-right: 0 !important;
    padding-bottom: 20px !important;
  }

  .event-card {
    min-height: 125px !important;
    height: auto !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .event-title {
    font-size: 14px !important;
    line-height: 1.45 !important;
    margin-bottom: 12px !important;
    flex: 1 0 auto !important;
    min-height: 40px !important;
    display: block !important;
    word-break: break-word !important;
    overflow: visible !important;
  }

  /* 10. DUAL-MODE MOBILE VIDEO PLAYER (Portrait Hybrid Split-View) */
  #player-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #060B18 !important;
    z-index: 99999 !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  #player-modal:not(.active) {
    display: none !important;
  }

  #player-modal.active {
    display: flex !important;
  }

  .nav-btn-text {
    display: none !important;
  }

  .player-topbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    background: #091224 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-top: 10px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: 10px !important;
    z-index: 30 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .player-title {
    font-size: 13px !important;
    max-width: 130px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .player-nav-btn {
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 12px !important;
  }

  .player-close-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
  }

  .video-container {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    height: auto !important;
    max-height: 40vh !important;
    flex: none !important;
    background: #000 !important;
    position: relative !important;
  }

  video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  .player-epg-bar {
    display: flex !important;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    gap: 8px !important;
    background: #0B132B !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 0 !important;
    padding: 10px 12px !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 10 !important;
  }

  .player-epg-header-card {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .player-epg-logo-box {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.5) !important;
    padding: 3px !important;
  }

  .player-epg-info {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .player-epg-channel-name {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #FFFFFF !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .player-epg-program-row {
    font-size: 11px !important;
    color: #CBD5E1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 2px !important;
  }

  .player-epg-next-row {
    font-size: 11px !important;
    color: #94A3B8 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 1px !important;
  }

  .player-controls-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 4px !important;
    margin-top: 2px !important;
  }

  .player-ctrl-btn {
    flex: 1 !important;
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .player-ctrl-aspect {
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
  }

  .player-volume-slider-wrap {
    width: 60px !important;
  }

  .player-portrait-drawer {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #070D1D !important;
    padding: 12px 14px !important;
    gap: 10px !important;
  }
}

/* Landscape Phone Fullscreen Cinema Mode */
@media screen and (orientation: landscape) and (max-width: 1024px) {
  .sidebar {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: none !important;
  }
  .main-viewport {
    padding-bottom: 0 !important;
  }
  #player-modal {
    flex-direction: row !important;
  }
  .player-portrait-drawer {
    display: none !important;
  }
  .video-container {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    flex: 1 !important;
  }
  .player-topbar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 40 !important;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, transparent 100%) !important;
    padding: max(8px, env(safe-area-inset-top, 8px)) 16px !important;
  }
  .player-epg-bar {
    display: flex !important;
    position: absolute !important;
    bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
    left: max(14px, env(safe-area-inset-left, 14px)) !important;
    right: max(14px, env(safe-area-inset-right, 14px)) !important;
    width: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(8, 14, 28, 0.90) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    padding: 8px 14px !important;
    z-index: 40 !important;
  }
  .player-epg-header-card {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex: 1 !important;
    min-width: 0 !important;
    margin-right: 14px !important;
  }
  .player-controls-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    width: auto !important;
    margin-top: 0 !important;
  }
  .player-ctrl-btn {
    flex: none !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
  }
}

/* System Fullscreen API Styles (Mobile & Desktop) */
#player-modal:fullscreen,
#player-modal:-webkit-full-screen,
#player-modal.in-page-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #000 !important;
  flex-direction: row !important;
}

#player-modal:fullscreen .video-container,
#player-modal:-webkit-full-screen .video-container,
#player-modal.in-page-fullscreen .video-container,
.video-container:fullscreen,
.video-container:-webkit-full-screen {
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  flex: 1 !important;
  background: #000 !important;
  z-index: 10 !important;
}

#player-modal:fullscreen video,
#player-modal:-webkit-full-screen video,
#player-modal.in-page-fullscreen video,
.video-container:fullscreen video,
.video-container:-webkit-full-screen video {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  object-fit: contain !important;
}

#player-modal:fullscreen .player-topbar,
#player-modal:-webkit-full-screen .player-topbar,
#player-modal.in-page-fullscreen .player-topbar,
.video-container:fullscreen .player-topbar,
.video-container:-webkit-full-screen .player-topbar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 40 !important;
  display: flex !important;
  background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, transparent 100%) !important;
  padding: max(12px, env(safe-area-inset-top, 24px)) 20px 12px 20px !important;
}

#player-modal:fullscreen .player-epg-bar,
#player-modal:-webkit-full-screen .player-epg-bar,
#player-modal.in-page-fullscreen .player-epg-bar,
.video-container:fullscreen .player-epg-bar,
.video-container:-webkit-full-screen .player-epg-bar {
  display: flex !important;
  position: absolute !important;
  bottom: max(16px, env(safe-area-inset-bottom, 16px)) !important;
  left: max(16px, env(safe-area-inset-left, 16px)) !important;
  right: max(16px, env(safe-area-inset-right, 16px)) !important;
  width: auto !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(8, 14, 28, 0.90) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  z-index: 40 !important;
}

#player-modal:fullscreen .player-epg-header-card,
#player-modal:-webkit-full-screen .player-epg-header-card,
#player-modal.in-page-fullscreen .player-epg-header-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex: 1 !important;
  min-width: 0 !important;
  margin-right: 14px !important;
}

#player-modal:fullscreen .player-controls-toolbar,
#player-modal:-webkit-full-screen .player-controls-toolbar,
#player-modal.in-page-fullscreen .player-controls-toolbar {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  width: auto !important;
  margin-top: 0 !important;
}

#player-modal:fullscreen .player-ctrl-btn,
#player-modal:-webkit-full-screen .player-ctrl-btn,
#player-modal.in-page-fullscreen .player-ctrl-btn {
  flex: none !important;
  min-width: 38px !important;
  height: 38px !important;
  padding: 0 12px !important;
}

#player-modal:fullscreen .player-portrait-drawer,
#player-modal:-webkit-full-screen .player-portrait-drawer,
#player-modal.in-page-fullscreen .player-portrait-drawer {
  display: none !important;
}

/* ==============================================================
   CONNECTION GUARD & LIMIT STYLES
============================================================== */
.conn-pill {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.conn-pill:hover {
  background: rgba(99, 102, 241, 0.3) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 12px rgba(129, 131, 248, 0.4);
}
.conn-pill.at-limit {
  background: rgba(229, 9, 20, 0.2) !important;
  border-color: #ff5252 !important;
}
.conn-pill.at-limit i {
  color: #ff5252 !important;
}

/* Floating in-player toast banner */
.player-conn-alert {
  position: absolute;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 20, 36, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid #ff5252;
  border-radius: 30px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(229, 9, 20, 0.4);
  animation: slideDownToast 0.3s ease;
  pointer-events: none;
}

@keyframes slideDownToast {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Pre-flight Connection Limit Modal */
.conn-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.conn-modal-card {
  background: #0E1528;
  border: 1.5px solid #ff5252;
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(229, 9, 20, 0.25);
}

.conn-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.15);
  border: 1.5px solid rgba(229, 9, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff5252;
  font-size: 28px;
}

.conn-modal-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.conn-modal-card p {
  font-size: 13.5px;
  color: #B0BEC5;
  line-height: 1.5;
  margin-bottom: 24px;
}

.conn-modal-btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.conn-modal-btn {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  border: none;
}

.conn-modal-btn.secondary {
  background: #19243d;
  color: #fff;
  border: 1px solid var(--border-subtle);
}

.conn-modal-btn.secondary:hover {
  background: #243354;
  border-color: rgba(255, 255, 255, 0.3);
}

.conn-modal-btn.primary {
  background: linear-gradient(135deg, #FF5733, #B71C1C);
  color: #fff;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.conn-modal-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

/* ==============================================================
   TROUBLESHOOTING & SPEED TEST VIEW
============================================================== */
.troubleshoot-view {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.ts-conn-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #0e1b38 0%, #091224 100%);
  border: 1.5px solid rgba(129, 131, 248, 0.35);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.ts-conn-card.over-limit {
  background: linear-gradient(135deg, #3B1010 0%, #1A0A0A 100%);
  border-color: #FF5733;
  box-shadow: 0 10px 30px rgba(229, 9, 20, 0.25);
}

.ts-conn-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ts-conn-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(129, 131, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 20px;
}

.ts-conn-card.over-limit .ts-conn-icon {
  background: rgba(229, 9, 20, 0.2);
  color: #ff5252;
}

.ts-status-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.ts-status-badge.healthy {
  background: #00E676;
  color: #0C0D14;
}

.ts-status-badge.over-limit {
  background: #FF5733;
  color: #fff;
}

.ts-refresh-btn {
  background: #14213D;
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

.ts-refresh-btn:hover {
  background: var(--accent-blue);
  color: #fff;
  transform: rotate(90deg);
}

.ts-speed-card {
  background: #0E172C;
  border: 1.5px solid #1E2D4A;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.ts-speed-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  margin-bottom: 20px;
}

.ts-gauge-box {
  background: #080F1E;
  border: 1.5px solid #1B2B48;
  border-radius: 14px;
  padding: 26px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ts-speed-number {
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
}

.ts-speed-unit {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

.ts-progress-bar-wrap {
  width: 80%;
  height: 6px;
  background: #1E293B;
  border-radius: 4px;
  margin-top: 14px;
  overflow: hidden;
}

.ts-progress-fill {
  height: 100%;
  background: var(--accent-cyan);
  transition: width 0.2s ease;
}

.ts-metrics-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.ts-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ts-metric-tile {
  background: #080F1E;
  border: 1.5px solid #1B2B48;
  border-radius: 12px;
  padding: 14px;
}

.ts-metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ts-metric-value {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.ts-verdict-box {
  background: rgba(129, 131, 248, 0.08);
  border: 1px solid rgba(129, 131, 248, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ts-start-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.ts-start-btn:hover {
  background: #0052cc;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
}

.ts-start-btn.running {
  background: #FF5733;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.ts-start-btn.running:hover {
  background: #c60812;
}

.ts-guidance-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ts-guidance-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #0D172B;
  border: 1.2px solid #1C2B49;
  border-radius: 14px;
  padding: 18px 20px;
}

.ts-guidance-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.ts-guidance-icon.warning {
  background: rgba(255, 145, 0, 0.15);
  color: #FF9100;
  border: 1px solid rgba(255, 145, 0, 0.3);
}

.ts-guidance-icon.info {
  background: rgba(129, 131, 248, 0.15);
  color: #8183F8;
  border: 1px solid rgba(129, 131, 248, 0.3);
}

.ts-guidance-icon.success {
  background: rgba(0, 230, 118, 0.15);
  color: #00E676;
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.ts-guidance-body {
  flex: 1;
}

.ts-guidance-body h4 {
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.ts-quote-box {
  background: #080E1C;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 8px;
}

.ts-quote-box.warning {
  border-left: 3px solid #FF9100;
}

.ts-quote-box.info {
  border-left: 3px solid #8183F8;
}

.ts-quote-box.success {
  border-left: 3px solid #00E676;
}

.ts-guidance-body p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

@media screen and (max-width: 900px) {
  .ts-speed-grid {
    grid-template-columns: 1fr;
  }
  .ts-conn-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ts-refresh-btn {
    align-self: flex-end;
  }
  .ts-guidance-card {
    flex-direction: column;
  }
}

/* ==============================================================
   SETTINGS & ACCOUNT MANAGEMENT VIEW
============================================================== */
.settings-view {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px;
  overflow-y: auto;
  width: 100%;
}

.settings-card {
  background: #0E172C;
  border: 1.5px solid #1E2D4A;
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.settings-card.danger-zone {
  border-color: rgba(229, 9, 20, 0.4);
  background: linear-gradient(135deg, #1C0B12 0%, #0E172C 100%);
}

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

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.settings-item {
  background: #080F1E;
  border: 1px solid #1B2B48;
  border-radius: 10px;
  padding: 12px 14px;
}

.settings-item label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.settings-val {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

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

.settings-select {
  padding: 10px 14px;
  background: #080F1E;
  border: 1.5px solid #1B2B48;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.settings-action-btn {
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.settings-action-btn.secondary {
  background: #19253f;
  color: #fff;
  border: 1px solid var(--border-subtle);
}

.settings-action-btn.secondary:hover {
  background: #243559;
}

.settings-action-btn.danger {
  background: linear-gradient(135deg, #FF5733, #B71C1C);
  color: #fff;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.settings-action-btn.danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

/* ==============================================================
   MOBILE PORTRAIT CHANNEL & EPG DRAWER
============================================================== */
.player-portrait-drawer {
  display: none;
}

.drawer-now-card {
  background: #0D162B;
  border: 1.2px solid rgba(129, 131, 248, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

.drawer-now-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.drawer-channel-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.drawer-time-badge {
  font-size: 11px;
  color: var(--text-muted);
}

.drawer-program-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-surf-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 2px 2px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.drawer-cat-badge {
  font-size: 10px;
  color: var(--accent-cyan);
  background: rgba(129, 131, 248, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.drawer-channels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

.drawer-channel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #091021;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-channel-row:active, .drawer-channel-row.active {
  background: rgba(99, 102, 241, 0.28);
  border-color: var(--accent-cyan);
}

.drawer-channel-row-logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.drawer-channel-row-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

@media (max-width: 600px) {
  .settings-row-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .settings-select {
    width: 100%;
  }
  .settings-action-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==============================================================
   IN-PLAYER QUICK CHANNEL GUIDE SIDE DRAWER (Full-screen & Desktop)
============================================================== */
.player-quick-guide {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: rgba(6, 17, 37, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1.5px solid rgba(129, 131, 248, 0.35);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.85);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.player-quick-guide.active {
  transform: translateX(0);
  pointer-events: auto;
}

.quick-guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.quick-guide-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.quick-guide-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-guide-close-btn:hover {
  background: rgba(229, 9, 20, 0.25);
  color: #fff;
  border-color: rgba(229, 9, 20, 0.5);
}

.quick-guide-category-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(129, 131, 248, 0.15);
  padding: 5px 12px;
  margin: 10px 18px 6px 18px;
  border-radius: 6px;
  border: 1px solid rgba(129, 131, 248, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.quick-guide-channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 131, 248, 0.3) transparent;
}

.quick-guide-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(14, 21, 40, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.quick-guide-item:hover, .quick-guide-item:focus {
  background: rgba(99, 102, 241, 0.32);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(129, 131, 248, 0.4);
  outline: none;
  transform: translateX(4px);
}

.quick-guide-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.45) 0%, rgba(129, 131, 248, 0.25) 100%);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(129, 131, 248, 0.5);
}

.quick-guide-item-logo {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.quick-guide-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-guide-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-guide-item-epg {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==============================================================
   IN-APP RESIZABLE & DRAGGABLE PICTURE-IN-PICTURE (PIP) WINDOW
============================================================== */
.pip-floating-window {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 360px;
  height: 230px;
  min-width: 240px;
  min-height: 160px;
  max-width: 90vw;
  max-height: 85vh;
  background: #000;
  border: 1.5px solid var(--accent-cyan);
  border-radius: 14px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.9), 0 0 25px rgba(129, 131, 248, 0.3);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  touch-action: none;
  transition: box-shadow 0.2s ease;
}

.pip-floating-window.dragging {
  opacity: 0.92;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(129, 131, 248, 0.5);
  cursor: grabbing;
}

.pip-header {
  height: 36px;
  background: rgba(6, 17, 37, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.pip-header:active {
  cursor: grabbing;
}

.pip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 8px;
}

.pip-stream-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pip-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pip-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}

.pip-btn:hover {
  background: rgba(129, 131, 248, 0.3);
  color: var(--accent-cyan);
}

.pip-btn.close:hover {
  background: rgba(229, 9, 20, 0.3);
  color: #ff5252;
}

.pip-body {
  flex: 1;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

/* Resize Handles for PiP */
.pip-resize-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  z-index: 10;
}

.pip-resize-handle.nw {
  top: 0;
  left: 0;
  cursor: nw-resize;
}

.pip-resize-handle.ne {
  top: 0;
  right: 0;
  cursor: ne-resize;
}

.pip-resize-handle.sw {
  bottom: 0;
  left: 0;
  cursor: sw-resize;
}

.pip-resize-handle.se {
  bottom: 0;
  right: 0;
  cursor: se-resize;
  border-bottom: 2px solid var(--accent-cyan);
  border-right: 2px solid var(--accent-cyan);
  margin-right: 2px;
  margin-bottom: 2px;
}

/* ==============================================================
   HOME DASHBOARD 3-COLUMN WIDGETS (MATCHING ANDROID TV APP SCREENSHOT 2)
============================================================== */
.home-dashboard-row {
  display: flex;
  gap: 18px;
  align-items: stretch;
  width: 100%;
  height: 280px;
  flex-shrink: 0;
}

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

/* Column 1: Stacked Refresh Cards */
.dash-col-refresh {
  flex: 1.1;
  min-width: 260px;
  max-width: 320px;
  height: 280px;
  gap: 12px;
}

.dash-refresh-card {
  height: 134px;
  background: rgba(14, 21, 40, 0.95);
  border: 1px solid rgba(129, 131, 248, 0.22);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.dash-refresh-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 6px 22px rgba(129, 131, 248, 0.25);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
}

.dash-header-icon {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.15s;
}

.dash-header-icon:hover {
  color: #fff;
}

.dash-card-body-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-big-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.dash-card-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

.dash-pill-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: 0.5px;
}

.dash-pill-btn:hover {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #0C0D14;
}

.dash-pill-btn.sync-btn:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

/* Column 2: Account Info Widget */
.dash-col-account {
  flex: 1.25;
  min-width: 290px;
  max-width: 360px;
  height: 280px;
}

.dash-card-full {
  flex: 1;
  height: 280px;
  background: rgba(14, 21, 40, 0.95);
  border: 1px solid rgba(129, 131, 248, 0.22);
  border-radius: 16px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.dash-card-full:hover {
  border-color: var(--accent-cyan);
}

.dash-status-pill-mini {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.dash-status-pill-mini.active {
  background: rgba(0, 230, 118, 0.15);
  color: #00E676;
  border: 1px solid rgba(0, 230, 118, 0.4);
}

.dash-status-pill-mini.idle {
  background: rgba(129, 131, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(129, 131, 248, 0.4);
}

.dash-status-pill-mini.limit {
  background: rgba(255, 82, 82, 0.2);
  color: #ff5252;
  border: 1px solid rgba(255, 82, 82, 0.4);
}

.dash-account-details-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.dash-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-muted);
}

.dash-account-row strong {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.dash-card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.dash-conn-active-text {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.dash-card-micro-label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* Column 3: Expanded Speedtest & Buffer Diagnostics Card */
.dash-col-speed {
  flex: 1.65;
  min-width: 380px;
  height: 280px;
}

.dash-speed-verdict-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 14px;
  letter-spacing: 0.5px;
}

.dash-speed-verdict-pill.healthy {
  background: rgba(0, 230, 118, 0.2);
  color: #00E676;
  border: 1px solid rgba(0, 230, 118, 0.45);
}

.dash-speed-verdict-pill.idle {
  background: rgba(255, 152, 0, 0.2);
  color: #FF9800;
  border: 1px solid rgba(255, 152, 0, 0.45);
}

.dash-speed-verdict-pill.warning {
  background: rgba(255, 82, 82, 0.2);
  color: #ff5252;
  border: 1px solid rgba(255, 82, 82, 0.45);
}

.dash-speed-verdict-pill.ready {
  background: rgba(255, 152, 0, 0.2);
  color: #FFB300;
  border: 1px solid rgba(255, 179, 0, 0.45);
}

.dash-speed-verdict-pill.testing {
  background: rgba(129, 131, 248, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(129, 131, 248, 0.45);
}

.dash-speed-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}

.dash-speed-big-num {
  font-size: 40px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.dash-speed-unit {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
}

.dash-latency-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.dash-latency-badge strong {
  color: #fff;
}

.dash-tip-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-tip-icon {
  color: #FFB300;
  font-size: 14px;
  margin-top: 1px;
  flex-shrink: 0;
}

.dash-tip-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
  margin: 0;
}

.dash-retest-btn {
  height: 44px;
  width: 100%;
  background: linear-gradient(135deg, #6366F1 0%, #8183F8 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  letter-spacing: 0.6px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.dash-retest-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(129, 131, 248, 0.5);
}

/* ==============================================================
   CLEAN 2-BOX EPG BADGES FOR CHANNEL BARS (MATCHING ANDROID TV APP)
============================================================== */
.channel-bar-epg-deck {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1;
  overflow: hidden;
  height: 74px;
}

.epg-static-box {
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  height: 74px;
}

.epg-static-box.on-air {
  flex: 58;
  background: #140E1B;
  border: 1.2px solid rgba(255, 77, 79, 0.35);
  border-left: 4px solid #ff4d4f;
}

.epg-static-box.next {
  flex: 42;
  background: #09172E;
  border: 1.2px solid rgba(129, 131, 248, 0.25);
  border-left: 4px solid #8183F8;
}

.epg-badge-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}

.epg-onair-tag {
  color: #ff4d4f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.epg-next-tag {
  color: #8183F8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.epg-box-time {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
}

.epg-pct-badge {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 700;
  margin-left: auto;
}

.epg-box-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.epg-static-progress-track {
  height: 4.5px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 5px;
}

.epg-static-progress-fill {
  height: 100%;
  background: #ff3333;
  box-shadow: 0 0 10px rgba(255, 51, 51, 0.85);
}

/* ==============================================================
   DEDICATED EPG GUIDE VIEW (TIMELINE & MINI PREVIEW)
============================================================== */
.epg-guide-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #070E1E;
}

.epg-top-deck {
  height: 160px;
  background: #091224;
  border-bottom: 1px solid #141C30;
  padding: 12px 18px;
  display: flex;
  gap: 14px;
  align-items: stretch;
  flex-shrink: 0;
}

.epg-meta-panel {
  flex: 42;
  background: #0E172C;
  border: 1px solid #1E2842;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.epg-meta-logo-box {
  width: 54px;
  height: 54px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #1E2842;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 4px;
}

.epg-meta-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.epg-meta-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.epg-meta-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.epg-meta-channel-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.epg-meta-fav-star {
  color: var(--accent-gold);
  font-size: 14px;
  margin-right: 2px;
}

.epg-meta-time-badge {
  font-size: 11.5px;
  color: var(--accent-gold);
  font-weight: 600;
}

.epg-meta-show-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  margin-bottom: 2px;
}

.epg-meta-synopsis {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.epg-meta-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.epg-meta-progress-track {
  width: 240px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.epg-meta-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1A3B66, var(--accent-cyan));
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.4);
}

.epg-meta-elapsed-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

/* Coming Up Next Card */
.epg-next-panel {
  flex: 28;
  background: #0E172C;
  border: 1px solid #1E2842;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.epg-next-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.epg-next-tag {
  background: rgba(125, 211, 252, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(125, 211, 252, 0.3);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.epg-next-time {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-gold);
}

.epg-next-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.epg-next-synopsis {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* Mini Preview Panel (16:9) */
.epg-preview-panel {
  width: 290px;
  height: 100%;
  background: #060B18;
  border-radius: 12px;
  border: 1.5px solid #1E2842;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.epg-preview-surface {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.epg-preview-surface video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.epg-preview-idle {
  position: absolute;
  inset: 0;
  background: #060D1A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  overflow: hidden;
}

.epg-preview-watermark {
  position: absolute;
  max-width: 60%;
  max-height: 60%;
  opacity: 0.16;
  object-fit: contain;
  pointer-events: none;
  filter: grayscale(30%);
}

.epg-preview-play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1A3B66;
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 18px;
  box-shadow: 0 0 16px rgba(125, 211, 252, 0.35);
  z-index: 2;
  transition: all 0.2s ease;
}

.epg-preview-panel:hover .epg-preview-play-icon {
  transform: scale(1.08);
  background: var(--accent-cyan);
  color: #060D1A;
}

.epg-preview-idle-text {
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.8px;
  z-index: 2;
}

.epg-preview-spinner {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent-cyan);
  font-size: 14px;
}

.epg-preview-live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent-red);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.epg-preview-banner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-cyan);
  cursor: pointer;
  letter-spacing: 0.6px;
}

/* EPG 3-Day Quick Navigation Bar */
.epg-day-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: #081020;
  border-bottom: 1px solid #141C30;
  gap: 10px;
  flex-shrink: 0;
  z-index: 10;
}

.epg-day-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.epg-day-chips::-webkit-scrollbar {
  display: none;
}

.epg-day-btn {
  background: #0F172A;
  border: 1px solid #1E2235;
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.18s ease;
  user-select: none;
}

.epg-day-btn:hover {
  background: #172238;
  border-color: var(--accent-cyan);
}

.epg-day-btn.active {
  background: #1A3B66 !important;
  border: 2px solid var(--accent-cyan) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.25) !important;
}

.epg-timeline-indicator {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Timeline Grid & Dark Scrollbars */
.epg-timeline-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #1E2842 #091022;
}

.epg-timeline-container::-webkit-scrollbar,
.epg-timeline-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.epg-timeline-container::-webkit-scrollbar-track,
.epg-timeline-body::-webkit-scrollbar-track {
  background: #091022;
}

.epg-timeline-container::-webkit-scrollbar-thumb,
.epg-timeline-body::-webkit-scrollbar-thumb {
  background: #1E2842;
  border-radius: 4px;
}

.epg-timeline-container::-webkit-scrollbar-thumb:hover,
.epg-timeline-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.epg-timeline-header-row {
  height: 36px;
  background: #0B172E;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #1A2338;
  flex-shrink: 0;
  min-width: max-content;
  position: sticky;
  top: 0;
  z-index: 30;
}

.epg-channel-col-header {
  width: 240px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 35;
  background: #0B172E;
  box-shadow: 3px 0 8px rgba(0, 0, 0, 0.4);
}

.epg-time-slots-header {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: visible;
}

.epg-time-slot-item {
  width: 260px;
  min-width: 260px;
  padding: 0 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
}

.epg-time-slot-item.now {
  color: var(--accent-cyan);
  font-weight: 800;
}

.epg-time-slot-item.day-boundary {
  border-left: 2px solid var(--accent-cyan) !important;
  background: rgba(125, 211, 252, 0.06) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.epg-day-separator-tag {
  background: #141C30;
  color: var(--accent-cyan);
  border: 1px solid #23304E;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.epg-timeline-body {
  overflow: visible;
  display: block;
  min-width: max-content;
}

.epg-timeline-row {
  height: 68px;
  min-height: 68px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s;
  min-width: max-content;
}

.epg-timeline-row:hover,
.epg-timeline-row.active {
  background: rgba(125, 211, 252, 0.06) !important;
  border-left: 4px solid var(--accent-cyan) !important;
}

.epg-channel-cell {
  width: 240px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: sticky;
  left: 0;
  z-index: 20;
  background: #080E1C;
  box-shadow: 3px 0 8px rgba(0, 0, 0, 0.4);
}

.epg-channel-num {
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  min-width: 22px;
}

.epg-channel-cell img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 2px;
}

.epg-channel-cell span {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.epg-programs-track {
  flex: 1;
  display: flex;
  height: 100%;
  align-items: center;
  overflow: hidden;
}

.epg-program-block {
  width: 260px;
  min-width: 260px;
  height: 54px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  margin-right: 6px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition: all 0.15s ease;
}

.epg-program-block:hover {
  background: #172238;
  border-color: var(--accent-cyan);
}

.epg-program-block.on-air {
  border: 1.5px solid #233A5E !important;
  background: #101B2E !important;
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.epg-program-block-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold) !important;
}

.epg-program-block-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 5px;
}

.epg-program-block.on-air .epg-program-block-title::before {
  content: "●";
  color: var(--accent-red);
  font-size: 9px;
  display: inline-block;
}

/* ==============================================================
   SETTINGS 3-TAB VIEW & SWITCH TOGGLES (MATCHING ANDROID TV APP)
============================================================== */
.settings-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.settings-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.settings-tab-btn:hover {
  background: rgba(129, 131, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
}

.settings-tab-btn.active {
  background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-red) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.35);
}

/* Toggle Switch */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 24px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: var(--accent-cyan);
}

input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* ==============================================================
   iOS SAFARI "ADD TO HOME SCREEN" INSTALL BANNER
============================================================== */
.ios-install-banner {
  display: none;
  position: fixed;
  bottom: 80px;
  left: 14px;
  right: 14px;
  background: rgba(14, 21, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--accent-cyan);
  border-radius: 14px;
  padding: 12px 14px;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 16px rgba(125, 211, 252, 0.25);
  animation: slideUp 0.35s ease-out;
}

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

.ios-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ios-install-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #000;
  flex-shrink: 0;
}

.ios-install-text {
  flex: 1;
}

.ios-install-text strong {
  display: block;
  font-size: 13.5px;
  color: #fff;
  margin-bottom: 2px;
}

.ios-install-text p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
  margin: 0;
}

.ios-install-text i {
  color: var(--accent-cyan);
  margin: 0 2px;
}

.ios-install-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94A3B8;
  font-size: 20px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ios-install-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}


