html, body {
  margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden;
  background-color: black;
  font-family: Arial, sans-serif;
  color: #fff;
}

#player-wrapper {
  position: absolute;
  top: 0; left: 0; height: 100%; width: 100%;
  display: flex; justify-content: center; align-items: center;
  background-color: black;
}

#player {
  width: 100%; height: 100%;
  max-height: 100vh; max-width: 100vw;
}

.jw-video {
  object-fit: contain !important;
  width: 100% !important;
  height: 100% !important;
}

/* Sidebar */
#sidebar {
  position: fixed;
  top: 20px; left: 20px;
  background: rgba(0, 0, 0, 0.85);
  padding: 10px;
  border-radius: 6px;
  z-index: 10000;
  transition: opacity 0.5s, transform 0.3s ease;
  max-width: 280px;
  user-select: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 80vh;
  box-sizing: border-box;
}

#sidebar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-120%);
}

/* Header */
#sidebar-header {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 8px;
  color: #00bfff;
  user-select: none;
  letter-spacing: 1px;
}

/* Search bar */
#search-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  border: none;
  margin-bottom: 10px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

#category-list, #channel-list {
  flex-grow: 1;
  overflow-y: auto;
}

/* Hide scrollbar for all browsers */
#category-list,
#channel-list {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* Internet Explorer and Edge */
}

#category-list::-webkit-scrollbar,
#channel-list::-webkit-scrollbar {
  display: none;                /* Chrome, Safari, Opera */
}

.category, .channel {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 6px;
  transition: background 0.2s;
  user-select: none;
}

.category:hover, .channel:hover {
  background: rgba(255, 255, 255, 0.25);
}

.channel small {
  font-size: 12px;
  color: #ccc;
  display: block;
  margin-top: 2px;
}

#viewer-counter {
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
  flex-shrink: 0;
  user-select: none;
}

/* Back button */
#back-button {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-align: center;
  user-select: none;
  font-weight: bold;
  display: none;
  flex-shrink: 0;
}

#back-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Hamburger menu for mobile */
#hamburger {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  width: 30px;
  height: 22px;
  z-index: 10001;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}

#hamburger div {
  height: 4px;
  background: #00bfff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Show hamburger on small screens */
@media (max-width: 768px) {
  #sidebar {
    top: 0;
    left: 0;
    height: 100vh;
    max-width: 260px;
    padding-top: 50px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.8);
  }

  #sidebar.hidden {
    transform: translateX(-100%);
    opacity: 1;
    pointer-events: none;
  }

  #hamburger {
    display: flex;
  }
}
