*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f0f12;
  color: #e8e8ec;
  height: 100vh;
  overflow: hidden;
}

.app {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 320px;
  min-width: 260px;
  background: #18181f;
  border-right: 1px solid #2a2a35;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #2a2a35;
}

.sidebar-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

#search {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #3a3a48;
  border-radius: 6px;
  background: #0f0f12;
  color: inherit;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

#search:focus {
  outline: none;
  border-color: #5b8def;
}

#refresh {
  width: 100%;
  padding: 0.45rem;
  border: 1px solid #3a3a48;
  border-radius: 6px;
  background: #252530;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
}

#refresh:hover {
  background: #303040;
}

.channel-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.channel-list li button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  color: #c8c8d4;
  cursor: pointer;
  font-size: 0.875rem;
  border-bottom: 1px solid #22222c;
}

.channel-list li button:hover {
  background: #22222e;
  color: #fff;
}

.channel-list li.active button {
  background: #2a3a5c;
  color: #fff;
  border-left: 3px solid #5b8def;
}

.status {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: #888;
  border-top: 1px solid #2a2a35;
}

.player-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  min-width: 0;
}

#now-playing {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.video-wrap {
  flex: 1;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#player {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 5rem);
  background: #000;
}

@media (max-width: 700px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: 45vh;
  }

  .player-area {
    height: 55vh;
  }
}
