/* =========================================
   ESTILOS VIDEOTECA (VIDEO FIJO GLOBAL)
   ========================================= */

:root {
    --cyan-glow: #00d2ff;
    --dark-blue: #0f253e;
    --gold: #ffd700;
    --dark-bg: #050a10;
}

/* 1. BODY TRANSPARENTE (Para ver el video global) */
body {
    background: transparent; 
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
}

/* =========================================
   FONDO DE VIDEO GLOBAL (FIJO)
   ========================================= */
.video-fondo-global {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -10; /* Detrás de todo */
    overflow: hidden;
}

#bg-video-global {
    width: 100%; height: 100%; object-fit: cover;
}

.overlay-global {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    /* Oscurecemos un 60% para que el contenido resalte */
    background: rgba(0, 0, 0, 0.6); 
}

/* --- PORTADA HERO --- */
.video-hero {
    padding: 140px 20px 10px; 
    text-align: center; 
    position: relative;
    background: transparent;
}

.badge-play {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 15px; border: 1px solid var(--gold); color: var(--gold);
    border-radius: 20px; font-size: 0.8rem; letter-spacing: 3px; margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    background: rgba(0,0,0,0.5);
}

.video-hero h1 {
    font-family: 'Cinzel', serif; font-size: 3.5rem; color: white;
    text-shadow: 0 0 30px rgba(0, 210, 255, 0.4); margin-bottom: 15px;
}
.video-hero p { 
    color: #e0e0e0; font-size: 1.1rem; max-width: 600px; margin: 0 auto; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* --- CONTROLES Y BUSCADOR --- */
.video-controls { 
    padding: 0 0 50px; 
    background: transparent;
}

.search-wrapper { max-width: 500px; margin: 0 auto 30px; position: relative; }
.search-wrapper input {
    width: 100%; 
    background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 15px 50px; border-radius: 50px; color: white; font-size: 1rem;
    transition: 0.3s;
}
.search-wrapper input:focus {
    background: rgba(0,0,0,0.6);
    border-color: var(--cyan-glow); box-shadow: 0 0 20px rgba(0, 210, 255, 0.3); outline: none;
}
.search-wrapper i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #ccc; }

/* Botones de Filtro */
.category-tabs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.cat-btn {
    background: rgba(0,0,0,0.5); /* Fondo semitransparente */
    border: 1px solid rgba(255,255,255,0.2); color: #ccc;
    padding: 8px 25px; border-radius: 30px; cursor: pointer; transition: 0.3s;
    font-family: 'Montserrat', sans-serif; font-weight: 500;
}
.cat-btn:hover, .cat-btn.active {
    background: var(--cyan-glow); color: var(--dark-blue); border-color: var(--cyan-glow);
    font-weight: 700; box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

/* --- GRILLA DE VIDEOS --- */
.video-grid-section { background: transparent; }

.video-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px; padding-bottom: 80px;
}

/* Tarjeta de Video */
.video-card {
    /* Fondo semitransparente oscuro (Cristal) */
    background: rgba(20, 25, 35, 0.75); 
    backdrop-filter: blur(5px);
    
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px; overflow: hidden; transition: 0.4s; cursor: pointer;
    display: flex; flex-direction: column; position: relative;
}
.video-card:hover {
    transform: translateY(-10px); 
    background: rgba(20, 25, 35, 0.9);
    border-color: var(--cyan-glow);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 20px rgba(0, 210, 255, 0.15);
}

/* Miniatura con Botón Play */
.thumbnail-box {
    height: 200px; position: relative; overflow: hidden;
}
.thumbnail-box img {
    width: 100%; height: 100%; object-fit: cover; transition: 0.5s; opacity: 0.9;
}
.play-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center;
    transition: 0.3s;
}
.play-icon {
    width: 60px; height: 60px; background: rgba(255,255,255,0.2); border-radius: 50%;
    display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px);
    border: 2px solid white; color: white; font-size: 1.5rem; transition: 0.3s;
}

.video-card:hover img { transform: scale(1.1); opacity: 1; }
.video-card:hover .play-icon {
    background: var(--cyan-glow); border-color: var(--cyan-glow); 
    transform: scale(1.1); color: var(--dark-blue);
}

/* Info de la Tarjeta */
.video-info { padding: 20px; }
.video-cat-tag {
    font-size: 0.7rem; color: var(--gold); text-transform: uppercase; letter-spacing: 1px;
    font-weight: 700; margin-bottom: 5px; display: block;
}
.video-title {
    font-family: 'Cinzel', serif; font-size: 1.1rem; color: white; margin-bottom: 8px; line-height: 1.3;
}
.video-desc { font-size: 0.85rem; color: #ccc; line-height: 1.5; }

/* --- REPRODUCTOR MODAL (CINE) --- */
.cine-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    
    /* Fondo semitransparente (0.9) para ver un poco el video detrás */
    background: rgba(0, 0, 0, 0.9); 
    
    z-index: 6000;
    justify-content: center; align-items: center; backdrop-filter: blur(8px);
}

.cine-container {
    width: 90%; max-width: 1000px; position: relative;
    display: flex; flex-direction: column; gap: 15px;
}

.video-screen-box {
    position: relative; padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
    height: 0; overflow: hidden; background: black;
    border: 1px solid #333; border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.1);
}
.video-screen-box iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.video-info-bar { color: white; }
.video-info-bar h3 { font-family: 'Cinzel', serif; font-size: 1.5rem; color: var(--cyan-glow); margin-bottom: 5px; }
.video-info-bar p { color: #aaa; font-size: 0.9rem; }

.close-cine {
    position: absolute; top: -40px; right: 0; color: white; font-size: 2rem;
    background: transparent; border: none; cursor: pointer; transition: 0.3s;
}
.close-cine:hover { color: var(--cyan-glow); transform: rotate(90deg); }

/* Responsive */
@media (max-width: 768px) {
    .video-hero h1 { font-size: 2.5rem; }
    .cine-container { width: 100%; }
}