:root {
  --playlist-blue: #0075ff;
  --playlist-orange: #fe951c;
  --playlist-navy: #061435;
  --playlist-ink: #0d1b43;
  --playlist-muted: #5e6c88;
  --playlist-soft: #f4f8fd;
  --playlist-paper: #ffffff;
  --playlist-deep: #07101f;
  --playlist-panel: #ffffff;
  --playlist-panel-2: #eef6ff;
  --playlist-cyan: #00bfff;
  --playlist-line: rgba(8, 24, 67, 0.1);
  --playlist-shadow: 0 24px 58px rgba(8, 24, 67, 0.13);
  --playlist-hero-end: var(--playlist-soft);
}

body {
  background: var(--playlist-soft);
  color: var(--playlist-ink);
}

.full-playlist-page {
  padding-top: 96px;
  overflow: hidden;
  background: var(--playlist-soft);
  color: var(--playlist-ink);
}

.video-label,
.playlist-heading span {
  display: inline-flex;
  color: var(--playlist-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playlist-section {
  padding: 24px 0 32px;
}

.youtube-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 20px;
  align-items: start;
}

.video-panel,
.playlist-panel,
.tag-panel {
  border: 1px solid var(--playlist-line);
  border-radius: 8px;
  background: var(--playlist-paper);
  box-shadow: var(--playlist-shadow);
  color: var(--playlist-ink);
}

.video-panel {
  overflow: hidden;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-info {
  padding: 24px 26px 28px;
}

.video-label {
  color: var(--playlist-blue);
  margin-bottom: 10px;
}

.video-info h2,
.playlist-heading h2,
.tag-panel h2 {
  margin: 0;
  color: var(--playlist-ink) !important;
  font-weight: 900;
  letter-spacing: 0;
}

.tag-panel > h2 {
  margin-bottom: 22px;
  text-transform: uppercase;
}

.video-info p {
  margin: 10px 0 0;
  color: var(--playlist-muted);
  font-weight: 700;
}

.video-timeline {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--playlist-line);
}

.video-timeline[hidden] {
  display: none;
}

.timeline-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 117, 255, 0.18);
  border-radius: 8px;
  background: #eef6ff;
  color: var(--playlist-ink);
  font-weight: 950;
  text-align: left;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.timeline-toggle:hover {
  background: #dff0ff;
  border-color: rgba(0, 191, 255, 0.5);
}

.timeline-toggle span {
  color: var(--playlist-ink);
}

.timeline-toggle i {
  color: var(--playlist-blue);
  transition: transform 0.2s ease;
}

.timeline-toggle.open i {
  transform: rotate(180deg);
}

.timeline-chip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.timeline-chip-list[hidden] {
  display: none;
}

.timeline-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 117, 255, 0.16);
  border-radius: 8px;
  background: #eef6ff;
  color: var(--playlist-ink);
  text-align: left;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.timeline-chip:hover {
  background: #dff0ff;
  border-color: rgba(0, 191, 255, 0.5);
  transform: translateY(-1px);
}

.timeline-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 50px;
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--playlist-blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
}

.timeline-chip strong {
  color: var(--playlist-ink);
  font-size: 0.88rem;
  line-height: 1.25;
  font-weight: 850;
}

.playlist-panel {
  overflow: hidden;
  background: var(--playlist-panel);
  color: var(--playlist-ink);
}

.playlist-heading {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 16px;
  border: 0;
  background: var(--playlist-panel-2);
  color: var(--playlist-ink);
  text-align: left;
}

.playlist-heading span {
  display: grid;
  gap: 8px;
}

.playlist-heading small {
  color: var(--playlist-cyan);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.playlist-heading strong {
  color: var(--playlist-ink) !important;
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 900;
}

.playlist-heading i {
  color: var(--playlist-blue);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.playlist-heading.open i {
  transform: rotate(180deg);
}

.playlist-list {
  max-height: 590px;
  overflow: auto;
  padding: 8px;
}

.playlist-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.playlist-list[hidden] {
  display: none;
}

.playlist-list::-webkit-scrollbar {
  width: 10px;
}

.playlist-list::-webkit-scrollbar-track {
  background: #e8f1fb;
}

.playlist-list::-webkit-scrollbar-thumb {
  background: #8ec5ff;
  border-radius: 999px;
}

.playlist-video {
  display: grid;
  grid-template-columns: 26px 108px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  color: var(--playlist-ink);
  text-decoration: none;
  transition: background 0.2s ease;
}

.playlist-video:hover,
.playlist-video.active {
  color: var(--playlist-ink);
  background: linear-gradient(
    135deg,
    rgba(0, 117, 255, 0.14),
    rgba(0, 191, 255, 0.12)
  );
}

.playlist-number {
  color: var(--playlist-blue);
  text-align: center;
  font-size: 0.88rem;
  font-weight: 850;
}

.playlist-thumb {
  position: relative;
  min-height: 62px;
  border-radius: 6px;
  background: #071633;
  overflow: hidden;
}

.playlist-thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-thumb span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
}

.playlist-copy strong {
  display: block;
  color: var(--playlist-ink);
  font-size: 0.94rem;
  line-height: 1.3;
  font-weight: 900;
}

.playlist-copy small {
  display: block;
  margin-top: 4px;
  color: #34527a;
  font-size: 0.8rem;
  font-weight: 700;
}

.tag-section {
  padding: 0 0 40px;
}

.tag-panel {
  padding: 30px;
}

.tag-panel p {
  max-width: 760px;
  margin: 10px 0 22px;
  color: var(--playlist-muted);
  font-weight: 700;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 7px 11px;
  border-radius: 8px;
  background: #eaf3ff;
  color: #0a4ec9;
  font-size: 0.78rem;
  font-weight: 900;
}

html[data-theme="dark"] .full-playlist-page {
  --playlist-ink: #eef2f7;
  --playlist-muted: #aab4c3;
  --playlist-soft: #07090d;
  --playlist-paper: #11151d;
  --playlist-panel: #0f141d;
  --playlist-panel-2: #171c26;
  --playlist-cyan: #00c8ff;
  --playlist-line: rgba(117, 178, 255, 0.28);
  --playlist-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
  --playlist-hero-end: #07090d;
  background: var(--playlist-soft) !important;
  color: var(--playlist-ink) !important;
}

html[data-theme="dark"] .video-panel,
html[data-theme="dark"] .tag-panel {
  background: var(--playlist-paper) !important;
  border-color: var(--playlist-line) !important;
  color: var(--playlist-ink) !important;
  box-shadow: var(--playlist-shadow) !important;
}

html[data-theme="dark"] .video-info h2,
html[data-theme="dark"] .tag-panel h2 {
  color: var(--playlist-ink) !important;
}

html[data-theme="dark"] .video-info p,
html[data-theme="dark"] .tag-panel p {
  color: var(--playlist-muted) !important;
}

html[data-theme="dark"] .video-timeline {
  border-top-color: var(--playlist-line);
}

html[data-theme="dark"] .timeline-toggle,
html[data-theme="dark"] .timeline-toggle span,
html[data-theme="dark"] .timeline-chip strong {
  color: var(--playlist-ink) !important;
}

html[data-theme="dark"] .timeline-toggle {
  background: #172235;
  border-color: rgba(117, 178, 255, 0.22);
}

html[data-theme="dark"] .timeline-toggle:hover {
  background: #1d2b42;
  border-color: rgba(0, 200, 255, 0.48);
}

html[data-theme="dark"] .timeline-toggle i {
  color: #00c8ff;
}

html[data-theme="dark"] .timeline-chip {
  background: #172235;
  border-color: rgba(117, 178, 255, 0.22);
  color: var(--playlist-ink);
}

html[data-theme="dark"] .timeline-chip:hover {
  background: #1d2b42;
  border-color: rgba(0, 200, 255, 0.48);
}

html[data-theme="dark"] .tag-cloud span {
  background: #172235 !important;
  border: 1px solid rgba(117, 178, 255, 0.22);
  color: #8ec5ff !important;
}

html[data-theme="dark"] .playlist-panel {
  background: var(--playlist-panel) !important;
  border-color: var(--playlist-line) !important;
  color: #fff !important;
  box-shadow: var(--playlist-shadow) !important;
}

html[data-theme="dark"] .playlist-heading {
  background: var(--playlist-panel-2) !important;
  color: #fff !important;
}

html[data-theme="dark"] .playlist-heading strong,
html[data-theme="dark"] .playlist-video,
html[data-theme="dark"] .playlist-video:hover,
html[data-theme="dark"] .playlist-video.active,
html[data-theme="dark"] .playlist-copy strong {
  color: #fff !important;
}

html[data-theme="dark"] .playlist-copy small {
  color: #bac5d6 !important;
}

html[data-theme="dark"] .playlist-number {
  color: #8ec5ff !important;
}

html[data-theme="dark"] .playlist-list::-webkit-scrollbar-track {
  background: #151b24;
}

html[data-theme="dark"] .playlist-list::-webkit-scrollbar-thumb {
  background: #7f8da3;
}

html[data-theme="dark"] .playlist-video:hover,
html[data-theme="dark"] .playlist-video.active {
  background: linear-gradient(
    135deg,
    rgba(0, 117, 255, 0.38),
    rgba(254, 149, 28, 0.18)
  ) !important;
}

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

  .playlist-list {
    max-height: none;
  }
}

@media (max-width: 575px) {
  .full-playlist-page {
    padding-top: 86px;
  }

  .playlist-section {
    padding: 20px 0 28px;
  }

  .video-info,
  .tag-panel {
    padding: 22px;
  }

  .playlist-video {
    grid-template-columns: 22px 92px minmax(0, 1fr);
  }

  .playlist-thumb {
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
