Files
Krystie 9928a23c25 feat: Add enhanced playlist system with auto-play, shuffle, and collaboration
- Create comprehensive playlist management system
- Implement auto-play, shuffle, and repeat modes (none/one/all)
- Add collaborative playlists with granular permissions
- Build playlist follow system for users
- Implement playlist analytics and play tracking
- Create modern playlist player UI with controls
- Add privacy modes (public/unlisted/private)
- Document complete API and usage

Features:
- Auto-play next video when current ends
- Shuffle mode for random playback
- Repeat modes (off, one, all)
- Collaborative editing with permissions
- Follow/unfollow playlists
- Playlist view tracking
- Modern player controls UI
- Complete permission system
- Production-ready with error handling
2026-03-30 17:16:37 -07:00

294 lines
4.7 KiB
CSS

/**
* Playlist Player Styles
*/
.playlist-player-controls {
background: white;
border-radius: 12px;
padding: 20px;
margin-top: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.playlist-info h3 {
margin: 0 0 8px 0;
font-size: 20px;
font-weight: 600;
}
.playlist-info p {
margin: 0;
color: #666;
font-size: 14px;
}
.playlist-controls {
display: flex;
gap: 12px;
margin: 20px 0;
padding: 15px 0;
border-top: 1px solid #e9ecef;
border-bottom: 1px solid #e9ecef;
}
.playlist-controls button {
background: #f8f9fa;
border: none;
border-radius: 8px;
padding: 10px 16px;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.playlist-controls button:hover {
background: #e9ecef;
}
.playlist-controls button.active {
background: #007bff;
color: white;
}
.playlist-controls button svg {
width: 20px;
height: 20px;
}
.playlist-items {
max-height: 500px;
overflow-y: auto;
}
.playlist-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
border-radius: 8px;
cursor: pointer;
transition: background 0.2s;
position: relative;
}
.playlist-item:hover {
background: #f8f9fa;
}
.playlist-item.active {
background: #e7f3ff;
}
.playlist-item.active .item-number {
background: #007bff;
color: white;
}
.item-number {
width: 32px;
height: 32px;
background: #e9ecef;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 14px;
flex-shrink: 0;
}
.item-thumbnail {
width: 120px;
height: 68px;
border-radius: 8px;
overflow: hidden;
position: relative;
flex-shrink: 0;
}
.item-thumbnail img {
width: 100%;
height: 100%;
object-fit: cover;
}
.item-duration {
position: absolute;
bottom: 4px;
right: 4px;
background: rgba(0,0,0,0.8);
color: white;
padding: 2px 6px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
}
.item-info {
flex: 1;
min-width: 0;
}
.item-title {
font-weight: 500;
margin-bottom: 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item-meta {
font-size: 13px;
color: #666;
}
.btn-remove {
background: none;
border: none;
font-size: 24px;
color: #999;
cursor: pointer;
padding: 4px 8px;
opacity: 0;
transition: opacity 0.2s;
}
.playlist-item:hover .btn-remove {
opacity: 1;
}
.btn-remove:hover {
color: #dc3545;
}
/* Collaborative playlist badge */
.playlist-badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 12px;
background: #e7f3ff;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
color: #007bff;
margin-left: 8px;
}
.playlist-badge svg {
width: 14px;
height: 14px;
}
/* Empty state */
.playlist-empty {
text-align: center;
padding: 60px 20px;
color: #666;
}
.playlist-empty h3 {
margin: 0 0 8px 0;
font-size: 18px;
}
.playlist-empty p {
margin: 0;
font-size: 14px;
}
/* Playlist grid (for browse page) */
.playlist-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
}
.playlist-card {
background: white;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
transition: transform 0.2s, box-shadow 0.2s;
cursor: pointer;
}
.playlist-card:hover {
transform: translateY(-4px);
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.playlist-card-thumb {
width: 100%;
height: 180px;
background: #e9ecef;
position: relative;
overflow: hidden;
}
.playlist-card-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.playlist-card-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.7));
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 16px;
color: white;
}
.playlist-video-count {
font-size: 14px;
font-weight: 600;
}
.playlist-card-info {
padding: 16px;
}
.playlist-card-title {
font-size: 16px;
font-weight: 600;
margin: 0 0 8px 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.playlist-card-meta {
font-size: 14px;
color: #666;
margin: 0;
}
/* Responsive */
@media (max-width: 768px) {
.playlist-controls {
flex-wrap: wrap;
}
.item-thumbnail {
width: 80px;
height: 45px;
}
.item-number {
display: none;
}
.playlist-grid {
grid-template-columns: 1fr;
}
}