:root {
    --yt-live-red: #ff0000;
    --yt-live-dark: #0f0f0f;
    --yt-live-grey: #606060;
    --yt-live-bg: #ffffff;
    --yt-live-radius: 12px;
    --yt-live-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --yt-live-shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --yt-live-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.yt-live-container { 
    margin: 20px 0 10px 0; 
    font-family: 'Inter', system-ui, -apple-system, sans-serif; 
    color: var(--yt-live-dark);
}

/* Badge Animado */
.yt-live-badge { 
    display: inline-flex;
    align-items: center;
    background: var(--yt-live-red); 
    color: #fff; 
    padding: 6px 12px; 
    border-radius: 6px; 
    font-weight: 700; 
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-bottom: 15px; 
    animation: yt-pulse 2s infinite; 
}

@keyframes yt-pulse { 
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 33, 23, 0.7); } 
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(230, 33, 23, 0); } 
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 33, 23, 0); } 
}

/* Wrapper Universal de Video */
.yt-live-video-wrapper { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    border-radius: var(--yt-live-radius); 
    box-shadow: var(--yt-live-shadow);
    background: #000;
    transition: var(--yt-live-transition);
}

.yt-live-video-wrapper iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: 0; 
}

/* Título Destacado */
.yt-live-featured-title {
    font-size: 20px;
    font-weight: 700;
    margin: 10px 0 20px 0;
    line-height: 1.3;
}

/* --- DISEÑO: CUADRÍCULA (GRID) --- */
.yt-layout-grid .yt-live-gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 20px; 
}

/* --- DISEÑO: MOSAICO (MASONRY) --- */
.yt-layout-masonry .yt-live-gallery { 
    column-count: 3;
    column-gap: 25px;
}

.yt-layout-masonry .yt-live-gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .yt-layout-masonry .yt-live-gallery { column-count: 2; }
}
@media (max-width: 600px) {
    .yt-layout-masonry .yt-live-gallery { column-count: 1; }
}

/* --- DISEÑO: YOUTUBE (FEATURED) --- */
.yt-layout-youtube {
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .yt-layout-youtube {
        display: grid;
        grid-template-columns: 1fr 350px;
        gap: 30px;
        align-items: start;
    }
    
    .yt-layout-youtube .yt-live-badge,
    .yt-layout-youtube .featured-video,
    .yt-layout-youtube .yt-live-featured-title {
        grid-column: 1;
    }

    .yt-layout-youtube .yt-live-gallery {
        grid-column: 2;
        grid-row: 1 / span 10;
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
        max-height: 70vh;
        overflow-y: auto;
        padding-right: 10px;
    }

    /* Pequeño scrollbar premium */
    .yt-layout-youtube .yt-live-gallery::-webkit-scrollbar { width: 4px; }
    .yt-layout-youtube .yt-live-gallery::-webkit-scrollbar-track { background: #f1f1f1; }
    .yt-layout-youtube .yt-live-gallery::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
}

@media (max-width: 991px) {
    .yt-layout-youtube .yt-live-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        margin-top: 20px;
        border-top: 1px solid #eee;
        padding-top: 30px;
    }
}


/* Item de Galería Común */
.yt-live-gallery-item { 
    border-radius: var(--yt-live-radius); 
    overflow: hidden; 
    transition: var(--yt-live-transition);
}

.yt-live-gallery-item:hover { 
    transform: translateY(-5px); 
}

.yt-live-gallery-item:hover .yt-live-video-wrapper {
    box-shadow: var(--yt-live-shadow-hover);
}

.yt-live-gallery-item h4 { 
    font-size: 15px; 
    margin: 12px 5px 5px 5px; 
    line-height: 1.5; 
    color: var(--yt-live-dark);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Error */
.yt-live-error { 
    background: #fff5f5; 
    color: #d63031; 
    padding: 20px; 
    border-radius: var(--yt-live-radius); 
    border-left: 5px solid #d63031;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
