/* Base Styles - Dark Cyberpunk Theme */
body {
  margin: 0;
  background: #0A0F1D; 
  background-image: linear-gradient(180deg, #0A0F1D 0%, #050810 100%);
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow-x: hidden;
  color: #e0e6ed;
}

/* Header Styles */
header {
  padding: 5px 20px;
  background: rgba(10, 15, 29, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px; 
  box-sizing: border-box;
  border-bottom: 1px solid rgba(57, 255, 148, 0.15);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
}

/* Header Center */
.header-center {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Header Logo - Big, Sharp, Eye-Catching */
.header-logo {
  height: 70px; /* Big Size */
  width: auto;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  /* No Blur, No Glow, No Mix-Blend-Mode as requested */
}

.header-logo:hover {
  transform: scale(1.1);
}

/* Smart Buttons (Back & Search) */
.headerBtn {
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background: rgba(57, 255, 148, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(57, 255, 148, 0.2);
  color: #fff;
}

.headerBtn:hover {
  background: rgba(57, 255, 148, 0.15);
  border-color: #39FF94;
  color: #39FF94;
  box-shadow: 0 0 15px rgba(57, 255, 148, 0.4);
  transform: scale(1.1);
}

.headerBtn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* Search Box Area */
#searchBox {
  display: none;
  background: #0d1221;
  padding: 15px;
  border-bottom: 1px solid rgba(57, 255, 148, 0.2);
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

#searchInput {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 20px;
  border: 1px solid #333;
  outline: none;
  border-radius: 50px;
  font-size: 16px;
  background: #050810;
  color: #39FF94;
  text-align: center;
  transition: 0.3s;
}

#searchInput::placeholder { color: #556; }
#searchInput:focus {
  border-color: #39FF94;
  box-shadow: 0 0 15px rgba(57, 255, 148, 0.2);
}

/* Main Layout */
#main {
  display: flex;
  gap: 12px;
  padding: 12px;
  max-width: 1600px;
  margin: 0 auto;
}

#left {
  flex: 2.5;
  display: none; 
  flex-direction: column;
  gap: 12px;
}

#right {
  flex: 1;
  overflow-y: auto;
  height: calc(100vh - 160px);
  position: relative; /* For sticky category */
  scrollbar-width: thin;
  scrollbar-color: #39FF94 #050810;
}

/* Custom Scrollbar */
#right::-webkit-scrollbar { width: 6px; }
#right::-webkit-scrollbar-track { background: #050810; }
#right::-webkit-scrollbar-thumb { background-color: #39FF94; border-radius: 10px; }

/* Category Filter Buttons - Sticky Header */
#category {
  display: flex;
  gap: 10px;
  padding: 10px;
  
  /* Sticky Logic */
  position: sticky;
  top: 0;
  z-index: 50; 
  
  background: rgba(10, 15, 29, 0.95); /* Solid background to hide content behind */
  backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(57, 255, 148, 0.1);
  
  overflow-x: auto;
  border-radius: 0 0 12px 12px;
  margin-bottom: 15px;
  scrollbar-width: none;
}
#category::-webkit-scrollbar { display: none; }

.catBtn {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.05);
  color: #aaa;
  cursor: pointer;
  border-radius: 25px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s;
}

.catBtn:hover {
  background: rgba(57, 255, 148, 0.1);
  color: #39FF94;
  border-color: rgba(57, 255, 148, 0.3);
}

.catBtn.active {
  background: #39FF94;
  color: #0A0F1D;
  font-weight: 700;
  border-color: #39FF94;
  box-shadow: 0 0 15px rgba(57, 255, 148, 0.4);
}

/* Channel List Grid */
#list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  padding-bottom: 20px;
}

.channelItem {
  background: #131a2d;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.channelItem:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 15px rgba(57, 255, 148, 0.2);
  border-color: #39FF94;
  background: #1a233a;
}

.channelItem img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  border-radius: 8px;
}

/* Video Player Wrapper */
#videoWrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  border: 1px solid #1f293a;
}

#video { width: 100%; height: 100%; }

/* Transparent Watermark on Video */
#watermark-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 20;
  pointer-events: none;
}

#watermark-img {
  width: 65px;
  opacity: 1;
  filter: grayscale(0%) brightness(1.2);
}

/* Player Controls */
#playBox {
  position: absolute;
  left: 5%;
  width: 90%;
  bottom: 15px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  box-sizing: border-box;
  border-radius: 50px;
  background: rgba(10, 15, 29, 0.85); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(57, 255, 148, 0.15);
  transition: all 0.3s ease;
}

#playBox.hideControls { opacity: 0; transform: translateY(20px); pointer-events: none; }
#playBox button { background: none; border: none; color: #e0e6ed; font-size: 20px; cursor: pointer; padding: 0; display: flex; align-items: center; transition: 0.2s; }
#playBox button:hover { color: #39FF94; transform: scale(1.1); text-shadow: 0 0 8px rgba(57, 255, 148, 0.6); }

#vol { flex: 1; height: 4px; -webkit-appearance: none; background: rgba(255,255,255,0.2); border-radius: 2px; cursor: pointer; }
#vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; background: #39FF94; border-radius: 50%; box-shadow: 0 0 8px rgba(57, 255, 148, 0.8); }

/* Current Channel Info Bar */
#currentInfo {
  background: #0d1221;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#currentLogo { width: 50px; height: 50px; border-radius: 10px; object-fit: contain; background: #000; border: 1px solid #333; }
#currentName { font-size: 18px; font-weight: 600; color: #39FF94; letter-spacing: 0.5px; }

/* Footer */
#footer { text-align: center; padding: 20px; background: #050810; color: #556; font-size: 13px; border-top: 1px solid #131a2d; }

/* Responsive Design (Mobile Optimized) */
@media (max-width: 968px) {
  header {
    height: 70px; 
    padding: 5px 12px;
  }

  /* Logo Size for Mobile */
  .header-logo {
    height: 55px; 
    max-width: 200px; 
  }

  .headerBtn {
    width: 38px;
    height: 38px;
  }

  #main {
    flex-direction: column;
    padding: 8px;
  }
  
  #left {
    position: sticky;
    top: 70px;
    z-index: 99;
  }
  
  #videoWrap { border-radius: 8px; }
  
  #right {
    height: auto;
    overflow-y: visible;
  }
  
  /* Sticky Category on Mobile */
  #category {
    position: sticky;
    top: 70px; /* Sit right below the header */
    z-index: 50;
    background: #0A0F1D;
    border-radius: 0;
    padding: 10px 5px;
    border-bottom: 1px solid rgba(57, 255, 148, 0.2);
  }
  
  #list {
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 8px;
  }
}