/**
 * Playlist Player Page Styles
 * Two-column layout: video player + playlist sidebar
 */

.playlist-player-page {
  min-height: 100vh;
  background: var(--dark);
  padding-top: 70px;
}

/* Playlist Layout */
.playlist-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
  max-width: 1800px;
  margin: 0 auto;
}

/* Player Section */
.player-section {
  background: #000;
}

.player-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.loading-player {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(255,255,255,0.4);
}

.loading-player svg {
  color: #FF9500;
}

.loading-player p {
  font-size: 14px;
  font-weight: 500;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Current Video Info */
.current-video-info {
  padding: 24px 32px;
  background: var(--dark);
  border-bottom: 1.5px solid rgba(255,255,255,0.1);
}

.video-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  letter-spacing: -0.01em;
}

.stat-dot {
  color: rgba(255,255,255,0.3);
}

/* Playlist Sidebar */
.playlist-sidebar {
  background: var(--dark2);
  height: calc(100vh - 70px);
  overflow-y: auto;
  border-left: 1.5px solid rgba(255,255,255,0.1);
}

.playlist-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(255,149,0,0.1);
  border-bottom: 2px solid #FF9500;
  position: sticky;
  top: 0;
  z-index: 10;
}

.playlist-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #FF9500, #FF9500);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.playlist-info {
  flex: 1;
  min-width: 0;
}

.playlist-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-stats {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  letter-spacing: -0.01em;
}

/* Playlist Videos */
.playlist-videos {
  padding: 12px;
}

.playlist-video-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(28,28,30,0.6);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.playlist-video-item:hover {
  background: rgba(28,28,30,0.9);
  border-color: #FF9500;
  transform: translateX(4px);
}

.playlist-video-item.active {
  background: rgba(255,149,0,0.15);
  border-color: #FF9500;
  border-width: 2px;
}

.playlist-video-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #FF9500;
  border-radius: 10px 0 0 10px;
}

.playlist-video-position {
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

.playlist-video-item.active .playlist-video-position {
  color: #FF9500;
}

.playlist-video-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.playlist-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.playlist-video-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.85);
  color: var(--white);
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

.playlist-video-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.playlist-video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-video-item.active .playlist-video-title {
  color: #FF9500;
}

.playlist-video-views {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 1200px) {
  .playlist-layout {
    grid-template-columns: 1fr 360px;
  }
  
  .playlist-video-thumb {
    width: 100px;
  }
}

@media (max-width: 1024px) {
  .playlist-layout {
    grid-template-columns: 1fr;
  }
  
  .playlist-sidebar {
    height: auto;
    max-height: 600px;
  }
  
  .playlist-header {
    position: relative;
  }
}

@media (max-width: 768px) {
  .playlist-player-page {
    padding-top: 60px;
  }
  
  .current-video-info {
    padding: 16px;
  }
  
  .video-title {
    font-size: 18px;
  }
  
  .playlist-header {
    padding: 16px;
  }
  
  .playlist-icon {
    width: 48px;
    height: 48px;
  }
  
  .playlist-title {
    font-size: 16px;
  }
  
  .playlist-videos {
    padding: 8px;
  }
  
  .playlist-video-item {
    padding: 10px;
    margin-bottom: 10px;
  }
  
  .playlist-video-thumb {
    width: 90px;
  }
  
  .playlist-video-title {
    font-size: 13px;
  }
}
