/**
 * Video Playlist Frontend Styles
 * Modernes, responsives Design für die Video Gallery
 */

/* ============================================
   Container & Layout
   ============================================ */
.video-playlist-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.video-playlist-no-videos {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #666;
}

/* ============================================
   Featured Video Section
   ============================================ */
.video-playlist-featured {
    margin-bottom: 60px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}

.video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.video-container,
.video-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-thumbnail-overlay {
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-thumbnail-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-thumbnail-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.video-thumbnail-overlay:hover .video-play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-button svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Info */
.video-info {
    padding: 30px;
    background: #fff;
}

.video-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.video-categories {
    margin-bottom: 15px;
}

.video-category {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* ============================================
   Carousel Section
   ============================================ */
.video-playlist-carousel-wrapper {
    margin-top: 60px;
}

.carousel-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #1a1a1a;
}

.video-carousel-container {
    position: relative;
    padding: 0 60px;
}

.video-carousel {
    overflow: hidden;
    width: 100%;
}

.video-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Carousel Item */
.video-carousel-item {
    flex: 0 0 calc(25% - 15px);
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.video-carousel-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.carousel-item-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
}

.carousel-item-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-carousel-item:hover .carousel-item-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1;
}

.carousel-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    opacity: 0;
}

.video-carousel-item:hover .carousel-item-overlay {
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
}

.carousel-item-info {
    padding: 15px;
}

.carousel-item-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-item-categories {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
    color: #1a1a1a;
}

.carousel-nav:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .video-carousel-item {
        flex: 0 0 calc(33.333% - 14px);
    }
    
    .video-carousel-container {
        padding: 0 50px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .video-playlist-container {
        padding: 15px;
    }
    
    .video-title {
        font-size: 22px;
    }
    
    .video-info {
        padding: 20px;
    }
    
    .video-carousel-item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .carousel-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .video-carousel-container {
        padding: 0 40px;
    }
    
    .carousel-nav {
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .video-playlist-featured {
        border-radius: 8px;
        margin-bottom: 40px;
    }
    
    .video-title {
        font-size: 20px;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-description {
        font-size: 14px;
    }
    
    .video-carousel-item {
        flex: 0 0 100%;
    }
    
    .video-carousel-track {
        gap: 15px;
    }
    
    .carousel-title {
        font-size: 18px;
    }
    
    .video-carousel-container {
        padding: 0 35px;
    }
    
    .carousel-nav {
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   Loading States
   ============================================ */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

.video-loading::after {
    content: "";
    display: block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Accessibility
   ============================================ */
.video-carousel-item:focus,
.carousel-nav:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .video-category,
    .carousel-nav:hover {
        background: #000;
        color: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .video-carousel-track,
    .carousel-item-thumbnail img,
    .carousel-nav,
    .video-play-button,
    .video-thumbnail-overlay {
        transition: none;
    }
}

/* ============================================
   Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
    .video-info {
        background: #1a1a1a;
    }
    
    .video-title,
    .carousel-title,
    .carousel-item-title {
        color: #fff;
    }
    
    .video-description {
        color: #ccc;
    }
    
    .video-carousel-item {
        background: #1a1a1a;
    }
    
    .carousel-nav {
        background: #2a2a2a;
        color: #fff;
    }
}
