/* playlist player page */

.player-header { padding: 26px 0 60px; }
.player-header .logo-mark { width: 48px; height: 48px; }
.player-header .logo-holo { font-size: 30px; }
.player-header .logo-sub { font-size: 13px; letter-spacing: 0.32em; margin-top: 3px; }

.logo-link { text-decoration: none; color: inherit; }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.back-link {
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.back-link:hover { background: rgba(255, 255, 255, 0.32); }

/* ---------- layout ---------- */

.player-layout {
  max-width: 1628px;
  display: grid;
  grid-template-columns: minmax(0, 1200px) minmax(280px, 1fr);
  gap: 28px;
  padding-top: 26px;
  padding-bottom: 60px;
  align-items: start;
}

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

/* ---------- video ---------- */

.video-stack {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #0d2237;
  box-shadow: 0 10px 30px rgba(23, 57, 92, 0.25);
}

.video-slot { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.video-slot.is-active { opacity: 1; pointer-events: auto; }
.video-slot iframe, .video-slot div { width: 100%; height: 100%; }

.video-note {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  background: rgba(23, 57, 92, 0.92);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  z-index: 5;
  white-space: nowrap;
}

/* ---------- now playing ---------- */

.now-playing { padding: 20px 6px 4px; }

.np-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: var(--holo-blue);
}

.np-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.4;
  margin-top: 6px;
}

.np-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-weight: 700;
  color: var(--muted);
  font-size: 14px;
}

.np-meta a { color: var(--holo-blue); font-weight: 800; text-decoration: none; }
.np-meta a:hover { text-decoration: underline; }

/* ---------- controls ---------- */

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 6px 0;
  flex-wrap: wrap;
}

.ctrl {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--holo-sky);
  background: var(--card);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ctrl svg { width: 24px; height: 24px; fill: var(--holo-blue); }

/* Firefox does not hide [hidden] SVG elements via the UA stylesheet */
.ctrl svg[hidden] { display: none; }

.ctrl:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(52, 201, 254, 0.35); }

.ctrl-main {
  width: 66px; height: 66px;
  background: linear-gradient(135deg, var(--holo-blue), var(--holo-sky));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(52, 201, 254, 0.45);
}
.ctrl-main svg { width: 30px; height: 30px; fill: #fff; }

.ctrl-toggle.is-on {
  background: linear-gradient(135deg, var(--holo-blue), var(--holo-sky));
  border-color: transparent;
}
.ctrl-toggle.is-on svg { fill: #fff; }

.up-next {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.up-next b { color: var(--holo-blue); letter-spacing: 0.08em; }

/* ---------- queue ---------- */

.queue-pane {
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(23, 57, 92, 0.08);
  padding: 16px;
  position: sticky;
  top: 16px;
}

.queue-filters { padding: 0 0 4px; }
.queue-filters .chip { font-size: 12px; padding: 6px 14px; border-width: 2px; }

.queue-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--holo-blue);
  padding: 10px 6px 8px;
  border-bottom: 2.5px solid rgba(52, 201, 254, 0.25);
}

.queue {
  list-style: none;
  max-height: 62vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--holo-sky) transparent;
}

.q-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.q-item:hover { background: rgba(52, 201, 254, 0.10); }

.q-item.is-current {
  background: linear-gradient(90deg, rgba(78, 158, 237, 0.16), rgba(117, 229, 238, 0.16));
  box-shadow: inset 3px 0 0 var(--holo-sky);
}

.q-thumb {
  width: 72px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: #dceefb;
}

.q-info { min-width: 0; }

.q-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.q-channel {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-item.is-current .q-title { color: var(--holo-blue); }

.q-eq {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  gap: 2.5px;
  align-items: flex-end;
  height: 16px;
}
.q-eq span {
  width: 3.5px;
  background: var(--holo-sky);
  border-radius: 2px;
  animation: eq 0.9s ease-in-out infinite;
}
.q-eq span:nth-child(1) { height: 60%; }
.q-eq span:nth-child(2) { height: 100%; animation-delay: 0.2s; }
.q-eq span:nth-child(3) { height: 40%; animation-delay: 0.4s; }

@keyframes eq {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

/* ---------- theater mode ---------- */

body.theater .player-header { padding: 10px 0 16px; }
body.theater .player-header .header-wave { display: none; }
body.theater .player-header .logo-mark { width: 40px; height: 40px; }
body.theater .player-header .logo-holo { font-size: 25px; }
body.theater .player-header .logo-sub { font-size: 11px; }

body.theater .player-layout {
  display: block;
  max-width: none;
  padding: 0 0 60px;
}

body.theater .player-pane { max-width: none; margin: 0; }

body.theater .video-stack {
  width: min(100%, calc((100vh - 140px) * 16 / 9));
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
}

body.theater .now-playing,
body.theater .controls {
  width: calc(100% - 48px);
  max-width: 1132px;
  margin-left: auto;
  margin-right: auto;
}

body.theater .queue-pane {
  position: static;
  width: calc(100% - 48px);
  max-width: 1132px;
  margin: 26px auto 0;
}

body.theater .queue { max-height: 40vh; }

/* ---------- fullscreen (stack-level, so the buffer swap keeps working) ---------- */

.video-stack:fullscreen {
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

/* ---------- */

/* "play all" button on the browse page */
.play-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--holo-blue), var(--holo-sky));
  box-shadow: 0 6px 16px rgba(52, 201, 254, 0.45);
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.play-all:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(52, 201, 254, 0.55); }
.play-all svg { width: 14px; height: 14px; fill: #fff; }
