* { box-sizing: border-box; }

:root {
  --black: #000000;
  --near-black: #0a0a0a;
  --panel: #141414;
  --line: #2c2c2c;
  --white: #ffffff;
  --muted: #a3a3a3;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  height: 100%;
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--black);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-mark {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--white);
}

.brand-accent {
  color: var(--black);
  background: var(--white);
  padding: 0 6px;
  border-radius: 3px;
}

.brand-tag {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--white);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 12px;
  border-radius: 999px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--white);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* MAIN LAYOUT */
.main {
  display: flex;
  min-height: calc(100dvh - 60px);
}

.player-box {
  width: 70%;
  background: var(--black);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.video-js {
  width: 100% !important;
  height: 62vh !important;
  background: var(--black);
}

/* video.js theme override -> monochrome */
.video-js .vjs-big-play-button {
  background: var(--white);
  border: none;
  color: var(--black);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  line-height: 70px;
  top: 50%;
  left: 50%;
  margin-top: -35px;
  margin-left: -35px;
}
.video-js .vjs-control-bar {
  background: rgba(0,0,0,0.85);
}
.video-js .vjs-play-progress,
.video-js .vjs-volume-level {
  background: var(--white);
}
.video-js .vjs-slider {
  background: #333;
}
.vjs-menu-button-popup .vjs-menu {
  background: var(--near-black);
}

.now-playing {
  padding: 18px 24px;
  border-top: 1px solid var(--line);
}

.now-playing h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
}

.now-playing p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.error-box {
  display: none;
  margin-top: 10px;
  color: var(--white);
  background: var(--near-black);
  border: 1px solid var(--white);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
}

/* SIDE */
.side {
  width: 30%;
  background: var(--near-black);
  display: flex;
  flex-direction: column;
  min-width: 280px;
}

.side-top {
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--near-black);
  z-index: 5;
}

.side-top h2 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
}

#search {
  width: 100%;
  padding: 10px 12px;
  background: var(--black);
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: 6px;
  font-size: 13px;
}
#search:focus {
  outline: none;
  border-color: var(--white);
}

.channels {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.channel-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.15s;
  background: var(--black);
}

.channel-card:hover {
  border-color: var(--white);
}

.channel-card.active {
  background: var(--white);
  color: var(--black);
}
.channel-card.active .channel-sub {
  color: #444;
}

.channel-logo {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line);
}
.channel-card.active .channel-logo {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.channel-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-name {
  font-size: 14px;
  font-weight: 600;
}

.channel-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  text-align: center;
}
.footer p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.footer .credit {
  margin-top: 6px;
}
.footer .credit a {
  color: var(--white);
  text-decoration: underline;
}
.footer .credit a:hover {
  color: var(--muted);
}

/* SCROLLBARS */
.channels::-webkit-scrollbar { width: 6px; }
.channels::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .main { flex-direction: column; }
  .player-box, .side { width: 100%; border-right: none; }
  .video-js { height: 40vh !important; }
  .side { min-width: 0; }
  .channels { max-height: 50vh; }
}

@media (max-width: 520px) {
  .topbar { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .brand { gap: 8px; flex-wrap: wrap; }
  .brand-mark { font-size: 19px; }
  .brand-tag { font-size: 10px; letter-spacing: 1px; }
  .live-pill { font-size: 10px; padding: 4px 9px; }
  .video-js { height: 32vh !important; }
  .now-playing { padding: 14px 16px; }
  .now-playing h1 { font-size: 16px; }
  .side-top { padding: 14px 14px 10px; }
  .channel-card { padding: 10px; }
  .channel-logo { width: 36px; height: 36px; font-size: 11px; }
  .channel-name { font-size: 13px; }
  .footer { padding: 12px 14px; }
}
