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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100dvh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #21262d;
}

.badge {
  display: inline-block;
  background: #1f6feb33;
  border: 1px solid #1f6feb66;
  color: #58a6ff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.topbar h1 {
  font-size: 1.1rem;
  font-weight: 600;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.player-column {
  min-width: 0;
}

#player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

#fp-playlist-controls {
  margin-top: 0.75rem;
}

.playlist-column {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 1rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.playlist-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8b949e;
  margin-bottom: 0.75rem;
}

.playlist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.playlist-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 120ms ease;
}

.playlist-item:hover {
  background: #21262d;
}

.playlist-item.live {
  border: 1px solid #f85149aa;
}

.playlist-item .thumb {
  width: 96px;
  aspect-ratio: 16 / 9;
  background: #0d1117;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b949e;
  font-size: 0.7rem;
  font-weight: 700;
}

.playlist-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-item .thumb.live-badge {
  background: #f85149;
  color: #fff;
}

.playlist-item .meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
}

.playlist-item .title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.playlist-item .detail {
  font-size: 0.75rem;
  color: #8b949e;
}

.status {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #f85149;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.875rem;
  max-width: 90%;
}

.status.hidden {
  display: none;
}

.status .takeover-btn {
  margin-left: 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 4px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.status .takeover-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
