/* DESIGN SYSTEM & GLOBAL VARIABLES */
:root {
  --font-primary: 'Outfit', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-poppins: 'Poppins', sans-serif;
  
  /* Cyberpunk / Premium Glow Color Palette */
  --bg-dark: #07070a;
  --bg-card: rgba(18, 18, 29, 0.6);
  --bg-card-hover: rgba(26, 26, 42, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --primary: #ff007f; /* Neon Hot Pink */
  --primary-glow: rgba(255, 0, 127, 0.35);
  --secondary: #00f2fe; /* Neon Cyan */
  --secondary-glow: rgba(0, 242, 254, 0.35);
  --accent: #9b51e0; /* Deep Purple */
  --accent-glow: rgba(155, 81, 224, 0.35);
  --success: #00ff87; /* Neon green */
  
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #718096;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  
  --shadow-neon: 0 0 20px var(--primary-glow);
  --blur-amount: 16px;
}

/* Helper class to temporarily disable transitions on layout change */
body.no-transition *:not(.view-toggle-container):not(.view-toggle-slider):not(.view-toggle-btn) {
  transition: none !important;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ANIMATED MESH BACKGROUND */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #11101d 0%, #07070a 100%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: orbFloat 20s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  animation-duration: 25s;
}

.orb-2 {
  bottom: -15%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  animation-duration: 30s;
  animation-delay: -5s;
}

.orb-3 {
  top: 40%;
  left: 30%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate(5%, 8%) scale(1.1) rotate(180deg);
  }
  100% {
    transform: translate(-3%, -5%) scale(0.95) rotate(360deg);
  }
}

/* APP CONTAINER */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* LEFT SIDEBAR: PLAYER & HEADER */
.player-section {
  width: 420px;
  min-width: 420px;
  background: rgba(7, 7, 10, 0.7);
  backdrop-filter: blur(var(--blur-amount));
  border-right: 1px solid var(--border-color);
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* LOGO & HEADER */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  gap: 15px;
}

.logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.2));
  transition: all var(--transition-normal);
  animation: logoIconFloat 4s ease-in-out infinite;
}

.brand-logo:hover {
  animation-play-state: paused;
  transform: scale(1.15) rotate(8deg);
  filter: drop-shadow(0 8px 20px rgba(0, 242, 254, 0.5));
}

@keyframes logoIconFloat {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.2));
  }
  50% {
    transform: translateY(-5px) scale(1.03);
    filter: drop-shadow(0 5px 15px rgba(0, 242, 254, 0.45));
  }
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.2));
  }
}

.logo {
  font-family: var(--font-poppins);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, var(--secondary) 0%, var(--primary) 40%, var(--accent) 70%, var(--secondary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  text-transform: uppercase;
  filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.25));
  animation: logoGradientFlow 6s linear infinite;
}

@keyframes logoGradientFlow {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.logo span {
  background: transparent;
  -webkit-text-fill-color: inherit;
  font-weight: 800;
}

/* PLAYER WRAPPER */
.player-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-color);
  transition: var(--transition-normal);
}

.video-container:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 25px var(--primary-glow);
  transform: translateY(-2px);
}

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

/* NEON LOADER SPINNER */
.player-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 4, 6, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 5;
  transition: opacity var(--transition-normal) ease-in-out;
}

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

.spinner {
  position: relative;
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px 2px rgba(255, 109, 0, 0.35), 0 0 24px 4px var(--secondary-glow);
  animation: pulseDot 1.2s ease-in-out infinite alternate;
}

.spinner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  border: 3px solid transparent;
  border-top-color: #ff6d00;
  border-bottom-color: #ff6d00;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 109, 0, 0.45);
  animation: spin-clockwise 1.2s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.spinner::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 3px solid transparent;
  border-left-color: var(--secondary);
  border-right-color: var(--secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--secondary-glow);
  animation: spin-counter-clockwise 0.8s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.player-loader span {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff6d00, #ffffff, var(--secondary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
  font-weight: 600;
  animation: shineText 3s linear infinite;
  text-align: center;
  margin-top: 5px;
}

.paused-play-icon {
  display: block;
  font-size: 32px;
  margin-top: 15px;
  color: var(--primary);
  cursor: pointer;
  transition: transform var(--transition-fast) ease, color var(--transition-fast) ease;
  text-shadow: 0 0 12px var(--primary-glow);
  text-transform: none;
}

.paused-play-icon:hover {
  transform: scale(1.15);
  color: var(--secondary);
  text-shadow: 0 0 12px var(--secondary-glow);
}

@keyframes spin-clockwise {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes spin-counter-clockwise {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes pulseDot {
  0% { opacity: 0.6; box-shadow: 0 0 8px 1px rgba(255, 109, 0, 0.35), 0 0 15px 2px var(--secondary-glow); }
  100% { opacity: 1; box-shadow: 0 0 15px 3px rgba(255, 109, 0, 0.55), 0 0 30px 5px var(--secondary-glow); }
}

@keyframes shineText {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* CUSTOM CONTROLS PANEL (NORMAL MODE) */
.custom-controls {
  margin-top: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 12px 20px;
  backdrop-filter: blur(var(--blur-amount));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  z-index: 4;
}

.control-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.control-btn:hover {
  background: #ff6d00;
  border-color: #ff6d00;
  box-shadow: 0 0 15px rgba(255, 109, 0, 0.45);
  transform: scale(1.15);
}

.control-btn.play-pause-btn {
  width: 52px;
  height: 52px;
  background: var(--text-primary);
  color: var(--bg-dark);
  font-size: 22px;
}

.control-btn.play-pause-btn:hover {
  background: #ff6d00;
  color: #ffffff;
  border-color: #ff6d00;
  box-shadow: 0 0 20px rgba(255, 109, 0, 0.65);
}

/* CURRENT CHANNEL INFO CARD */
.current-channel-card {
  margin-top: 30px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(var(--blur-amount));
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  flex-grow: 1;
  max-height: 200px;
  overflow: hidden;
}

.current-channel-logo-container {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: #ffffff;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
  flex-shrink: 0;
  position: relative;
}

.current-channel-logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.fallback-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: #fff;
  border-radius: 12px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.current-channel-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.current-channel-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* allows text truncation */
  flex-grow: 1;
}

.current-channel-details h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.current-channel-details p {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* LIVE BADGE */
.live-badge {
  background: rgba(0, 255, 135, 0.1);
  border: 1px solid rgba(0, 255, 135, 0.3);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: liveDotPulse 1.2s infinite alternate;
}

@keyframes liveDotPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.3); opacity: 1; }
}

/* FOOTER */
.footer {
  margin-top: auto;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.accent-text {
  color: #ff7a00;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 122, 0, 0.4);
}

/* RIGHT SECTION: CHANNELS & SEARCH */
.channels-section {
  flex: 1;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.search-filter-sticky {
  position: sticky;
  top: 0;
  background: rgba(7, 7, 10, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 30px 40px 20px 40px;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 25px;
}

/* SEARCH WRAPPER */
.search-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-secondary);
  z-index: 2;
  pointer-events: none;
}

.search-wrapper input {
  width: 100%;
  padding: 18px 50px 18px 55px;
  font-size: 16px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  outline: none;
  background: rgba(255, 255, 255, 0.03);
  color: white;
  transition: var(--transition-normal);
  backdrop-filter: blur(8px);
}

.search-wrapper input:focus {
  border-color: var(--secondary);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.15), inset 0 0 10px rgba(0, 242, 254, 0.05);
}

.clear-search-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  z-index: 2;
}

.clear-search-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* CATEGORIES CONTAINER & PILLS */
.categories-wrapper {
  position: relative;
  width: 100%;
  padding: 0 40px;
  display: flex;
  align-items: center;
}

.categories-wrapper::before,
.categories-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 40px;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  transition: opacity var(--transition-fast);
}

.categories-wrapper::before {
  left: 40px;
  background: linear-gradient(to right, var(--bg-dark), transparent);
  opacity: 0;
}

.categories-wrapper::after {
  right: 40px;
  background: linear-gradient(to left, var(--bg-dark), transparent);
}

.categories-wrapper.scrolled-left::before {
  opacity: 1;
}

.categories-wrapper.scrolled-right::after {
  opacity: 0;
}

.categories-container {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none; /* Hide standard scrollbar Firefox */
  scroll-behavior: smooth;
}

.categories-container::-webkit-scrollbar {
  display: none; /* Hide standard scrollbar Chrome/Safari */
}

.scroll-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
}

.scroll-indicator:hover {
  background: #b388ff;
  border-color: #b388ff;
  box-shadow: 0 0 15px rgba(179, 136, 255, 0.45);
  transform: translateY(-50%) scale(1.15);
}

.scroll-indicator.scroll-left {
  left: 4px;
}

.scroll-indicator.scroll-right {
  right: 4px;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}

.category-list {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  width: max-content;
}

.category-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-normal);
  font-family: var(--font-display);
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.category-pill.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 0 20px var(--primary-glow);
}

.category-count {
  margin-left: 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition-normal);
}

.category-pill:hover .category-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.category-pill.active .category-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* CHANNELS GRID WRAPPER */
.channels-grid-wrapper {
  flex: 1;
  position: relative;
  padding: 0 40px 40px 40px;
}

/* CHANNEL GRID */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}

/* CHANNEL CARD */
.channel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  aspect-ratio: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  /* Removed backdrop-filter to prevent scrolling lag with 100+ cards */
}

/* Subtle glow outline overlay */
.channel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.channel:hover::before {
  opacity: 0.45;
}

.channel:hover {
  transform: scale(1.05) translateY(-3px);
  background: var(--bg-card-hover);
  border-color: transparent;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 0, 127, 0.12);
}

.channel img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  transition: var(--transition-normal);
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.3));
  border-radius: 10px;
}

.channel:hover img {
  transform: scale(1.08);
}

.channel-card-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.channel-card-fallback-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: white;
}

.channel-card-fallback-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

/* ACTIVE CHANNEL CARD */
.channel.active {
  background: var(--bg-card-hover);
  border-color: transparent;
  box-shadow: 0 0 35px rgba(255, 0, 127, 0.4), inset 0 0 10px rgba(255, 0, 127, 0.2);
}

.channel.active::before {
  opacity: 0.8;
}

.channel.active img {
  transform: scale(1.05);
}

/* NO RESULTS & MESSAGES */
.no-results-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 80px 20px;
  text-align: center;
}

.no-results-msg span {
  font-size: 48px;
  animation: floatEmoji 3s ease-in-out infinite alternate;
}

.no-results-msg p {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

@keyframes floatEmoji {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

/* CUSTOM SCROLLBAR FOR RIGHT SECTION */
.channels-section::-webkit-scrollbar {
  width: 8px;
}

.channels-section::-webkit-scrollbar-track {
  background: transparent;
}

.channels-section::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.channels-section::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* RESPONSIVE LAYOUT (TABLET / MOBILE) */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }

  .player-section {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    z-index: 12;
  }

  .logo {
    font-size: 28px;
  }
  
  .header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .current-channel-card {
    margin-top: 15px;
    padding: 15px;
    height: auto;
    max-height: 100px;
  }

  .current-channel-logo-container {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    padding: 4px;
  }

  .current-channel-details h2 {
    font-size: 16px;
  }

  .current-channel-details p {
    font-size: 12px;
  }

  .footer {
    display: none;
  }

  .channels-section {
    padding: 0;
    height: auto;
    overflow-y: visible;
  }
  
  .search-filter-sticky {
    position: relative;
    top: 0;
    border-bottom: none;
    padding: 20px 20px 10px 20px;
    margin-bottom: 15px;
  }

  .categories-wrapper {
    padding: 0;
  }

  .categories-wrapper::before,
  .categories-wrapper::after {
    display: none !important;
  }

  .scroll-indicator {
    display: none !important;
  }

  .channels-grid-wrapper {
    padding: 0 20px 20px 20px;
  }
}

@media (max-width: 600px) {
  .channel-grid {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 12px;
  }

  .channel {
    padding: 10px;
  }

  .channel-card-fallback-avatar {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .channel-card-fallback-name {
    font-size: 10px;
  }
}

/* MOBILE LANDSCAPE OPTIMIZATION */
@media (max-width: 1024px) and (orientation: landscape) {
  .app-container {
    flex-direction: row !important;
    height: 100vh !important;
    overflow: hidden !important;
  }

  .player-section {
    width: 40% !important;
    min-width: 280px !important;
    max-width: 420px !important;
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    border-right: 1px solid var(--border-color) !important;
    border-bottom: none !important;
    padding: 15px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .player-section::-webkit-scrollbar {
    width: 4px;
  }

  .player-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }

  .logo {
    font-size: 22px !important;
  }

  .header {
    margin-bottom: 5px !important;
  }

  .channels-section {
    flex: 1 !important;
    width: auto !important;
    height: 100vh !important;
    overflow-y: auto !important;
    padding: 0 !important;
  }

  .video-container {
    aspect-ratio: 16/9 !important;
    width: 100% !important;
  }

  .current-channel-card {
    margin-top: 10px !important;
    padding: 10px !important;
    max-height: none !important;
  }

  .footer {
    display: block !important;
    margin-top: auto !important;
    padding-top: 15px !important;
  }
}

/* FULLSCREEN PLAYER OVERRIDES */
.player-wrapper:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000 !important;
}

.player-wrapper:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000 !important;
}

/* Make video container fill full viewport in fullscreen */
.player-wrapper:fullscreen .video-container,
.player-wrapper:-webkit-full-screen .video-container {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.player-wrapper:fullscreen video,
.player-wrapper:-webkit-full-screen video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  background: #000 !important;
}

/* Custom Controls as floating auto-hiding overlay in Fullscreen */
.player-wrapper:fullscreen .custom-controls,
.player-wrapper:-webkit-full-screen .custom-controls {
  position: absolute !important;
  bottom: 40px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(10px) !important;
  width: auto !important;
  min-width: 280px !important;
  margin-top: 0 !important;
  background: rgba(7, 7, 10, 0.85) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 25px var(--primary-glow) !important;
  padding: 12px 25px !important;
  border-radius: 50px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: 10 !important;
  transition: opacity var(--transition-normal), transform var(--transition-normal) !important;
}

.player-wrapper:fullscreen .custom-controls.visible,
.player-wrapper:-webkit-full-screen .custom-controls.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* MAIN FOOTER SECTION */
.main-footer {
  margin-top: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 45px 40px 30px 40px;
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: border-color var(--transition-normal);
  font-family: 'Poppins', sans-serif !important;
}

.main-footer:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

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

.footer-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer-brand-logo {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.25));
}

.footer-logo {
  font-size: 24px;
  margin: 0;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
  font-family: var(--font-primary);
}

.footer-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Glassmorphic Rounded Social Buttons */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  
  /* Bouncy elastic transition for bobble/bubble wave effect */
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.45), 
              box-shadow 0.3s ease, 
              color 0.3s ease;
}

/* Individual Native Colors */
.social-btn.facebook { color: #1877F2 !important; }
.social-btn.telegram { color: #0088CC !important; }
.social-btn.instagram { color: transparent !important; }
.social-btn.instagram i {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.social-btn.twitter { color: #1DA1F2 !important; }
.social-btn.linkedin { color: #0077B5 !important; }
.social-btn.github { color: #181717 !important; }
.social-btn.website { color: #00A2FF !important; }
.social-btn.email { color: #EA4335 !important; }

/* Custom Hover Glow & Transform */
.social-btn:hover {
  transform: scale(1.26) translateY(-8px);
  background: #ffffff;
}

.social-btn.facebook:hover { box-shadow: 0 8px 20px rgba(24, 119, 242, 0.35), 0 0 15px rgba(24, 119, 242, 0.5); }
.social-btn.telegram:hover { box-shadow: 0 8px 20px rgba(0, 136, 204, 0.35), 0 0 15px rgba(0, 136, 204, 0.5); }
.social-btn.instagram:hover { box-shadow: 0 8px 20px rgba(193, 53, 132, 0.35), 0 0 15px rgba(193, 53, 132, 0.5); }
.social-btn.twitter:hover { box-shadow: 0 8px 20px rgba(17, 17, 17, 0.35), 0 0 15px rgba(17, 17, 17, 0.5); }
.social-btn.linkedin:hover { box-shadow: 0 8px 20px rgba(0, 119, 181, 0.35), 0 0 15px rgba(0, 119, 181, 0.5); }
.social-btn.github:hover { box-shadow: 0 8px 20px rgba(36, 41, 46, 0.35), 0 0 15px rgba(36, 41, 46, 0.5); }
.social-btn.website:hover { box-shadow: 0 8px 20px rgba(0, 162, 255, 0.35), 0 0 15px rgba(0, 162, 255, 0.5); }
.social-btn.email:hover { box-shadow: 0 8px 20px rgba(234, 67, 53, 0.35), 0 0 15px rgba(234, 67, 53, 0.5); }

.footer-col-title {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 25px;
  font-family: var(--font-poppins);
  position: relative;
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 35px;
  height: 3px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.footer-link i {
  font-size: 10px;
  transition: transform var(--transition-fast);
}

.footer-link:hover {
  color: var(--secondary);
  transform: translateX(4px);
  text-shadow: 0 0 10px var(--secondary-glow);
}

.footer-link:hover i {
  transform: translateX(2px);
  color: var(--secondary);
}

.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-contact-list li i {
  font-size: 16px;
  margin-top: 3px;
  transition: all var(--transition-fast);
}

.footer-contact-list li i.fa-envelope {
  color: #EA4335;
  filter: drop-shadow(0 0 5px rgba(234, 67, 53, 0.4));
}

.footer-contact-list li i.fa-globe {
  color: #00A2FF;
  filter: drop-shadow(0 0 5px rgba(0, 162, 255, 0.4));
}

.footer-contact-list li i.fa-telegram {
  color: #0088CC;
  filter: drop-shadow(0 0 5px rgba(0, 136, 204, 0.4));
}

/* Hover Zoom & Glow for Contact List Items */
.footer-contact-list li:hover i.fa-envelope {
  transform: scale(1.18);
  filter: drop-shadow(0 0 8px rgba(234, 67, 53, 0.7));
}

.footer-contact-list li:hover i.fa-globe {
  transform: scale(1.18);
  filter: drop-shadow(0 0 8px rgba(0, 162, 255, 0.7));
}

.footer-contact-list li:hover i.fa-telegram {
  transform: scale(1.18);
  filter: drop-shadow(0 0 8px rgba(0, 136, 204, 0.7));
}

.footer-contact-list li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-contact-list li div span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}

.footer-contact-list li div a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-contact-list li div a[href^="mailto"]:hover {
  color: #EA4335;
  text-shadow: 0 0 8px rgba(234, 67, 53, 0.5);
}



.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Poppins', sans-serif !important;
}

.footer-developer {
  font-size: 13px;
  color: #ffffff;
  font-family: 'Poppins', sans-serif !important;
}

.developer-name {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.developer-name:hover {
  color: var(--secondary);
  text-shadow: 0 0 10px var(--secondary-glow);
}

.neon-heart {
  color: var(--primary);
  animation: heartBeat 1.5s infinite alternate ease-in-out;
  display: inline-block;
  margin: 0 2px;
  filter: drop-shadow(0 0 5px var(--primary-glow));
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  100% { transform: scale(1.25); }
}

/* BACK TO TOP BUTTON */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 18, 29, 0.75);
  border: 1px solid var(--border-color);
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all var(--transition-normal);
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-color: transparent;
  box-shadow: 0 0 20px var(--primary-glow), 0 10px 25px rgba(0,0,0,0.4);
  transform: translateY(-5px);
}

.back-to-top.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.8);
}
/* HEADER LIVE BADGE DEFAULT */
.header-live-badge {
  display: none;
}

/* RESPONSIVE OVERRIDES */
@media (max-width: 768px) {
  .player-section {
    padding: 15px 15px 8px 15px;
  }

  .current-channel-card {
    margin-top: 10px;
    padding: 12px;
  }

  .stats-card {
    display: none !important;
  }

  .header-live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 30px;
    font-family: var(--font-poppins);
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-left: auto;
  }

  .header-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
  }

  .header-stat-item:first-child {
    color: var(--success);
  }

  .header-stat-item:last-child {
    color: var(--secondary);
  }

  .header-ping {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: liveDotPulse 1.2s infinite alternate;
  }

  .header-stat-divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.12);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .footer-col.footer-about {
    grid-column: span 2;
  }

  .main-footer {
    padding: 35px 25px 25px 25px;
    margin-top: 30px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .footer-col.footer-about {
    grid-column: span 1;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

/* SIDEBAR STATS CARD */
.stats-card {
  margin-top: 24px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(var(--blur-amount));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.stat-icon-container {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  position: relative;
  flex-shrink: 0;
}

.stat-icon-container.live {
  background: rgba(0, 255, 135, 0.1);
  color: var(--success);
}

.stat-icon-container.total {
  background: rgba(0, 242, 254, 0.1);
  color: var(--secondary);
}

.stat-ping {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: liveDotPulse 1.2s infinite alternate;
}

.stat-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-count {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 15px;
}

/* CUSTOM MODAL SYSTEM */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), 
              visibility 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.custom-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.custom-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 7, 12, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.custom-modal-card {
  position: relative;
  width: 90%;
  max-width: 500px;
  background: rgba(18, 18, 29, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 35px 30px 30px 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 
              0 0 40px rgba(255, 0, 127, 0.15), 
              inset 0 0 15px rgba(255, 255, 255, 0.02);
  z-index: 10000;
  opacity: 0;
  transform: scale(0.85) translateY(30px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), 
              opacity 0.4s ease;
}

.custom-modal:not(.hidden) .custom-modal-card {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Close Button */
.custom-modal-close-btn {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.custom-modal-close-btn:hover {
  background: rgba(255, 0, 127, 0.15);
  border-color: rgba(255, 0, 127, 0.3);
  color: var(--primary);
  transform: rotate(90deg);
}

/* Header */
.custom-modal-header {
  margin-bottom: 20px;
}

.custom-modal-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.5px;
}

/* Content */
.custom-modal-content {
  margin-bottom: 25px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
}

.custom-modal-content::-webkit-scrollbar {
  width: 5px;
}

.custom-modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.custom-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.custom-modal-content p {
  font-family: var(--font-primary);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* Footer / Action Button */
.custom-modal-footer {
  display: flex;
  justify-content: flex-end;
}

.custom-modal-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  color: white;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 0, 127, 0.35);
  transition: all var(--transition-normal);
}

.custom-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 0, 127, 0.5), 0 0 10px rgba(0, 242, 254, 0.3);
}

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

/* ==========================================
   VIEW MODE TOGGLE SWITCH
   ========================================== */
.header-right-widgets {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.view-toggle-container {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px;
  border-radius: 30px;
  width: 90px;
  height: 30px;
  align-items: center;
  overflow: hidden;
}

.view-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 41px;
  height: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 4px 10px rgba(255, 0, 127, 0.3);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease;
  z-index: 1;
}

/* 2D Mode active: slide to right and change gradient to Purple-to-Pink (Reversed 3D colors) */
.view-toggle-container.mode-2d .view-toggle-slider {
  transform: translateX(43px);
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  box-shadow: 0 4px 10px rgba(155, 81, 224, 0.2), 0 4px 10px rgba(255, 0, 127, 0.25);
}

.view-toggle-btn {
  position: relative;
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  z-index: 2;
  text-align: center;
  line-height: 24px;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-toggle-btn.active {
  color: #ffffff;
}

/* Adjust header spacing on mobile to fit toggle */
@media (max-width: 1024px) {
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .header-right-widgets {
    margin-left: auto;
    margin-right: 15px;
  }
}
@media (max-width: 768px) {
  .header-right-widgets {
    margin-right: 5px;
    display: flex;
    align-items: center;
  }
  .logo {
    font-size: 20px !important;
    white-space: nowrap;
  }
  .brand-logo {
    height: 32px !important;
  }
}
@media (max-width: 480px) {
  .logo {
    font-size: 18px !important;
  }
  .view-toggle-container {
    width: 80px;
    height: 26px;
    padding: 2px;
  }
  .view-toggle-slider {
    width: 36px;
    height: 20px;
    top: 2px;
    left: 2px;
  }
  .view-toggle-container.mode-2d .view-toggle-slider {
    transform: translateX(38px);
  }
  .view-toggle-btn {
    font-size: 9px;
    line-height: 20px;
  }
}

/* ==========================================
   3D NEUMORPHIC / SOFT UI OVERRIDES
   ========================================== */

/* Left Sidebar Section Separation */
.mode-3d .player-section {
  border-right: none !important;
  box-shadow: 6px 0 20px rgba(0, 0, 0, 0.8), 1px 0 0 rgba(255, 255, 255, 0.04) !important;
}

/* Video Player Container outset */
.mode-3d .video-container {
  box-shadow: 10px 10px 24px rgba(0, 0, 0, 0.7), -10px -10px 24px rgba(255, 255, 255, 0.035), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
}
.mode-3d .video-container:hover {
  box-shadow: 14px 14px 28px rgba(0, 0, 0, 0.8), -14px -14px 28px rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  transform: translateY(-3px) !important;
}

/* Custom Controls Panel outset */
.mode-3d .custom-controls {
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.7), -8px -8px 20px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.02) !important;
  border: none !important;
}

/* Control Buttons outset/inset */
.mode-3d .control-btn {
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6), -4px -4px 10px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  border: none !important;
  background: rgba(255, 255, 255, 0.06) !important;
  transition: all var(--transition-fast) !important;
}
.mode-3d .control-btn:hover {
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.7), -6px -6px 14px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  transform: scale(1.1) translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}
.mode-3d .control-btn:active {
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.8), inset -4px -4px 8px rgba(255, 255, 255, 0.02) !important;
  transform: scale(0.96) translateY(0) !important;
}

.mode-3d .control-btn.play-pause-btn {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.65), -5px -5px 12px rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
  border: none !important;
  color: white !important;
}
.mode-3d .control-btn.play-pause-btn:hover {
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.7), -7px -7px 16px rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.3) !important;
  color: white !important;
}
.mode-3d .control-btn.play-pause-btn:active {
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.7), inset -4px -4px 8px rgba(255, 255, 255, 0.05) !important;
  color: white !important;
}

/* Current Channel Card outset */
.mode-3d .current-channel-card {
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.7), -8px -8px 20px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.02) !important;
  border: none !important;
}

/* Recessed Current Channel Logo container */
.mode-3d .current-channel-logo-container {
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.6), inset -4px -4px 8px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
}
.mode-3d .current-channel-logo-container img {
  border-radius: 10px !important;
}

/* Stats Card outset */
.mode-3d .stats-card {
  box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.65), -6px -6px 16px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.02) !important;
  border: none !important;
}

/* Recessed Search Input */
.mode-3d .search-wrapper input {
  box-shadow: inset 6px 6px 14px rgba(0, 0, 0, 0.7), inset -6px -6px 14px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.02) !important;
  border: none !important;
  background: rgba(10, 10, 15, 0.45) !important;
}
.mode-3d .search-wrapper input:focus {
  box-shadow: inset 6px 6px 14px rgba(0, 0, 0, 0.8), inset -6px -6px 14px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(0, 242, 254, 0.25) !important;
}

/* Category Pills outset/inset */
.mode-3d .category-pill {
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6), -4px -4px 10px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
}
.mode-3d .category-pill:hover {
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.7), -6px -6px 14px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  transform: translateY(-2px) !important;
}
.mode-3d .category-pill:active {
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.7), inset -3px -3px 6px rgba(255, 255, 255, 0.02) !important;
  transform: translateY(0) !important;
}
.mode-3d .category-pill.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
  box-shadow: inset 3px 3px 8px rgba(0, 0, 0, 0.4), inset -3px -3px 8px rgba(255, 255, 255, 0.15), 0 4px 12px var(--primary-glow) !important;
  border: none !important;
}

/* Scroll Indicators outset */
.mode-3d .scroll-indicator {
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6), -4px -4px 10px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  border: none !important;
  transition: all var(--transition-fast) !important;
}
.mode-3d .scroll-indicator:hover {
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.7), -6px -6px 14px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
  transform: translateY(-50%) scale(1.12) !important;
}
.mode-3d .scroll-indicator:active {
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.7), inset -3px -3px 6px rgba(255, 255, 255, 0.02) !important;
  transform: translateY(-50%) scale(0.96) !important;
}

/* Channel Cards outset */
.mode-3d .channel {
  box-shadow: 6px 6px 14px rgba(0, 0, 0, 0.6), -6px -6px 14px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
  background: var(--bg-card) !important;
}
.mode-3d .channel:hover {
  box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.75), -10px -10px 20px rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
  transform: translateY(-5px) scale(1.04) !important;
  background: var(--bg-card-hover) !important;
}
.mode-3d .channel:active {
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.8), inset -4px -4px 8px rgba(255, 255, 255, 0.02) !important;
  transform: translateY(0) scale(0.98) !important;
}
.mode-3d .channel.active {
  box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.8), inset -4px -4px 10px rgba(255, 0, 127, 0.1), 0 0 25px rgba(255, 0, 127, 0.25) !important;
  background: var(--bg-card-hover) !important;
}

/* Main Footer outset */
.mode-3d .main-footer {
  box-shadow: 10px 10px 25px rgba(0, 0, 0, 0.7), -10px -10px 25px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.02) !important;
  border: none !important;
}
.mode-3d .main-footer:hover {
  border: none !important;
  box-shadow: 12px 12px 30px rgba(0, 0, 0, 0.75), -12px -12px 30px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
}

/* Social Buttons outset/inset (white circular) */
.mode-3d .social-btn {
  background: linear-gradient(135deg, #ffffff 0%, #e3e3ea 100%) !important;
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.6), -3px -3px 8px rgba(255, 255, 255, 0.04), inset -3px -3px 6px rgba(0, 0, 0, 0.15), inset 3px 3px 6px rgba(255, 255, 255, 0.8) !important;
  border: none !important;
}
.mode-3d .social-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #ececf3 100%) !important;
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.7), -4px -4px 12px rgba(255, 255, 255, 0.06), inset -3px -3px 6px rgba(0, 0, 0, 0.12), inset 3px 3px 6px rgba(255, 255, 255, 0.9) !important;
  transform: scale(1.22) translateY(-6px) !important;
}
.mode-3d .social-btn:active {
  background: linear-gradient(135deg, #dcdce5 0%, #ffffff 100%) !important;
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.25), inset -4px -4px 8px rgba(255, 255, 255, 0.7) !important;
  transform: scale(0.96) translateY(0) !important;
}

/* Custom Modal Card outset */
.mode-3d .custom-modal-card {
  box-shadow: 12px 12px 30px rgba(0, 0, 0, 0.8), -12px -12px 30px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
}

/* Custom Modal Close Button */
.mode-3d .custom-modal-close-btn {
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6), -3px -3px 6px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  border: none !important;
}
.mode-3d .custom-modal-close-btn:hover {
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.7), -4px -4px 8px rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}
.mode-3d .custom-modal-close-btn:active {
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.8), inset -2px -2px 4px rgba(255, 255, 255, 0.02) !important;
}

/* Custom Modal Footer Buttons */
.mode-3d .custom-modal-btn {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.65), -5px -5px 12px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  border: none !important;
}
.mode-3d .custom-modal-btn:hover {
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.7), -7px -7px 16px rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) !important;
}
.mode-3d .custom-modal-btn:active {
  box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.7), inset -4px -4px 8px rgba(255, 255, 255, 0.05) !important;
  transform: translateY(0) !important;
}

/* Back To Top Button outset */
.mode-3d .back-to-top {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.6), -5px -5px 12px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
}
.mode-3d .back-to-top:hover {
  box-shadow: 7px 7px 15px rgba(0, 0, 0, 0.7), -7px -7px 15px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}
.mode-3d .back-to-top:active {
  box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.8), inset -3px -3px 6px rgba(255, 255, 255, 0.02) !important;
}

/* Recessed Live Badge in 3D Mode */
.mode-3d .header-live-badge {
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.6), inset -2px -2px 5px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
  background: rgba(10, 10, 15, 0.45) !important;
}

/* INSECURE CONTENT WARNING MODAL STYLE */
.warning-modal-card {
  max-width: 480px !important;
}

.warning-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.warning-modal-icon {
  font-size: 24px;
  color: #fbbc05;
  animation: warningPulse 1.5s infinite alternate;
}

@keyframes warningPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(251, 188, 5, 0.4)); }
  100% { transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(251, 188, 5, 0.8)); }
}

.warning-modal-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary) !important;
  margin: 0;
}

.warning-modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.warning-main-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 400;
}

.warning-methods {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.methods-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.method-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.method-number {
  color: var(--secondary);
  font-weight: 700;
  white-space: nowrap;
}

.method-desc {
  color: var(--text-secondary);
}

/* MOBILE SMART APP BANNER */
.mobile-app-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  animation: bannerSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-app-banner.hidden {
  display: none !important;
}

@keyframes bannerSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.banner-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.banner-close-btn:hover {
  color: #fff;
}

.banner-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
  flex-shrink: 0;
}

.banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.banner-text h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.banner-text p {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banner-download-btn {
  background: #ff6d00;
  color: white;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 30px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(255, 110, 0, 0.25);
  white-space: nowrap;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.banner-download-btn:hover {
  transform: scale(1.03);
}

/* WARNING MODAL FOOTER AND DOWNLOAD BUTTON */
.warning-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: 100%;
}

.warning-app-download-btn {
  background: #ff6d00 !important;
  color: white !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 15px rgba(255, 110, 0, 0.25) !important;
  transition: all var(--transition-fast) !important;
  height: 40px;
  margin: 0;
}

.warning-app-download-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 110, 0, 0.4) !important;
}

/* Neumorphic 3D overrides for the warning app download button */
.mode-3d .warning-app-download-btn {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.65), -5px -5px 12px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  border: none !important;
  background: #ff6d00 !important;
}

.mode-3d .warning-app-download-btn:hover {
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.7), -7px -7px 16px rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) !important;
}

/* OFFICIAL BRAND GREEN FOR ANDROID ICON */
.banner-download-btn .fa-android,
.warning-app-download-btn .fa-android,
.update-download-btn .fa-android {
  color: #3ddc84 !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

/* IN-APP UPDATE MODAL STYLING */
.update-modal-card {
  max-width: 480px !important;
}

.update-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.update-modal-icon {
  font-size: 24px;
  color: var(--secondary);
  animation: rocketFloat 2s infinite ease-in-out;
}

@keyframes rocketFloat {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(4deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.update-modal-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary) !important;
  margin: 0;
}

.update-modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

.update-main-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 400;
}

.update-note-box {
  background: rgba(255, 110, 0, 0.07);
  border: 1px solid rgba(255, 110, 0, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: inset 0 0 12px rgba(255, 110, 0, 0.03);
}

.update-note-icon {
  color: #ff6d00;
  font-size: 16px;
  margin-top: 2px;
  filter: drop-shadow(0 0 4px rgba(255, 110, 0, 0.3));
}

.update-note-text {
  color: #ffd0b0;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
}

.update-note-text strong {
  color: #ff6d00;
  font-weight: 600;
}

.update-changelog-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.changelog-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.update-changelog {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.changelog-item {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin: 0;
}

.update-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: 100%;
}

.update-download-btn {
  background: #ff6d00 !important;
  color: white !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 15px rgba(255, 110, 0, 0.25) !important;
  transition: all var(--transition-fast) !important;
  height: 40px;
  margin: 0;
}

.update-download-btn:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 110, 0, 0.4) !important;
}

/* 3D Neumorphic update modal overrides */
.mode-3d .update-modal-card {
  box-shadow: 12px 12px 30px rgba(0, 0, 0, 0.8), -12px -12px 30px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
  border: none !important;
  background: #0f0b0f !important;
}

.mode-3d .update-download-btn {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.65), -5px -5px 12px rgba(255, 255, 255, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  border: none !important;
  background: #ff6d00 !important;
}

.mode-3d .update-download-btn:hover {
  box-shadow: 7px 7px 16px rgba(0, 0, 0, 0.7), -7px -7px 16px rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px) !important;
}

/* HEADER UPDATE NOTIFICATION BADGE */
.header-update-notification {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 110, 0, 0.09);
  border: 1px solid rgba(255, 110, 0, 0.22);
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: 0 0 12px rgba(255, 110, 0, 0.15);
  animation: fadeIn 0.4s ease-in-out;
  pointer-events: auto;
}

.header-update-notification.hidden {
  display: none !important;
}

.header-update-icon {
  font-size: 12px;
  color: #ff6d00;
  animation: rocketFloat 2s infinite ease-in-out;
  filter: drop-shadow(0 0 4px rgba(255, 110, 0, 0.5));
}

.header-update-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffd0b0;
  white-space: nowrap;
  font-family: var(--font-poppins);
}

.header-update-btn {
  background: #ff6d00;
  color: white !important;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(255, 110, 0, 0.35);
}

.header-update-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 10px rgba(255, 110, 0, 0.55);
  background: #ff7f1a;
}

/* Neumorphic 3D overrides for header update badge */
.mode-3d .header-update-notification {
  background: rgba(18, 18, 29, 0.6) !important;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.6), -4px -4px 10px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  border: none !important;
}

.mode-3d .header-update-btn {
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5), -3px -3px 8px rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  border: none !important;
}

@media (max-width: 480px) {
  .header-update-text {
    font-size: 10px;
  }
  .header-update-notification {
    padding: 4px 8px;
    gap: 6px;
  }
}

/* FAVORITE BUTTON STYLING (2D FLAT MODE) */
.fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all var(--transition-fast);
  z-index: 5;
}

.fav-btn:hover {
  background: rgba(255, 204, 0, 0.1);
  border-color: rgba(255, 204, 0, 0.2);
  color: #ffcc00;
  transform: scale(1.1);
}

.fav-btn.is-favorite {
  background: rgba(255, 204, 0, 0.15);
  border-color: rgba(255, 204, 0, 0.4);
  color: #ffcc00;
  filter: drop-shadow(0 0 5px rgba(255, 204, 0, 0.6));
  animation: starPulse 0.3s ease-in-out;
}

@keyframes starPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* 3D NEUMORPHIC OVERRIDES FOR FAVORITE BUTTON */
.mode-3d .fav-btn {
  background: rgba(255, 255, 255, 0.02) !important;
  border: none !important;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6), -3px -3px 6px rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
}

.mode-3d .fav-btn:hover {
  background: rgba(255, 204, 0, 0.05) !important;
  color: #ffcc00 !important;
}

.mode-3d .fav-btn:active {
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.7), inset -2px -2px 4px rgba(255, 255, 255, 0.02) !important;
}

.mode-3d .fav-btn.is-favorite {
  background: rgba(255, 204, 0, 0.15) !important;
  border: 1px solid rgba(255, 204, 0, 0.4) !important;
  color: #ffcc00 !important;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.45) !important;
}

.mode-3d .fav-btn.is-favorite:active {
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.6) !important;
  transform: scale(0.95);
}

/* Empty State / Custom No Results design */
.no-results-msg .empty-icon {
  margin-bottom: 12px;
  display: block;
}

/* DISCLAIMER POPUP MODAL STYLES */
.disclaimer-card {
  max-width: 500px !important;
  border: 1px solid rgba(155, 81, 224, 0.22) !important;
}

.disclaimer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.disclaimer-icon {
  font-size: 24px;
  color: #9b51e0;
  animation: warningPulse 1.5s infinite alternate;
  flex-shrink: 0;
}

.disclaimer-header h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.disclaimer-content {
  margin-top: 0;
}

.disclaimer-text {
  display: block !important;
  margin: 0 0 14px 0 !important;
  font-size: 14.5px !important;
  font-weight: 400 !important;
  color: #ffffff !important;
  line-height: 1.6 !important;
}

.disclaimer-text strong {
  color: #b388ff !important;
  font-weight: 600 !important;
}

.disclaimer-subtext {
  display: block !important;
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--text-secondary) !important;
  line-height: 1.5 !important;
}

.disclaimer-accept-btn {
  background: #9b51e0 !important;
  color: white !important;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 20px !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 15px rgba(155, 81, 224, 0.25) !important;
  transition: all var(--transition-fast) !important;
  cursor: pointer;
  border: none;
}

.disclaimer-accept-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(155, 81, 224, 0.4) !important;
  background: #a662e6 !important;
}

/* 3D Neumorphic Override for Disclaimer Modal */
.mode-3d .disclaimer-card {
  box-shadow: 12px 12px 30px rgba(0, 0, 0, 0.8), -12px -12px 30px rgba(255, 255, 255, 0.04) !important;
  border: none !important;
}

.mode-3d .disclaimer-accept-btn {
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.65), -5px -5px 12px rgba(255, 255, 255, 0.06) !important;
  background: #9b51e0 !important;
}

/* PICTURE-IN-PICTURE (PIP) CUSTOM STYLING */
body.pip-active {
  background: #000000 !important;
  overflow: hidden !important;
}

body.pip-active .bg-mesh,
body.pip-active header,
body.pip-active #customControls,
body.pip-active .current-channel-card,
body.pip-active .stats-card,
body.pip-active footer.footer,
body.pip-active main.channels-section {
  display: none !important;
}

body.pip-active .app-container {
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

body.pip-active .player-section {
  width: 100vw !important;
  height: 100vh !important;
  min-width: 100vw !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: #000000 !important;
  display: block !important;
  position: static !important;
}

body.pip-active .player-wrapper {
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.pip-active .video-container {
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

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

/* REAL ONLINE PRESENCE BADGE */
.online-presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 14px;
  border: 1px solid rgba(0, 255, 135, 0.24);
  background: rgba(0, 255, 135, 0.08);
  color: var(--text-primary);
  font-family: var(--font-poppins);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.online-presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 9px var(--success);
  animation: liveDotPulse 1.2s infinite alternate;
}

.online-presence-badge.presence-unavailable {
  opacity: 0.55;
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

.online-presence-badge.presence-unavailable .online-presence-dot {
  background: var(--text-secondary);
  box-shadow: none;
  animation: none;
}

@media (max-width: 560px) {
  .online-presence-badge {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 11px;
  }
}


/* REAL VIEWER STATISTICS */
.viewer-stats-card {
  width: 100%;
  min-height: 126px;
  margin-top: 18px;
  padding: 22px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  background: rgba(15, 15, 25, 0.92);
  overflow: hidden;
}

.viewer-stat {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.viewer-stat-icon {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 22px;
}

.viewer-stat-icon-live {
  color: #00f58a;
  background: rgba(0, 245, 138, 0.10);
}

.viewer-stat-icon-visits {
  color: #18d8ed;
  background: rgba(24, 216, 237, 0.10);
}

.viewer-stat-pulse {
  position: absolute;
  width: 13px;
  height: 13px;
  top: 5px;
  right: 6px;
  border: 2px solid #0f0f19;
  border-radius: 50%;
  background: #00f58a;
  box-shadow: 0 0 14px rgba(0, 245, 138, 0.72);
  animation: viewerLivePulse 1.3s ease-in-out infinite alternate;
}

@keyframes viewerLivePulse {
  from {
    transform: scale(0.84);
    opacity: 0.66;
  }
  to {
    transform: scale(1.12);
    opacity: 1;
  }
}

.viewer-stat-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.viewer-stat-copy strong {
  color: #ffffff;
  font-family: "Outfit", sans-serif;
  font-size: clamp(24px, 2.15vw, 32px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.viewer-stat-copy span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 500;
  white-space: nowrap;
}

.viewer-stat-divider {
  width: 1px;
  height: 60px;
  background: rgba(255, 255, 255, 0.10);
}

.viewer-stats-card.stats-unavailable .viewer-stat-copy strong {
  color: var(--text-muted);
}

@media (max-width: 1180px) {
  .viewer-stats-card {
    gap: 14px;
    padding: 20px 16px;
  }

  .viewer-stat {
    gap: 11px;
  }

  .viewer-stat-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 19px;
  }

  .viewer-stat-copy strong {
    font-size: 24px;
  }

  .viewer-stat-copy span {
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  .viewer-stats-card {
    min-height: 116px;
    margin-top: 14px;
    padding: 18px 15px;
    gap: 12px;
    border-radius: 20px;
  }

  .viewer-stat {
    gap: 10px;
  }

  .viewer-stat-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 18px;
  }

  .viewer-stat-pulse {
    width: 11px;
    height: 11px;
    top: 4px;
    right: 4px;
  }

  .viewer-stat-copy strong {
    font-size: 23px;
  }

  .viewer-stat-copy span {
    font-size: 10px;
  }

  .viewer-stat-divider {
    height: 52px;
  }
}



/* VERSION 11 — MOBILE CHANNEL BROWSING */
@media (max-width: 767px) {
  .viewer-stats-card,
  #viewerStatsCard {
    display: none !important;
  }

  .player-section {
    padding: 14px 14px 9px !important;
  }

  .custom-controls {
    margin-top: 10px !important;
    padding: 9px 10px !important;
    gap: 14px !important;
  }

  .control-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }

  .control-btn.play-pause-btn {
    width: 48px !important;
    height: 48px !important;
    font-size: 20px !important;
  }

  .current-channel-card {
    margin-top: 10px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    padding: 11px 13px !important;
  }

  .current-channel-logo-container {
    width: 54px !important;
    height: 54px !important;
  }

  .search-filter-sticky {
    padding: 14px 14px 8px !important;
    margin-bottom: 8px !important;
  }

  .channels-grid-wrapper {
    padding: 4px 14px 24px !important;
  }

  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .channel {
    min-height: 154px !important;
    aspect-ratio: 1 / 1.02 !important;
    padding: 13px !important;
  }
}
