:root {
  --bg-dark: #0a0e17;
  --bg-panel: rgba(20, 25, 40, 0.95);
  --bg-sidebar: #0f1525;
  --primary-blue: #1a2236;
  --accent-yellow: #d4c218;
  --text-white: #ffffff;
  --text-gray: #a0a5b5;
  --focus-border: #4cc9f0;
  --focus-bg: #d4c218;
  /* Yellow focus for sidebar items based on image */
  --focus-text: #000;
  --item-hover: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  /* Important for TV interfaces */
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-white);
  overflow: hidden;
  /* Prevent scrolling on TV */
  width: 100vw;
  width: 100vw;
  height: 100vh;
}

html {
  font-size: 20px;
  /* Scale up base size for rem units */
}

.app-container {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Sidebar */
/* Sidebar */
.sidebar {
  width: 90px;
  /* Slightly wider for better touch targets */
  background: rgba(15, 21, 37, 0.6);
  /* Semi-transparent */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: width 0.3s ease;
}

.logo-area {
  padding: 30px 10px 20px;
  text-align: center;
  margin-bottom: 0;
}

/* Power Button Logo */
.logo-power-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.1)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.logo-power-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.2) 0%,
    /* Gold glow hint */ transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.logo-power-btn i {
  color: #fff;
  font-size: 22px;
  z-index: 1;
  transition: color 0.3s;
}

.logo-power-btn:hover,
.logo-power-btn:focus {
  /* transform: scale(1.15); */
  border-color: var(--accent-yellow);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.logo-power-btn:hover i {
  color: var(--accent-yellow);
}

.logo-power-btn:hover::after {
  opacity: 1;
}

.sidebar-logo-img {
  width: 55px;
  height: auto;
  margin-bottom: 8px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-text {
  display: block;
  font-size: 11px;
  opacity: 0.8;
  letter-spacing: 0.5px;
}

.logo-text strong {
  color: #ffd700;
  font-weight: 700;
}

.version {
  display: block;
  font-size: 0.5625rem;
  /* 9px */
  color: var(--text-gray);
  margin-top: 4px;
  opacity: 0.6;
}

.nav-menu {
  list-style: none;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  /* Increased gap */
  padding-top: 20px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  cursor: pointer;
  border-radius: 16px;
  /* Squircle */
  /* transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); */
  opacity: 0.6;
  position: relative;
}

.nav-item .icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: transparent;
  color: #e0e6ed;
  /* transition: all 0.3s; */
  border: 1px solid transparent;
  /* Prevent layout shift */
}

/* Sidebar Hover/Active/Focus */
.nav-item:hover {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active,
.nav-item:focus {
  opacity: 1;
  /* transform: translateX(5px); */
}

.nav-item.active .icon-circle,
.nav-item:focus .icon-circle {
  background: linear-gradient(
    135deg,
    rgba(255, 215, 0, 0.1),
    rgba(255, 159, 67, 0.2)
  );
  color: var(--accent-yellow);
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
  transform: none;
  /* Reset transform for child if needed, but here simple is good */
}

/* Active Indicator Line */
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -15px;
  /* Outside sidebar slightly? Or inside. */
  height: 20px;
  width: 3px;
  background: var(--accent-yellow);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--accent-yellow);
}

.nav-label {
  position: absolute;
  left: 70px;
  background: rgba(0, 0, 0, 0.8);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  /* 12px */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* transform: translateX(10px); */
}

.nav-item:hover .nav-label,
.nav-item:focus .nav-label {
  opacity: 1;
  /* transform: translateX(0); */
}

/* Info View Premium */
#info-view {
  padding: 0;
  height: 100vh;
  box-sizing: border-box;
  background: radial-gradient(circle at center, #1e2535 0%, #0a0e17 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-container {
  width: 80%;
  max-width: 900px;
  height: 85vh;
}

.info-card-premium {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* Subtle border */
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding: 50px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header Section */
.info-header {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-logo-large {
  width: 70px;
  height: 70px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 2rem;
  /* 32px */
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.title-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.app-name-large {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #a0a5b5);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #a0a5b5;
  width: fit-content;
  margin-top: 5px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #a0a5b5;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--accent-yellow);
  color: #000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  /* Space for scrollbar */
}

/* Custom Scrollbar for Info Grid */
.info-grid::-webkit-scrollbar {
  width: 6px;
}

.info-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.info-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition:
    transform 0.2s,
    background 0.2s;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.06);
  /* transform: translateY(-2px); */
  border-color: rgba(255, 255, 255, 0.1);
}

.info-item.full-width {
  grid-column: span 2;
}

.icon-box {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent-yellow);
}

.text-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.text-box label {
  font-size: 0.85rem;
  color: #a0a5b5;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

.contact-phones {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.divider {
  color: #a0a5b5;
  opacity: 0.5;
}

/* RTL Support */
.rtl-mode {
  direction: rtl;
}

.rtl-mode .info-logo-large {
  margin-right: 0;
  margin-left: 20px;
}

.rtl-mode .info-item {
  flex-direction: row;
  /* Ensure flex direction is consistent, though row automatically flips in RTL */
}

/* Back Button */
#close-info-btn {
  align-self: flex-start;
  margin-top: 30px;
  padding: 12px 30px;
  font-size: 1rem;
  background: #e74c3c;
  border-color: #c0392b;
  /* Darker red border */
  color: #fff;
  border-radius: 8px;
  /* Ensure rounded corners */
}

#close-info-btn:hover,
#close-info-btn:focus {
  background: #ff4757;
  border-color: #ff4757;
  /* transform: scale(1.05); */
  box-shadow: 0 0 15px rgba(255, 71, 87, 0.4);
}

.rtl-mode #close-info-btn {
  align-self: flex-end;
  /* Or flex-start depending on desired position */
}

.rtl-mode #close-info-btn i {
  transform: rotate(180deg);
  /* Flip arrow */
}

/* Settings View Redesign */
#settings-view {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  background: radial-gradient(circle at center, #0f1525 0%, #050505 100%);
  z-index: 1000;
}

.settings-overlay-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../assets/bg-settings.jpg") no-repeat center center/cover;
  /* if available, else ignored */
  opacity: 0.2;
  filter: blur(10px);
  z-index: -1;
}

.settings-layout {
  display: flex;
  width: 80%;
  /* Reduced from 90% */
  max-width: 1100px;
  /* Reduced from 1400px */
  height: 75vh;
  /* Reduced from 85vh */
  margin: auto;
  /* Perfectly Center */
  background: rgba(15, 21, 37, 0.85);
  /* Slightly more opaque */
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Settings Sidebar */
.settings-sidebar {
  width: 280px;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 30px 0;
}

.settings-sidebar-header {
  padding: 0 30px 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

.settings-sidebar-header i {
  font-size: 1.5rem;
  /* 24px */
  color: var(--accent-yellow);
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.settings-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
  color: #fff;
}

.settings-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 15px;
  flex-grow: 1;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-radius: 12px;
  cursor: pointer;
  color: #a0a5b5;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.settings-nav-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  /* transition: color 0.2s; */
}

/* Hover/Focus/Active States */
.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.settings-nav-item.active,
.settings-nav-item:focus {
  background: linear-gradient(
    90deg,
    rgba(255, 215, 0, 0.15),
    rgba(255, 215, 0, 0.05)
  );
  color: #fff;
  border: 1px solid rgba(255, 215, 0, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.settings-nav-item.active i,
.settings-nav-item:focus i {
  color: var(--accent-yellow);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.settings-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  width: 3px;
  background: var(--accent-yellow);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px var(--accent-yellow);
}

.settings-sidebar-footer {
  padding: 20px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#close-settings-btn {
  width: 100%;
  background: #e74c3c;
  /* Red base */
  border: 1px solid #c0392b;
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#close-settings-btn:hover,
#close-settings-btn:focus {
  background: #ff4757;
  border-color: #ff4757;
  /* transform: translateY(-2px); */
  box-shadow: 0 0 15px rgba(255, 71, 87, 0.4);
}

/* Right Content Area */
.settings-content-area {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  position: relative;
  background: rgba(0, 0, 0, 0.1);
  /* Subtle dark base */
}

/* Scrollbar */
.settings-content-area::-webkit-scrollbar {
  width: 6px;
}

.settings-content-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.settings-tab-pane {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.settings-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-header {
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

.tab-header h3 {
  font-size: 1.8rem;
  margin: 0;
  background: linear-gradient(to right, #fff, #ffd700);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  width: fit-content;
}

.tab-header p {
  color: #888;
  margin-top: 8px;
  font-size: 0.95rem;
}

/* Info Cards (Account) */
.info-row-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-yellow);
  font-size: 1.4rem;
}

.info-data label {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-data input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: "Courier New", monospace;
  width: 100%;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

/* Card Styles */
.qr-card,
.contact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}

.qr-code-box {
  background: #fff;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.qr-text h4 {
  margin: 0 0 5px 0;
  color: #fff;
}

.qr-text p {
  margin: 0;
  color: #888;
  font-size: 0.9rem;
}

/* Contact Items */
.contact-card {
  align-items: flex-start;
  text-align: left;
  gap: 20px;
}

.contact-details {
  display: flex;
  flex-direction: column;
}

.contact-details .label {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
}

.contact-details .value {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
}

.account-disclaimer {
  margin-top: auto;
  display: flex;
  gap: 15px;
  background: rgba(255, 159, 67, 0.1);
  border: 1px solid rgba(255, 159, 67, 0.2);
  padding: 15px;
  border-radius: 12px;
  color: #ffccbc;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Playlist List in Settings */
.settings-playlist-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 5px;
}

.settings-playlist-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 15px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  cursor: pointer;
}

.settings-playlist-item.active-pl {
  border-color: var(--accent-yellow);
  background: rgba(255, 215, 0, 0.05);
}

.settings-playlist-item:hover,
.settings-playlist-item:focus {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.pl-name {
  font-weight: 600;
}

.pl-type-badge {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  margin-left: 10px;
  text-transform: uppercase;
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.toast {
  background: rgba(30, 30, 30, 0.95);
  color: #fff;
  padding: 15px 25px;
  border-radius: 10px;
  border-left: 4px solid var(--accent-yellow);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  animation: slideInRight 0.3s ease-out forwards;
  min-width: 300px;
}

.toast.success {
  border-color: #2ecc71;
}

.toast.error {
  border-color: #e74c3c;
}

.toast i {
  font-size: 1.2rem;
}

.toast.success i {
  color: #2ecc71;
}

.toast.error i {
  color: #e74c3c;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Main Content */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
/* Header */
.top-bar {
  height: 90px;
  /* Increased height for better spacing */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  /* Glassmorphism Effect */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 10px;
  /* Added spacing above header (half of bottom) */
  position: relative;
  z-index: 50;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
  /* Added spacing below header */
}

.top-bar::after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(212, 194, 24, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.7;
}

.badge {
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.yellow-badge {
  background: linear-gradient(135deg, #ffd700, #ff9f43);
  color: #000;
  margin-right: 20px;
  border: none;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.current-path {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 5px 20px 5px 5px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.path-text {
  font-size: 16px;
  font-weight: 600;
  color: #e0e6ed;
  font-family: "Inter", sans-serif;
  letter-spacing: 0.5px;
}

.system-status {
  display: flex;
  gap: 25px;
  font-size: 13px;
  color: var(--text-gray);
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.status-item {
  display: flex;
  align-items: center;
}

.system-status i {
  margin-right: 8px;
  color: #4cc9f0;
  /* Use theme secondary color */
}

.highlight-orange {
  color: #ff9f43;
  margin-left: 5px;
  font-weight: 600;
}

.highlight-white {
  color: #fff;
  font-weight: 700;
  margin-left: 5px;
  letter-spacing: 1px;
}

/* Header Search Bar Redesign */
.header-search-bar {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  width: 250px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.header-search-bar:focus,
.header-search-bar.focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 15px rgba(212, 194, 24, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.header-search-bar .search-placeholder::after {
  content: "Search channels...";
}

.header-search-bar i {
  margin-left: auto;
  color: var(--accent-yellow);
}

.header-voice {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.header-voice:focus,
.header-voice.focus-visible {
  background: var(--accent-yellow);
  color: #000;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.header-voice i {
  font-size: 16px;
}

/* Columns Layout */
/* ... existing styles ... */

/* =========================================
   NEW SETTINGS REDESIGN (Split View)
   ========================================= */

.settings-overlay-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 0;
}

.settings-layout {
  position: relative;
  width: 90%;
  max-width: 1400px;
  height: 85vh;
  background: rgba(20, 25, 40, 0.95);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
  display: flex;
  overflow: hidden;
  z-index: 10;
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Left Sidebar --- */
.settings-sidebar {
  width: min(300px, 30%);
  /* Responsive sidebar */
  background: rgba(15, 20, 30, 0.6);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 30px 20px;
}

.settings-sidebar-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
  padding-left: 10px;
}

.settings-sidebar-header i {
  font-size: 24px;
  color: var(--accent-yellow);
  background: rgba(255, 215, 0, 0.1);
  padding: 10px;
  border-radius: 12px;
}

.settings-sidebar-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(to right, #fff, #bbb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.settings-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: auto;
  /* Push footer down */
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  color: #a0a5b5;
  font-weight: 500;
  border: 1px solid transparent;
}

.settings-nav-item i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.settings-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.settings-nav-item.active {
  background: linear-gradient(
    90deg,
    rgba(212, 194, 24, 0.15),
    rgba(212, 194, 24, 0.05)
  );
  border-left: 3px solid var(--accent-yellow);
  color: #fff;
}

.settings-nav-item:focus {
  background: #fff;
  color: #000;
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.settings-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
}

.back-btn {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.back-btn:hover,
.back-btn:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: #fff;
}

/* --- Right Content Area --- */
.settings-content-area {
  flex: 1;
  padding: 40px 50px;
  overflow-y: auto;
  background: radial-gradient(
    circle at top right,
    rgba(21, 30, 48, 0.5),
    transparent
  );
}

.settings-tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.settings-tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-header {
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

.tab-header h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.tab-header p {
  color: #8892b0;
  font-size: 1rem;
}

/* Info Cards (Account Tab) */
.info-row-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent-yellow);
}

.info-data {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-data label {
  font-size: 0.85rem;
  color: #8892b0;
  text-transform: uppercase;
  font-weight: 600;
}

.info-data input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  font-family: monospace;
  letter-spacing: 1px;
  width: 100%;
}

.qr-placeholder {
  margin-top: 40px;
  height: 200px;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #666;
}

.qr-placeholder i {
  font-size: 40px;
  opacity: 0.5;
}

/* Forms (Playlist Tab) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  margin-bottom: 12px;
  color: #bbb;
  font-size: 0.95rem;
  font-weight: 500;
}

.form-group label i {
  color: var(--accent-yellow);
  margin-right: 8px;
  width: 16px;
}

.modern-input,
.modern-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 20px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.2s;
}

.modern-input:focus,
.modern-select:focus {
  outline: none;
  border-color: var(--accent-yellow);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px rgba(212, 194, 24, 0.1);
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper .toggle-pass {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  cursor: pointer;
  padding: 10px;
}

/* Actions Footer */
.action-footer {
  margin-top: 50px;
  display: flex;
  gap: 20px;
}

.save-btn {
  flex: 2;
  background: var(--accent-yellow);
  color: #000;
  border: none;
  padding: 18px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.1s;
}

.reset-btn {
  flex: 1;
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
  padding: 18px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.save-btn:focus,
.reset-btn:focus {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  outline: none;
}

/* General Tab */
.setting-toggle-row {
  background: rgba(255, 255, 255, 0.03);
  padding: 25px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.toggle-info h4 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}

.toggle-info p {
  margin: 0;
  color: #777;
  font-size: 0.9rem;
}

.setting-select-row {
  background: rgba(255, 255, 255, 0.03);
  padding: 25px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.setting-select-row label {
  display: block;
  margin-bottom: 15px;
  font-weight: 600;
  color: #ddd;
}

.app-version-footer {
  margin-top: 50px;
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
  font-family: monospace;
  font-size: 0.9rem;
}

/* =========================================
   ACCOUNT TAB REDESIGN
   ========================================= */

.account-grid {
  display: flex;
  gap: 40px;
  margin-top: 30px;
  align-items: flex-start;
}

.qr-col {
  flex: 0 0 auto;
}

.contact-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

/* Updated QR Card */
.qr-card {
  padding: 25px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  width: 100%;
  /* Responsive card width */
  max-width: 280px;
  text-align: center;
}

.qr-code-box {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e2535;
  /* Blue bg matches generator */
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Subtle border definition */
}

.qr-code-box img {
  width: 100%;
  height: 100%;
  display: block;
  /* Removed blend mode to keep colors pure */
}

.qr-text {
  margin-top: 10px;
}

.qr-text h4 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 0 5px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.qr-text p {
  color: #444;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
}

/* Contact Cards */
.contact-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  gap: 25px;
  transition: all 0.3s;
  cursor: pointer;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(10px);
  border-color: var(--accent-yellow);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: rgba(212, 194, 24, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--accent-yellow);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-details .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #8892b0;
  font-weight: 600;
  letter-spacing: 1px;
}

.contact-details .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
}

/* End of Contact Section Styles */

/* Details Cast Styling */
.cast-scroller {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 10px 0;
  margin-top: 10px;
  scrollbar-width: none;
  /* Firefox */
}

.cast-scroller::-webkit-scrollbar {
  display: none;
}

.actor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
  flex-shrink: 0;
  text-align: center;
}

.actor-img-box {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 8px;
  background: #2a2a3e;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.actor-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.actor-placeholder {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, #1f2937, #111827);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.actor-name {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-director {
  margin-bottom: 15px;
  font-size: 0.95rem;
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.meta-label {
  color: #94a3b8;
  margin-right: 5px;
}

.meta-val {
  color: white;
  font-weight: 600;
}

.account-disclaimer {
  margin-top: 10px;
  padding: 15px;
  background: rgba(255, 215, 0, 0.05);
  /* Very subtle gold tint */
  border-left: 3px solid var(--accent-yellow);
  border-radius: 8px;
  display: flex;
  gap: 15px;
  align-items: center;
}

.account-disclaimer i {
  color: var(--accent-yellow);
  font-size: 1.2rem;
}

.account-disclaimer p {
  color: #ccc;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* Restored .content-wrapper */
/* Restored .content-wrapper */
.content-wrapper {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  padding: 0 30px 30px 30px;
  /* Add padding around the content too */
  gap: 15px;
  /* Reduced space between columns */
}

.column {
  background-color: rgba(20, 26, 40, 0.6);
  border-radius: 0;
  /* Remove rounded corners per request */
  display: flex;
  flex-direction: column;
  border: none;
  /* Remove border */
}

.categories-column {
  width: 20%;
  min-width: 250px;
  /* Removed borders as they are on .column now */
}

.channels-column {
  width: 25%;
  min-width: 300px;
  /* Removed borders as they are on .column now */
}

/* ... */

/* ... */

.preview-column {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
  /* Increased vertical gap */
  overflow-y: auto;
  /* Enable vertical scrolling */
  max-height: 100%;
  /* Ensure it respects parent height */
  padding-right: 5px;
  /* Prevent scrollbar overlapping content */
}

.column-header {
  background-color: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.column-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
}

.sub-text {
  font-size: 12px;
  color: var(--text-gray);
}

.scrollja-list {
  list-style: none;
  overflow-y: auto;
  flex-grow: 1;
  padding: 8px;
}

/* List Items */
.list-item {
  padding: 12px 15px;
  margin-bottom: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 3px solid transparent;
  transition: all 0.15s ease-out;
}

.list-item .item-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.list-item .item-count {
  font-size: 12px;
  color: var(--text-gray);
}

.channel-number {
  background: #fff;
  color: #000;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 10px;
}

.flag-icon {
  width: 24px;
  height: auto;
  margin-left: auto;
}

/* Channel List Specific Overrides */
#channels-ul .list-item {
  justify-content: flex-start;
  gap: 5px;
}

#channels-ul .flag-icon {
  width: 35px;
  margin-left: 0;
  margin-right: 10px;
}

.channel-name {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
  line-height: 1.3;
}

/* Quality Badges - Gold Design */
.gold-badge {
  display: flex;
  flex-direction: column;
  border: 1px solid #ffd700;
  /* Bright Gold */
  border-radius: 3px;
  overflow: hidden;
  margin-left: 10px;
  margin-right: auto;
  min-width: 38px;
  box-shadow: 0 0 4px rgba(255, 215, 0, 0.3);
}

.badge-res {
  color: #ffd700;
  /* Bright Gold text */
  font-size: 10px;
  font-weight: 900;
  /* Bolder */
  text-align: center;
  padding: 1px 3px;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.badge-lbl {
  background: linear-gradient(to bottom, #ffe066, #b39700);
  /* Brighter gradient */
  color: #000;
  font-size: 7px;
  font-weight: 800;
  text-align: center;
  padding: 1px 3px;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

/* Focused State in Lists */
.list-item:focus,
.list-item.focus-visible {
  background-color: var(--focus-bg);
  /* Yellow */
  color: var(--focus-text);
  transform: scale(1.02);
  border-left: 3px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.list-item:focus .item-count,
.list-item:focus .channel-number {
  color: #444;
}

/* Active State (Selected but not focused) */
.list-item.active {
  background-color: rgba(255, 255, 255, 0.15);
  border-left: 3px solid var(--accent-yellow);
}

/* Video Player Area */
.mini-player-container {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #000;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Mini Player Text Scaling */
.mini-player-container .overlay-text h3 {
  font-size: 0.9rem !important;
}

.mini-player-container .overlay-text span {
  font-size: 0.75rem !important;
}

.mini-player-container .player-title {
  font-size: 0.85rem !important;
}

.video-element {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Fix: Show full video, don't crop/zoom */
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 20px;
  opacity: 0;
  /* Show on hover/focus or global state */
  transition: opacity 0.3s;
}

.channel-info-overlay {
  display: flex;
  align-items: center;
  gap: 15px;
}

.channel-logo-overlay {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  /* subtle bg for transparent logos */
}

/* Fullscreen Overrides */
:fullscreen .overlay-text h3 {
  font-size: 2.5rem;
  /* Large format for Big Screen */
}

:fullscreen .overlay-text span {
  font-size: 1.5rem;
}

:fullscreen .channel-logo-overlay {
  width: 100px;
  /* Larger logo */
  height: 100px;
}

:fullscreen .channel-info-overlay {
  gap: 30px;
  padding: 20px;
}

/* Mini Player Overrides (Already added text above, adding logo) */
.mini-player-container .channel-logo-overlay {
  width: 30px;
  height: 30px;
}

.overlay-text h3 {
  margin-bottom: 2px;
  font-size: 1rem;
  /* Reduced from default h3 */
}

.overlay-text span {
  font-size: 0.85rem;
  opacity: 0.8;
}

.resolution-badge {
  display: none;
  /* User requested removal (implied by 'doesn't look good') */
}

/* EPG Info Box */
.epg-info-box {
  background-color: #152134;
  color: #dedede;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  border-left: 5px solid #b3a200;
}

.program-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.program-header i {
  font-size: 20px;
  color: #2e7d32;
  /* Green play icon */
}

.program-header h2 {
  font-size: 22px;
  font-weight: 700;
}

#current-program-desc {
  font-size: 14px;
  margin-bottom: 15px;
  opacity: 0.8;
}

.progress-area {
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 600;
}

.progress-bar-bg {
  flex-grow: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: #e53935;
  /* Red progress */
}

.date-row {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
  opacity: 0.7;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Spinner */
.video-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--accent-yellow);
  font-size: 3rem;
  z-index: 10;
  pointer-events: none;
  display: none;
  /* toggled by JS */
}

.video-spinner i {
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
}

/* Suggested Channels (Below EPG) */
.suggested-overlay {
  position: relative;
  /* Changed from absolute */
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  background-color: rgba(20, 26, 40, 0.6);
  /* Match EPG box style? */
  border-radius: 8px;
  /* Match EPG box */
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  /* border: 1px solid rgba(255, 255, 255, 0.1); */
}

.suggested-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.suggested-header-mini {
  font-size: 14px;
  font-weight: 600;
  color: #ddd;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.suggested-strip {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
}

.suggested-strip::-webkit-scrollbar {
  display: none;
}

.suggested-item-mini {
  flex: 0 0 auto;
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 6px;
}

.suggested-item-mini:hover,
.suggested-item-mini:focus {
  transform: translateY(-5px);
  background: linear-gradient(
    135deg,
    rgba(64, 196, 255, 0.4) 0%,
    rgba(30, 30, 40, 0.9) 100%
  );
  border-color: rgba(64, 196, 255, 0.8);
  box-shadow: 0 10px 25px rgba(64, 196, 255, 0.4);
  outline: none;
}

.suggested-logo-mini {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.suggested-name-mini {
  font-size: 11px;
  text-align: center;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* =========================================
   DASHBOARD / HOME SCREEN STYLES
   ========================================= */

.dashboard-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at center, #1e2535 0%, #0a0e17 100%);
  position: relative;
  overflow: hidden;
  padding: 40px;
  box-sizing: border-box;
}

/* Background rays effect */
.dashboard-container::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 20%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 60%
  );
  transform: rotate(20deg);
  pointer-events: none;
  z-index: 0;
}

.dash-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  margin-bottom: 20px;
  padding: 0 20px;
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.dash-logo .logo-img {
  height: 54px;
  width: auto;
  object-fit: contain;
  display: block;
}

.dash-logo-text {
  font-size: 1.42rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.logo-fallback {
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1px;
}

.logo-fallback i {
  color: var(--accent-yellow);
  background: rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  /* Triangle shape logic handled by icon but circle bg looks good */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.dash-search-container {
  flex-grow: 1;
  max-width: 600px;
  margin: 0 40px;
  position: relative;
  height: 50px;
  background: rgba(255, 255, 255, 0.15);
  /* More visible glass */
  border-radius: 25px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.dash-search-container:focus,
.dash-search-container.focus-visible {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--accent-yellow);
  transform: scale(1.02);
}

.dash-search-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  flex-grow: 1;
  outline: none;
}

.search-icon-right {
  color: rgba(0, 0, 0, 0.5);
  /* As seen in image, dark icon on lighter bg maybe? Or light. Image shows dark glass */
  font-size: 20px;
  opacity: 0.7;
}

.dash-top-right-icons {
  display: flex;
  gap: 15px;
}

.dash-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.15);
  /* Subtle Blue Tint */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #3498db;
  /* Blue Icon */
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(52, 152, 219, 0.3);
  /* Blue Border */
}

.dash-icon-circle:hover {
  background: #3498db;
  /* Solid Blue on Interaction */
  color: #fff;
  /* White Icon */
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
}

.dash-icon-circle:focus,
.dash-icon-circle.focus-visible {
  border-radius: 50% !important;
  border: 2px solid rgba(64, 196, 255, 0.8) !important;
  background: linear-gradient(
    135deg,
    rgba(64, 196, 255, 0.4) 0%,
    rgba(30, 30, 40, 0.9) 100%
  ) !important;
  box-shadow: 0 10px 25px rgba(64, 196, 255, 0.4) !important;
  color: white !important;
  transform: scale(1.1);
}

/* User profile specific -> Red */
.dash-icon-circle[data-action="settings"][data-settings-tab="tab-profile"] {
  background: rgba(211, 47, 47, 0.2);
  border: 1px solid rgba(211, 47, 47, 0.4);
  color: #ff5252 !important;
}

.dash-icon-circle[data-action="settings"][data-settings-tab="tab-profile"]:hover {
  background: #d32f2f;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(211, 47, 47, 0.6);
}

/* QR Code -> White (Original) */
.dash-icon-circle[data-action="open_qr"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dash-icon-circle[data-action="open_qr"]:hover {
  background: #fff;
  color: #000 !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Radio -> White (Original) */
.dash-icon-circle[data-action="open_radio"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dash-icon-circle[data-action="open_radio"]:hover {
  background: #fff;
  color: #000 !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Playlist -> White (Original) */
.dash-icon-circle[data-action="settings"][data-settings-tab="tab-playlist"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.dash-icon-circle[data-action="settings"][data-settings-tab="tab-playlist"]:hover {
  background: #fff;
  color: #000 !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

/* Settings (General) -> Silver/Grey */
.dash-icon-circle[data-action="settings"]:not([data-settings-tab]) {
  background: rgba(176, 190, 197, 0.15);
  border: 1px solid rgba(176, 190, 197, 0.3);
  color: #b0bec5;
}

.dash-icon-circle[data-action="settings"]:not([data-settings-tab]):hover {
  background: #b0bec5;
  color: #000 !important;
  box-shadow: 0 0 15px rgba(176, 190, 197, 0.6);
}

/* Cards Row */
.dash-cards-row {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  z-index: 10;
  margin-bottom: 40px;
}

.dash-card {
  position: relative;
  width: 550px;
  /* Further Enlarged */
  height: 360px;
  /* Further Enlarged */
  background: rgba(255, 255, 255, 0.05);
  /* Glass base */

  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

/* Specific Card Gradients/Styles to match image */
.dash-card[data-target="live-tv"] {
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9)),
    url("../assets/bg_live_tv.png");
  background-size: cover;
  background-position: center;
  transform: rotate(-3deg);
  /* Slanted */
  margin-right: 20px;
  /* Space for rotation */
  z-index: 5;
}

/* Fix rotation pivot or margin if needed */
.dash-card[data-target="live-tv"]:focus,
.dash-card[data-target="live-tv"].focus-visible {
  transform: rotate(-3deg) scale(1.08) translateY(-10px) !important;
  z-index: 25;
}

.dash-card[data-target="movies"] {
  background:
    linear-gradient(135deg, rgb(19, 25, 37), rgba(20, 30, 50, 0.7)),
    url("../assets/bg_movies.png");
  background-size: cover;
  background-position: center;
}

.dash-card[data-target="series"] {
  background:
    linear-gradient(135deg, rgb(19, 25, 37), rgba(20, 30, 50, 0.7)),
    url("../assets/bg_series.png");
  background-size: cover;
  background-position: center;
}

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.card-header h2 {
  font-size: 50px;
  font-weight: 600;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.refresh-icon {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.card-icon-large {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 10px;
}

.card-icon-large i {
  font-size: 80px;
  color: transparent;
  /* Icon outline style */
  -webkit-text-stroke: 2px #fff;
  opacity: 0.8;
}

/* Specific icon styling (like the yellow accent in image) */
.dash-card[data-target="live-tv"] .card-icon-large i {
  -webkit-text-stroke: 2px #fff;
  position: relative;
}

/* We can use ::after to add the yellow bolt/play inside if needed, or simple color */
.dash-card.focus-visible .card-icon-large i {
  -webkit-text-stroke: 2px #ffd700;
  color: rgba(255, 215, 0, 0.1);
}

.card-footer {
  margin-top: auto;
}

.count-text {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}

.update-text {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

/* Card Focus State */
.dash-card:focus,
.dash-card.focus-visible {
  transform: scale(1.08) translateY(-5px);
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 215, 0, 0.1);
  z-index: 20;
}

/* Yellow tag on top for active state (simulated) */
.dash-card.focus-visible::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 60px;
  height: 4px;
  background: #ffd700;
  box-shadow: 0 0 10px #ffd700;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Bottom Bar */
.dash-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 10;
  margin-top: auto;
  /* Push to bottom */
  padding-bottom: 0px;
}

.dash-whatsapp-container {
  display: flex;
  align-items: center;
}

.whatsapp-badge {
  padding: 10px 25px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  /* Slightly smaller for longer text */
  font-weight: 500;
  color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.disclaimer-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.divider {
  color: rgba(255, 255, 255, 0.3);
}

.whatsapp-badge i {
  color: #f2f2f2;
  /* WhatsApp Green */
  font-size: 5px;
}

.dash-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 20px 10px 10px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.dash-btn:focus,
.dash-btn.focus-visible {
  background: #fff;
  color: #000;
}

.icon-circle-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffd700;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.dash-right-info {
  display: flex;
  align-items: center;
  gap: 30px;
}

.search-trigger {
  font-size: 24px;
  opacity: 0.8;
  cursor: pointer;
}

.current-time {
  font-size: 48px;
  font-weight: 300;
}

.current-time small {
  font-size: 14px;
  font-weight: 600;
}

.weather-display {
  display: flex;
  align-items: center;
  gap: 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 20px;
}

.location-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.city {
  font-size: 24px;
  font-weight: 700;
}

.humidity {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.temp-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 32px;
  font-weight: 400;
}

.highlight-orange {
  color: #ff9f43;
}

.highlight-white {
  color: #fff;
}

/* Header Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 30px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.header-logo:hover {
  background: rgba(255, 255, 255, 0.1);
}

.header-logo:focus,
.header-logo.focus-visible {
  border-radius: 50px;
  border: 2px solid rgba(64, 196, 255, 0.8);
  background: linear-gradient(
    135deg,
    rgba(64, 196, 255, 0.4) 0%,
    rgba(30, 30, 40, 0.9) 100%
  );
  box-shadow: 0 10px 25px rgba(64, 196, 255, 0.4);
  color: white;
}

.text-orange {
  color: #ff9f43;
  font-size: 1.5rem;
}

.header-app-name {
  font-weight: 700;
  font-size: 1.54rem;
  color: #fff;
  letter-spacing: 0.05em;
}

/* Info View Premium */
#info-view {
  padding: 0;
  height: 100vh;
  box-sizing: border-box;
  background: radial-gradient(circle at center, #1e2535 0%, #0a0e17 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-container {
  width: 80%;
  max-width: 900px;
  height: 85vh;
}

.info-card-premium {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  /* Subtle border */
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  padding: 50px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Header Section */
.info-header {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-logo-large {
  width: 70px;
  height: 70px;
  background: rgba(255, 159, 67, 0.1);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  font-size: 32px;
  border: 1px solid rgba(255, 159, 67, 0.2);
}

.title-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Logo Image */
.header-logo-img {
  height: 48px;
  width: auto;
  margin-right: 10px;
  object-fit: contain;
}

.header-logo-img.large {
  height: 70px;
  margin-right: 0;
}

.app-name-large {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #fff, #a0a5b5);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #a0a5b5;
  width: fit-content;
  margin-top: 5px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #a0a5b5;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--accent-yellow);
  color: #000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
  /* Space for scrollbar */
}

/* Custom Scrollbar for Info Grid */
.info-grid::-webkit-scrollbar {
  width: 6px;
}

.info-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.info-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition:
    transform 0.2s,
    background 0.2s;
}

.info-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.info-item.full-width {
  grid-column: span 2;
}

.icon-box {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent-yellow);
}

.text-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.text-box label {
  font-size: 0.85rem;
  color: #a0a5b5;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
}

.contact-phones {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.divider {
  color: #a0a5b5;
  opacity: 0.5;
}

/* RTL Support */
.rtl-mode {
  direction: rtl;
}

.rtl-mode .info-logo-large {
  margin-right: 0;
  margin-left: 20px;
}

.rtl-mode .info-item {
  flex-direction: row;
  /* Ensure flex direction is consistent, though row automatically flips in RTL */
}

/* Back Button */
#close-info-btn {
  align-self: flex-start;
  margin-top: 30px;
  padding: 12px 30px;
  font-size: 1rem;
}

.rtl-mode #close-info-btn {
  align-self: flex-end;
  /* Or flex-start depending on desired position */
}

.rtl-mode #close-info-btn i {
  transform: rotate(180deg);
  /* Flip arrow */
}

/* Profile View */
#profile-view {
  padding: 0;
  height: 100vh;
  box-sizing: border-box;
  background: radial-gradient(circle at center, #1e2535 0%, #0a0e17 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-container {
  width: 80%;
  max-width: 900px;
}

.profile-card {
  background: rgba(255, 255, 255, 0.05);
  /* Glass base */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 50px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--accent-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #000;
  box-shadow: 0 10px 20px rgba(212, 194, 24, 0.3);
}

.profile-title h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.profile-title p {
  color: var(--text-gray);
  font-size: 1.1rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.profile-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-item label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.value-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
}

#close-profile-btn {
  width: auto;
  padding: 12px 30px;
}

/* Search Overlay */
#search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
}

.search-container {
  width: 60%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 10px 25px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-icon {
  font-size: 24px;
  color: var(--accent-yellow);
  margin-right: 15px;
}

#search-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 100%;
  outline: none;
}

.search-results-list {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover,
.search-result-item:focus {
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.result-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-info {
  display: flex;
  flex-direction: column;
}

.result-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.result-type {
  font-size: 0.8rem;
  color: var(--text-gray);
}

/* Profile View Redesign (Neon Glass - Gold Edition) */
#profile-view {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  background: radial-gradient(circle at center, #111 0%, #050505 100%);
}

.profile-container {
  width: auto;
  min-width: 600px;
  max-width: 800px;
}

.profile-card {
  background: rgba(16, 20, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  /* Gold Border */
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 0 50px rgba(255, 215, 0, 0.1);
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffd700;
  /* Gold */
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.profile-avatar i {
  font-size: 35px;
  color: #fff;
}

.profile-title h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(to right, #fff, #ffd700);
  /* Gold Gradient */
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.profile-title p {
  color: #a0a5b5;
  margin: 5px 0 0 0;
  font-size: 0.9rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.profile-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 15px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.2s;
}

.profile-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 215, 0, 0.2);
  /* Gold Hover */
}

.profile-item label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #666;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.profile-item .value-text {
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  font-family: "Consolas", monospace;
  /* Tech feel */
}

/* My Playlists List Styling */
.profile-playlists-section h3 {
  font-family: "Inter", sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.9rem !important;
  color: #ffd700 !important;
  /* Gold */
}

#profile-playlists-list::-webkit-scrollbar {
  width: 4px;
}

#profile-playlists-list::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 2px;
}

.profile-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

/* Header Search Icon */
.header-search {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  /* Square-ish to match logo */
  margin-right: 0;
  margin-left: 0;
  cursor: pointer;
  transition: all 0.2s;
}

.header-search i {
  font-size: 20px;
  /* Bigger icon */
  color: var(--text-gray);
}

.header-search:hover,
.header-search:focus {
  background: var(--accent-yellow);
  transform: scale(1.05);
  /* Subtle scale */
}

.header-search:hover i,
.header-search:focus i {
  color: #000;
}

/* Header Search Group */
.header-search-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-search-bar {
  width: 300px;
  height: 40px;
  background: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
}

.header-search-bar:hover,
.header-search-bar:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
  outline: none;
}

.header-search-bar i {
  color: #000;
  font-size: 18px;
  margin-left: auto;
  /* Push to right */
}

.header-voice {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.header-voice i {
  color: #fff;
  font-size: 18px;
}

.header-voice:hover,
.header-voice:focus {
  background: var(--accent-yellow);
  color: #000;
  transform: scale(1.1);
}

.header-voice:hover i,
.header-voice:focus i {
  color: #000;
}

/* --- VOD Cards & Favorites --- */

.vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px 40px;
  overflow-y: auto;
  height: calc(100vh - 180px);
  /* Adjust based on header/footer */
}

.vod-card {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
}

.vod-card:focus,
.vod-card.active,
.vod-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 5;
  outline: 2px solid #ffd700;
}

.img-container {
  width: 100%;
  height: 100%;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.vod-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 20px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.vod-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
}

.rating-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #ffd700;
}

.fav-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.5);
  transition:
    color 0.2s,
    transform 0.2s;
  cursor: pointer;
  z-index: 10;
}

.fav-icon.fa-solid {
  color: #e74c3c;
  /* Red heart */
}

.fav-icon:hover {
  transform: scale(1.2);
  color: #fff;
}

/* Adjustments for Content Wrapper when in VOD mode */

/* Contact View - Popup Modal */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

.popup-content {
  width: 90%;
  max-width: 450px;
  background: rgba(25, 30, 45, 0.95);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(37, 211, 102, 0.1);
  /* Green tint glow */
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.bounce-in {
  animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-header {
  width: 100%;
  padding: 40px 0 20px;
  display: flex;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(37, 211, 102, 0.1), transparent);
}

.contact-icon-large {
  width: 80px;
  height: 80px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
}

.pulse-animation {
  animation: pulse 2s infinite;
}

.popup-body {
  padding: 10px 40px 20px;
  width: 100%;
  box-sizing: border-box;
}

.contact-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.contact-title {
  font-size: 24px;
  font-weight: 700;
  margin: 10px 0 5px;
  color: #fff;
}

.contact-subtitle {
  font-size: 14px;
  color: #a0a5b5;
  margin-bottom: 25px;
}

.contact-number-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0;
  cursor: pointer;
  transition: all 0.2s;
}

.contact-number-box:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
  border-color: #25d366;
}

.flag-icon {
  font-size: 24px;
}

.phone-number {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
}

.compact-close-btn {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #e74c3c;
  /* Red base */
  border: 1px solid #c0392b;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.compact-close-btn:hover,
.compact-close-btn:focus {
  background: #ff4757;
  color: #fff;
  border-color: #ff4757;
  transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  60% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Category List Styling Fixes */
#categories-ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.list-item {
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a0a5b5;
  border: 1px solid transparent;
}

.list-item:hover,
.list-item.active,
.list-item:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

.list-item.active {
  background: #122c54;
  color: #fff;
  font-weight: 600;
}

.item-count {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8em;
}

.list-item.active .item-count {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

/* Download Progress Popup (Bottom Right) */

/* Quality Badges - Gold Design */
.gold-badge {
  display: flex;
  flex-direction: column;
  border: 1px solid #152134;
  border-radius: 3px;
  overflow: hidden;
  margin-left: 10px;
  margin-right: auto;
  min-width: 38px;
  box-shadow: 0 0 4px rgba(197, 160, 89, 0.3);
}

.badge-res {
  color: #808a9e;
  /* Gold text */
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  padding: 1px 3px;
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.badge-lbl {
  background: linear-gradient(to bottom, #b6b6b6, #fff);
  color: #000;
  font-size: 7px;
  font-weight: 800;
  text-align: center;
  padding: 1px 3px;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

/* Update list layout to handle badge */
#channels-ul .list-item {
  display: flex;
  align-items: center;
  /* gap handled by individual margins now or consistent gap? */
  /* We previously added gap: 15px. Let's keep that but ensure badge fits well */
}

/* Download Progress Popup */
.download-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 450px;
  background: rgba(20, 25, 40, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(76, 201, 240, 0.3);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  padding: 20px;
  animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.popup-content-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.popup-icon {
  width: 40px;
  height: 40px;
  background: rgba(76, 201, 240, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  color: #4cc9f0;
}

.popup-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.popup-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.popup-status {
  font-size: 12px;
  color: #a0a5b5;
  margin-top: 2px;
}

.popup-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 15px;
  overflow: hidden;
}

.popup-progress-fill {
  height: 100%;
  background: #4cc9f0;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
}

/* Channel Number Overlay */
#channel-num-overlay {
  position: fixed;
  top: 50px;
  right: 50px;
  background: rgba(0, 0, 0, 0.85);
  padding: 15px 30px;
  border-radius: 10px;
  border: 2px solid #ffcc00;
  color: #ffcc00;
  font-size: 3rem;
  font-weight: bold;
  z-index: 10000;
  font-family: "Inter", sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

/* PIN Modal Styles */
.pin-modal-overlay {
  background:
    radial-gradient(circle at top, rgba(255, 140, 92, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(6, 10, 18, 0.66), rgba(4, 6, 12, 0.88));
}

.pin-shell {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 23, 36, 0.96), rgba(10, 14, 24, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.pin-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(255, 115, 85, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(69, 155, 255, 0.12), transparent 28%);
  pointer-events: none;
}

.pin-shell-top,
.pin-body {
  position: relative;
  z-index: 1;
}

.pin-shell-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 24px 10px;
}

.pin-orb {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 110, 64, 0.95), rgba(255, 150, 92, 0.82));
  color: #fff;
  font-size: 1.5rem;
  box-shadow:
    0 16px 35px rgba(255, 110, 64, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.pin-copy-block {
  flex: 1;
  min-width: 0;
}

.pin-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffb199;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pin-title-main {
  margin: 12px 0 6px;
  font-size: 1.55rem;
  font-weight: 800;
  color: #f8fbff;
}

.pin-desc-main {
  margin: 0;
  color: rgba(230, 235, 245, 0.72);
  font-size: 0.95rem;
  line-height: 1.55;
}

.pin-tip-strip {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  padding: 0 24px 4px;
  flex-wrap: wrap;
}

.pin-tip-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(235, 240, 248, 0.78);
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pin-tip-chip i {
  color: #7fcbff;
}

.pin-body {
  padding: 12px 24px 24px;
}

.pin-display-area {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 18px;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pin-dot.filled {
  background: linear-gradient(135deg, #ff7a4d, #ffb15d);
  box-shadow: 0 0 16px rgba(255, 122, 77, 0.45);
  border-color: rgba(255, 196, 148, 0.7);
  transform: scale(1.08);
}

.pin-entry-input {
  width: 100%;
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.035));
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: 0.42em;
  outline: none;
  box-sizing: border-box;
  -webkit-text-security: none;
  caret-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.pin-entry-display {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.pin-entry-display.is-empty {
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.38);
}

.pin-entry-input:focus,
.pin-entry-input.focus-visible {
  border-color: rgba(255, 138, 92, 0.92);
  box-shadow:
    0 0 0 3px rgba(255, 110, 64, 0.16),
    0 16px 34px rgba(0, 0, 0, 0.24);
}

.pin-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.pin-btn {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  padding: 15px;
  border-radius: 16px;
  font-size: 1.18rem;
  font-weight: 700;
  cursor: pointer;
  color: #f4f7fb;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pin-btn[data-num="Back"] {
  color: #ffc2b4;
}

.pin-btn[data-num="Enter"] {
  background: linear-gradient(135deg, rgba(82, 186, 110, 0.95), rgba(50, 156, 145, 0.82));
  border-color: rgba(125, 240, 188, 0.3);
  color: #05110a;
  box-shadow: 0 14px 30px rgba(46, 204, 113, 0.18);
}

.pin-btn:hover,
.pin-btn.focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
  transform: translateY(-2px);
  border-color: rgba(255, 138, 92, 0.75);
  box-shadow:
    0 0 0 3px rgba(255, 138, 92, 0.14),
    0 18px 34px rgba(0, 0, 0, 0.26);
}

.pin-btn[data-num="Enter"]:hover,
.pin-btn[data-num="Enter"].focus-visible {
  background: linear-gradient(135deg, rgba(103, 214, 131, 1), rgba(59, 184, 168, 0.92));
  border-color: rgba(164, 255, 209, 0.45);
  color: #041109;
}

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

.pin-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.pin-footer-hint {
  flex: 1;
  min-width: 180px;
  color: rgba(228, 234, 243, 0.66);
  font-size: 0.84rem;
  line-height: 1.45;
}

#close-pin-btn {
  margin-top: 0;
  min-width: 126px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

#close-pin-btn:hover,
#close-pin-btn:focus,
#close-pin-btn.focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

#pin-modal[data-mode="create"] .pin-mode-badge {
  color: #ffd2a4;
}

#pin-modal[data-mode="verify"] .pin-mode-badge {
  color: #8ed6ff;
}

/* Fullscreen Mode Class (Fallback) */
.video-fullscreen-mode {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: black !important;
}

/* Modern Neon Glass QR Design */
#qr-modal {
  display: flex;
  /* DO NOT USE !important here, it breaks JS toggle */
  justify-content: center !important;
  align-items: center !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(16, 20, 30, 0.9);
  /* Slightly darker */
  backdrop-filter: blur(15px);
  z-index: 999999 !important;
  /* Topmost */
}

#qr-modal .modal-content {
  background: rgba(16, 20, 30, 0.95);
  border: 1px solid rgba(76, 201, 240, 0.3);
  /* Cyan border */
  box-shadow: 0 0 40px rgba(76, 201, 240, 0.15);
  /* Blue glow */
  border-radius: 24px;
  width: auto;
  min-width: 350px;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleUp 0.3s ease-out;
}

#qr-modal h2 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 30px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(to right, #fff, #4cc9f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  border-bottom: none;
  padding-bottom: 0;
}

.qr-content {
  background: #fff;
  padding: 15px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
  position: relative;
  transition: transform 0.3s;
  /* Centering Fix */
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.qr-content:hover {
  transform: scale(1.02);
}

.qr-img {
  display: block;
  width: 250px;
  height: 250px;
  object-fit: contain;
}

.mac-text {
  font-family: "Consolas", "Monaco", monospace;
  background: rgba(76, 201, 240, 0.1);
  color: #4cc9f0;
  /* Cyan text */
  border: 1px solid rgba(76, 201, 240, 0.2);
  padding: 10px 20px;
  border-radius: 50px;
  /* Pill shape */
  font-size: 1.1rem;
  margin-top: 10px;
  display: inline-block;
}

.modal-btn {
  background: transparent;
  border: 2px solid #4cc9f0;
  color: #4cc9f0;
  font-weight: 700;
  padding: 12px 40px;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: none;
  margin-top: 20px;
}

.modal-btn:hover {
  background: #4cc9f0;
  color: #000;
  box-shadow: 0 0 20px rgba(76, 201, 240, 0.4);
  transform: translateY(-3px);
}

@keyframes scaleUp {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Refresh Button Styling */
.glow-icon-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-left: 15px;
  outline: none;
}

.glow-icon-btn i {
  font-size: 16px;
  transition: transform 0.5s ease;
}

.glow-icon-btn:hover,
.glow-icon-btn:focus,
.glow-icon-btn.focus-visible {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
  box-shadow: 0 0 20px rgba(212, 194, 24, 0.4);
  transform: translateY(-2px) scale(1.05);
}

.glow-icon-btn:hover i,
.glow-icon-btn:focus i,
.glow-icon-btn.focus-visible i {
  transform: rotate(180deg);
}

.glow-icon-btn .fa-spin {
  animation: fa-spin 1s infinite linear;
}

/* --- PREMIUM MODERN REMOTE NAVIGATION (Apple TV Style) --- */

/* 1. Base Focus State - elegant pop & white border */
/* 1. Base Focus State - PROFESSIONAL ELEGANT ANIMATION */
.focus-visible,
:focus-visible {
  outline: none !important;
  position: relative;
  z-index: 9999 !important;
  transform: scale(1.05) !important;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow:
    0 0 20px rgba(9, 53, 67, 0.7),
    0 10px 40px rgba(0, 0, 0, 0) !important;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  border: 1px solid #4cc9f0 !important;
  background-clip: padding-box !important;
}

/* Animated Border via Pseudo-element (Thinner and Elegant Colors) */
.focus-visible::after,
:focus-visible::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  bottom: -2px;
  left: -2px;
  /* Thinner border (2px visual) */
  /* Professional Blue/Cyan/Indigo Gradient - No Rainbow */
  z-index: -1;
  border-radius: 14px;
  /* Matches parent + border width */
  animation: elegantgradient 4s ease alternate infinite;
  /* Slower, smoother */
  background-size: 300% 300%;
  opacity: 0.5;
}

@keyframes elegantgradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Card Override - Less rounding for posters */
.vod-card.focus-visible {
  border-radius: 16px !important;
}

/* DASHBOARD OVERRIDE: Remove Neon Effect from Main Cards */
.dash-card.focus-visible {
  border: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  transform: scale(1.08) !important;
  /* Keep scale only */
  z-index: 10 !important;
}

.dash-card.focus-visible::after {
  display: none !important;
  /* Hide animated border */
}

/* HEADER OVERRIDE: Clean Focus for Top Bar */
.top-bar .focus-visible {
  border: none !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  /* Simple highlight */
  box-shadow: none !important;
  transform: scale(1.1) !important;
}

.top-bar .focus-visible::after {
  display: none !important;
}

/* 2. Sidebar/Icon Specific - High Contrast Invert */
.nav-item.focus-visible,
.icon-circle.focus-visible,
.btn-round.focus-visible,
.header-search.focus-visible,
.header-voice.focus-visible {
  background-color: #f2f2f2 !important;
  /* border-radius: 50% !important;  <- Removed global enforcement for nav-item to allow overrides */
  border-radius: 50%;
  /* Default to circle, but allowed to be overridden */
  /* box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important; */
  color: black !important;
}

/* Force Circle only for known circles */
.icon-circle.focus-visible,
.btn-round.focus-visible,
.header-search.focus-visible,
.header-voice.focus-visible {
  border-radius: 50% !important;
}

/* HEADER SPECIFIC OVERRIDE: Rectangular/Clean for Text Items */
.top-bar .nav-item.focus-visible {
  border-radius: 50px !important;
  border: 1px solid rgba(64, 196, 255, 0.8) !important;
  background: linear-gradient(
    135deg,
    rgba(64, 196, 255, 0.4) 0%,
    rgba(30, 30, 40, 0.9) 100%
  ) !important;
  color: white !important;
}

.top-bar .nav-item.focus-visible i {
  color: white !important;
}

.nav-item.focus-visible i,
.header-search.focus-visible i,
.header-voice.focus-visible i {
  color: black !important;
}

/* 3. Cards & Posters - No Background change, just Border & Scale */
.dash-card.focus-visible,
.vod-card.focus-visible {
  background-color: transparent !important;
  /* Keep image clean */
  border-radius: 12px !important;
  /* transform: scale(1.08) !important; */
}

/* 4. Text/List Items - Gentle Highlight */
.list-item.focus-visible,
.settings-nav-item.focus-visible {
  color: black !important;
  /* transform: scale(1.02) translateX(10px) !important; */
}

.list-item.focus-visible *,
.settings-nav-item.focus-visible * {
  color: #fff !important;
  /* Ensure child text turns black */
}

/* 5. Press Animation (Subtle Click) */
.active-press {
  /* animation: pressClick 0.15s ease-in-out forwards !important; */
}

@keyframes pressClick {
  0% {
    transform: scale(1.06);
  }

  50% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1.06);
  }
}

/* 6. Smooth Scrolling */
.scrollja-list,
.vod-grid,
.app-container,
.settings-content-area,
.nav-menu {
  /* scroll-behavior: smooth; */
}

/* Close Search Button Styling */
#close-search-btn {
  padding: 10px 24px;
  background: #e74c3c;
  /* Red base */
  border: 1px solid #c0392b;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#close-search-btn:hover,
#close-search-btn:focus,
#close-search-btn.focus-visible {
  background: #ff0000 !important;
  /* Pure Red */
  border-color: #ff0000 !important;
  color: #fff !important;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* MAX SPEED OPTIMIZATIONS - DISABLE ALL ANIMATIONS AND TRANSITIONS GLOBALLY */
* {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  border-radius: 0 !important; /* Masking rounded corners is extremely heavy on old TVs */
}

/* Force hardware acceleration only on scrollable containers, not globally */
.scrollja-list, .vod-grid, .channels-column, .categories-column {
  transform: translateZ(0); 
  will-change: transform;
}
