/* ==================================================
   FLUID-CUSTOM.CSS - STARY DZIAŁAJĄCY + MINIMALNE HLS
   ================================================== */

/* VIDEO SHOWCASE SECTION */
.video-showcase {
    padding: 8rem 0;
    background: var(--primary-light);
}

.featured-video-container {
    max-width: 1000px;
    margin: 0 auto 4rem;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
}

/* VIDEO INFO OVERLAY - rozszerzona TYLKO o HLS info */
.video-info-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(10, 10, 10, 0.9);
    padding: 16px 24px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(201, 169, 110, 0.3);
    z-index: 15;
    max-width: 350px;
    transition: opacity 0.3s ease;
}

.video-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.video-badge::before {
    content: '🔒';
}

.video-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 8px;
    font-family: 'Playfair Display', serif;
}

/* NOWE: HLS Quality info */
.video-quality {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 4px;
}

/* Fullscreen button */
.fullscreen-btn {
    background: var(--accent-gold);
    color: var(--primary-dark);
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: var(--accent-warm);
    transform: scale(1.05);
}

/* ==================================================
   UKRYJ MINIPLAYER/PICTURE-IN-PICTURE
   ================================================== */

/* Ukryj wszystkie warianty miniplayera */
.fluid_control_mini_player,
.fp_mini_player_button,
.fluid_picture_in_picture_button,
.fluid_control_picture_in_picture,
[class*="mini_player"],
[class*="miniplayer"],
[class*="picture_in_picture"],
[class*="pip"] {
    display: none !important;
}

/* Ukryj miniplayer popup */
.fluid_mini_player_wrapper,
.fluid_picture_in_picture_wrapper {
    display: none !important;
}

/* ==================================================
   FLUID PLAYER - TYLKO PODSTAWOWE RZECZY
   ================================================== */

/* Podstawowy container - wymusza odpowiedni rozmiar */
.fluid_video_wrapper {
    border-radius: 20px;
    overflow: hidden;
    width: 100% !important;
    height: auto !important;
}

.fluid_video_wrapper video {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    aspect-ratio: 16/9;
}

/* Ukryj overlay gdy film gra */
.fluid_video_wrapper.fluid_player_playing .video-info-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Pokaż overlay gdy film jest zatrzymany */
.fluid_video_wrapper:not(.fluid_player_playing) .video-info-overlay {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ==================================================
   VIDEO GRID - BEZ ZMIAN + DODANE HLS BADGE
   ================================================== */

.video-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 2rem; 
    margin-top: 3rem;
}

.video-item {
    background: var(--primary-dark); 
    border-radius: 15px; 
    overflow: hidden; 
    border: 1px solid rgba(201, 169, 110, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.video-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--primary-light);
    overflow: hidden;
}

.video-lazy {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-lazy[data-loaded="false"] {
    opacity: 0;
}

.video-lazy[data-loaded="true"] {
    opacity: 1;
}

.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.video-poster::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.video-poster:hover::before {
    background: rgba(0, 0, 0, 0.1);
}

/* PROSTY PLAY BUTTON dla grid videos - BEZ ZMIAN */
.play-button {
    position: relative;
    z-index: 2;
    width: 80px;
    height: 80px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-dark);
    transition: background 0.3s ease;
}

.play-button:hover {
    background: var(--accent-warm);
}

/* NOWE: HLS vs MP4 badges */
.video-overlay-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 3;
}

/* Badge dla HLS */
.video-overlay-badge.hls-badge {
    background: var(--gradient-blue);
    color: white;
}

/* Badge dla MP4 fallback */
.video-overlay-badge.mp4-badge {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.video-item-info {
    padding: 1.5rem;
}

.video-item h3 {
    color: var(--accent-gold); 
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.video-item p {
    color: var(--text-secondary); 
    margin-bottom: 1rem;
}

.video-meta {
    display: flex; 
    justify-content: space-between; 
    font-size: 0.9rem; 
    color: var(--text-muted);
}

/* NOWE: Informacja o konwersji jutro */
.conversion-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: rgba(201, 169, 110, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* LOADING STATE */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-gold);
    z-index: 5;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(201, 169, 110, 0.3);
    border-top: 3px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVE - TYLKO PODSTAWOWE RZECZY */
@media (max-width: 768px) {
    .video-info-overlay {
        max-width: 250px;
        padding: 12px 18px;
        top: 15px;
        left: 15px;
    }
    
    .video-title {
        font-size: 1rem;
    }
    
    .video-badge {
        font-size: 0.8rem;
    }
    
    .video-quality {
        font-size: 0.7rem;
    }
    
    .fluid_video_wrapper.fluid_player_playing .video-info-overlay {
        display: none;
    }
}

@media (max-width: 480px) {
    .video-info-overlay {
        max-width: 200px;
        padding: 10px 15px;
        top: 10px;
        left: 10px;
        border-radius: 15px;
    }
    
    .video-title {
        font-size: 0.9rem;
        margin-top: 6px;
    }
    
    .video-badge {
        font-size: 0.7rem;
    }
    
    .video-quality {
        font-size: 0.65rem;
    }
    
    .fluid_video_wrapper {
        border-radius: 12px;
    }
}

