/* --- ESTILOS GENERALES --- */
html, body { margin: 0; padding: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: #141414; color: white; }
* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }
body.noscroll { overflow: hidden; height: 100vh; }

/* HEADER */
header { display: flex; justify-content: space-between; align-items: center; padding: 15px 4%; background: linear-gradient(to bottom, rgba(0,0,0,0.9) 10%, rgba(0,0,0,0)); position: fixed; width: 100%; z-index: 100; top: 0; height: 80px; transition: background 0.3s; }
.logo { display: flex; align-items: center; cursor: pointer; flex-shrink: 0; z-index: 110; }
.logo img { height: 45px; width: auto; }

.filtros-header { display: flex; align-items: center; gap: 10px; }

/* --- ESTILOS FORMULARIO MODAL --- */

/* Títulos de secciones */
.form-section-title { 
    color: #5b60e5; 
    font-weight: bold; 
    margin-top: 25px; 
    margin-bottom: 15px; 
    border-bottom: 1px solid #333; 
    padding-bottom: 5px; 
    font-size: 1.1rem;
}

/* Grilla para Roles (2 Columnas) */
.roles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 10px; /* Espacio entre ellas */
}

/* Contenedor de cada Rol (Etiqueta + Input) */
.role-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
}

/* La etiqueta del rol (ej: Director) */
.role-label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 3px;
    font-weight: bold;
}

/* El campo de texto (Input) */
.role-input {
    background: #222;
    border: 1px solid #444;
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%; /* Ocupa todo el ancho de su columna */
    box-sizing: border-box; /* Para que el padding no rompa el ancho */
}

.role-input:focus {
    border-color: #5b60e5;
    outline: none;
    background: #2a2a2a;
}

/* Ajuste para móviles: 1 sola columna */
@media (max-width: 600px) {
    .roles-grid {
        grid-template-columns: 1fr;
    }
}

/* Checkboxes Grid (Técnicas y Formatos) */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #ddd;
    cursor: pointer;
    background: #222;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #333;
}
.checkbox-item:hover { background: #2a2a2a; border-color: #555; }

/* ALINEACIÓN HEADER */
.btn-header-action, .search-bar, .filtro-genero, .solapa-envianos {
    height: 40px; display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; vertical-align: middle; margin: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.search-bar { background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.15); padding: 0 16px; color: #fff; border-radius: 20px; outline: none; width: 190px; font-size: 0.9rem; transition: 0.3s; }
.search-bar:focus { border-color: #8A2BE2; background: rgba(0,0,0,0.85); box-shadow: 0 0 10px rgba(138,43,226,0.3); }
.filtro-genero { background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.15); padding: 0 14px; color: #fff; border-radius: 20px; cursor: pointer; font-size: 0.9rem; transition: 0.3s; }
.filtro-genero:focus { border-color: #8A2BE2; }

.btn-header-action { background: rgba(25,25,35,0.7); border: 1px solid rgba(255,255,255,0.12); color: #ddd; padding: 0 16px; border-radius: 20px; cursor: pointer; transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.15s; font-size: 0.9rem; gap: 6px; white-space: nowrap; font-weight: 500; }
.btn-header-action:hover { background: rgba(91,96,229,0.3); border-color: #5b60e5; color: #fff; transform: translateY(-1px); }
.solapa-envianos { font-size: 0.9rem; color: #ccc; border: 1px solid rgba(255,255,255,0.15); padding: 0 18px; border-radius: 20px; margin-left: 6px; transition: 0.3s; background: rgba(0,0,0,0.6); white-space: nowrap; font-weight: 600; }
.solapa-envianos:hover { color: #fff; border-color: #5b60e5; background: rgba(91, 96, 229, 0.2); }

/* HERO */
.hero-carousel { position: relative; height: 75vh; width: 100%; overflow: hidden; background: #000; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease-in-out; display: flex; align-items: center; padding-left: 5%; z-index: 1; }
.hero-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, #141414 10%, rgba(91, 96, 229, 0.2) 60%, rgba(0,0,0,0.4)); z-index: -1; }
.hero-slide.active { opacity: 1; z-index: 2; }
.hero-content { position: relative; z-index: 10; max-width: 650px; }
.hero-content h1 { font-size: 3.8rem; margin-bottom: 15px; text-shadow: 2px 2px 8px rgba(0,0,0,0.8); line-height: 1.1; }
.hero-content p { font-size: 1.2rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.9); margin-bottom: 25px; color: #e0e0e0; }
.btn-hero { background: rgba(255,255,255,0.2); color: #fff; padding: 12px 30px; font-weight: bold; border-radius: 4px; display: inline-block; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.3); transition: 0.3s; }
.btn-hero:hover { background: #5b60e5; border-color: #5b60e5; }

/* HERO COUNTDOWN */
.hero-countdown-badge { display: inline-block; background: #ffcc00; color: #000; font-weight: bold; padding: 5px 10px; border-radius: 4px; margin-bottom: 10px; text-transform: uppercase; font-size: 0.9rem; }
.hero-leaving-badge { display: inline-block; background: #e53935; color: #fff; font-weight: bold; padding: 5px 12px; border-radius: 4px; margin-bottom: 10px; text-transform: uppercase; font-size: 0.88rem; box-shadow: 0 2px 10px rgba(229,57,53,0.5); }
.badge-leaving-soon { position: absolute; top: 8px; left: 8px; background: rgba(229, 57, 53, 0.92); color: #fff; font-weight: 700; font-size: 0.72rem; padding: 4px 9px; border-radius: 4px; z-index: 15; text-transform: uppercase; letter-spacing: 0.4px; box-shadow: 0 2px 8px rgba(0,0,0,0.6); pointer-events: none; }
.hero-timer { font-size: 1.5rem; font-weight: bold; color: #ffcc00; margin-top: 10px; display: block; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }

.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: transparent; color: rgba(255,255,255,0.5); border: none; font-size: 3rem; padding: 20px; cursor: pointer; z-index: 10; transition: 0.3s; }
.carousel-btn:hover { color: #5b60e5; transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 10px; } .next-btn { right: 10px; }
.carousel-indicators { position: absolute; bottom: 30px; right: 5%; z-index: 10; display: flex; gap: 12px; }
.indicator { width: 10px; height: 10px; background: rgba(255,255,255,0.3); border-radius: 50%; cursor: pointer; transition: 0.3s; }
.indicator.active { background: #5b60e5; transform: scale(1.3); box-shadow: 0 0 10px rgba(91, 96, 229, 0.5); }

#contenido-principal { height: 100vh; overflow-y: auto; }
#contenedor-listas { position: relative; z-index: 5; margin-top: 0; background: #141414; padding-top: 20px; padding-bottom: 50px; }

/* TIMELINE WRAPPER */
.timeline-wrapper { display: flex; align-items: center; padding: 0 4%; margin-bottom: 20px; gap: 10px; }
.fixed-pill { background: #5b60e5; border: 1px solid #5b60e5; padding: 8px 18px; border-radius: 20px; color: white; cursor: pointer; white-space: nowrap; font-weight: bold; transition: 0.3s; flex-shrink: 0; }
.fixed-pill:hover { transform: scale(1.05); }
.fixed-pill.inactive { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #ccc; }
.timeline-scroll-container { display: flex; overflow-x: auto; gap: 10px; padding: 5px 0; scrollbar-width: none; align-items: center; flex-grow: 1; scroll-behavior: smooth; mask-image: linear-gradient(to right, transparent, black 10px, black 95%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10px, black 95%, transparent); }
.timeline-scroll-container::-webkit-scrollbar { display: none; }
.year-pill { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 8px 18px; border-radius: 20px; color: #ccc; cursor: pointer; white-space: nowrap; font-weight: bold; transition: 0.3s; }
.year-pill:hover, .year-pill.active { background: #5b60e5; border-color: #5b60e5; color: white; transform: scale(1.05); }
.timeline-btn { background: transparent; border: 1px solid #333; color: #888; width: 25px; height: 25px; border-radius: 50%; cursor: pointer; font-weight: bold; display: flex; align-items: center; justify-content: center; transition: 0.3s; flex-shrink: 0; font-size: 0.8rem; }
.timeline-btn:hover { border-color: #777; color: #fff; }

/* CATEGORÍAS Y GRILLA (Espaciado Reducido) */
.category-row { 
    padding: 2.5px 0; /* MENOS PADDING */
    position: relative; 
    margin-bottom: 2.5px; /* MENOS MARGEN */
    transition: 0.5s; 
}
.category-row.hidden-by-year { display: none; }
.category-title { 
    font-size: 1.4rem; 
    margin-bottom: 8px; /* Título más pegado a las fotos */
    color: #fff; font-weight: 500; padding-left: 4%; 
}
.row-wrapper { position: relative; display: flex; align-items: center; }
.video-grid { display: flex; gap: 10px; overflow-x: scroll; scroll-behavior: smooth; padding: 10px 4% 20px 4%; scrollbar-width: none; }
.video-grid::-webkit-scrollbar { display: none; }
.scroll-btn { position: absolute; top: 0; bottom: 0; width: 4%; min-width: 40px; background: rgba(0,0,0,0.5); border: none; color: white; font-size: 2rem; cursor: pointer; z-index: 20; opacity: 0; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.row-wrapper:hover .scroll-btn { opacity: 1; }
.scroll-btn:hover { background: rgba(0,0,0,0.8); color: #5b60e5; }
.scroll-left { left: 0; } .scroll-right { right: 0; }

.video-card { 
    flex: 0 0 calc((100% - (4 * 10px)) / 5); 
    min-width: 310px; 
    max-width: 360px;
    aspect-ratio: 16/9; 
    cursor: pointer; 
    transition: 0.3s ease; 
    position: relative; 
    border-radius: 6px; 
    overflow: hidden; 
}
.video-card:hover { transform: scale(1.08); z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.video-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: 0.3s; }
.video-info-hover { position: absolute; bottom: 0; left: 0; background: linear-gradient(to top, rgba(0,0,0,1) 20%, transparent); width: 100%; padding: 20px 15px; opacity: 0; transition: 0.3s; font-size: 1.05rem; line-height: 1.3; pointer-events: none; }
.video-card:hover .video-info-hover { opacity: 1; }

/* Botón Borrar en Tarjeta (Mi Lista) */
.btn-remove-card {
    position: absolute; top: 5px; right: 5px; 
    background: rgba(0,0,0,0.7); color: #ff5252; 
    width: 25px; height: 25px; border-radius: 50%; 
    text-align: center; line-height: 25px; font-weight: bold; 
    cursor: pointer; z-index: 20; display: none;
    border: 1px solid #ff5252;
}
.video-card:hover .btn-remove-card { display: block; }
.btn-remove-card:hover { background: #ff5252; color: white; }

.card-see-more { 
    flex: 0 0 calc((100% - (4 * 10px)) / 5); 
    min-width: 310px; 
    max-width: 360px;
    aspect-ratio: 16/9; 
    background: #1f1f1f; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    border-radius: 6px; 
    text-align: center; 
    color: #aaa; 
    border: 2px dashed #444; 
    transition: 0.3s; 
    cursor: pointer; 
    text-decoration: none; 
}
.card-see-more:hover { background: #333; color: white; border-color: #5b60e5; transform: scale(1.05); }
.plus-circle { width: 60px; height: 60px; border: 3px solid #5b60e5; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.plus-circle span { font-size: 40px; color: #5b60e5; font-weight: bold; line-height: 1; margin-top: -4px; }
.card-see-more:hover .plus-circle { background: #5b60e5; }
.card-see-more:hover .plus-circle span { color: white; }
.see-more-text { font-size: 1rem; font-weight: 500; padding: 0 10px; }

.btn-share-search { background: #222; color: #ccc; border: 1px solid #444; padding: 10px 20px; border-radius: 20px; cursor: pointer; margin-left: 20px; font-size: 0.9rem; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn-share-search:hover { background: #333; color: white; border-color: #5b60e5; }

/* MODAL Y PESTAÑAS (SOLUCION FINAL DOBLE SUBRAYADO) */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; display: none; justify-content: center; align-items: flex-start; padding-top: 50px; opacity: 0; transition: 0.3s; backdrop-filter: blur(8px); }
.modal-content { background: #181818; width: 90%; max-width: 850px; border-radius: 12px; overflow: hidden; position: relative; }
.modal-header { height: 400px; background-size: cover; background-position: center; position: relative; overflow: hidden; } 
.modal-header::after { content:''; position: absolute; inset: 0; background: linear-gradient(to top, #181818 10%, rgba(24,24,24,0.4) 50%, rgba(0,0,0,0) 100%); z-index: 2; pointer-events: none; }
.modal-video-bg { position: absolute; top: 50%; left: 50%; width: 100%; height: 140%; transform: translate(-50%, -50%); pointer-events: none; z-index: 1; object-fit: cover; opacity: 1; }

.modal-tabs { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid rgba(255,255,255,0.2); padding-bottom: 10px; margin-bottom: 20px; width: 100%; position: relative; }
.tabs-left { display: flex; gap: 20px; }

.tab-btn { background: none; border: none; color: #888; padding: 10px 0; cursor: pointer; font-size: 1.1rem; font-weight: bold; position: relative; outline: none; border-bottom: 2px solid transparent; }
.tab-btn.active { color: white; }
.tab-btn.active::after { content:''; position: absolute; bottom: -12px; left:0; width: 100%; height: 3px; background: #5b60e5; }

.btn-play-tab { background: #5b60e5; color: white; padding: 8px 25px; border-radius: 4px; font-weight: bold; text-decoration: none; }
.modal-body { padding: 30px 40px; position: relative; z-index: 10; margin-top: -50px; }
.modal-title { font-size: 3rem; margin: 0 0 15px 0; font-weight: 700; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.modal-meta { color: #bbb; font-size: 1rem; margin-bottom: 25px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-meta > span { background: rgba(255,255,255,0.2); padding: 5px 12px; border-radius: 4px; font-size: 0.9rem; color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.modal-meta > span#m-incaa-box { background: none !important; border: none !important; padding: 0 !important; }
.tab-content { display: none; color: #ccc; line-height: 1.7; font-size: 1rem; margin-top: 15px; max-height: 200px; overflow-y: auto; }
.tab-content.active { display: block; }
.modal-close { position: absolute; top: 15px; right: 20px; background: rgba(0,0,0,0.6); border-radius: 50%; width: 45px; height: 45px; text-align: center; line-height: 45px; cursor: pointer; z-index: 40; font-size: 1.8rem; color: white; border: 1px solid rgba(255,255,255,0.1); }
.qr-container { display: none; position: absolute; top: 80px; right: 20px; background: white; padding: 10px; border-radius: 8px; z-index: 50; box-shadow: 0 5px 20px rgba(0,0,0,0.5); text-align: center; }
.qr-container.show { display: block; }
.qr-container img { display: block; width: 120px; height: 120px; }
.qr-text { color: #000; font-size: 0.8rem; font-weight: bold; margin-top: 5px; }
.btn-drive-folder { display: inline-block; background: #222; color: #ddd; padding: 10px 20px; border: 1px solid #444; border-radius: 4px; margin-top: 10px; transition: 0.3s; font-weight: 500; }
.btn-drive-folder:hover { border-color: #5b60e5; color: #fff; background: #333; }
.page-header { margin-top: 100px; padding: 0 4%; margin-bottom: 30px; }
.full-grid { display: flex; flex-wrap: wrap; gap: 15px; padding: 0 4% 50px 4%; }
.full-grid .video-card { width: calc(20% - 12px); min-width: 200px; margin-bottom: 20px; }
.player-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #000; z-index: 2000; }
#player { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; z-index: 2000; }
.back-btn { position: absolute; top: 30px; left: 30px; color: white; font-weight: bold; background: rgba(0,0,0,0.6); padding: 10px 20px; border-radius: 30px; z-index: 2010; transition: 0.3s; backdrop-filter: blur(5px); display: flex; align-items: center; gap: 10px; }
.back-btn:hover { background: #5b60e5; }
.top-right-controls { position: absolute; top: 60px; right: 30px; display: flex; gap: 15px; z-index: 2010; }
.btn-recomendados { color: white; font-weight: bold; background: rgba(0,0,0,0.6); padding: 10px 20px; border-radius: 30px; backdrop-filter: blur(5px); display: flex; align-items: center; gap: 10px; border: none; cursor: pointer; font-size: 1rem; transition: 0.3s; }
.btn-recomendados:hover { background: #5b60e5; }
.recommendations-overlay { position: absolute; top: 80px; right: 30px; width: 300px; background: rgba(20, 20, 20, 0.95); border: 1px solid #333; border-radius: 8px; padding: 15px; display: none; z-index: 2020; backdrop-filter: blur(10px); }
.recommendations-overlay.show { display: block; }
.rec-card { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; cursor: pointer; transition: 0.2s; padding: 5px; border-radius: 4px; }
.rec-card:hover { background: rgba(255,255,255,0.1); }
.rec-img { width: 80px; height: 45px; object-fit: cover; border-radius: 4px; }
.rec-info { font-size: 0.9rem; color: #ddd; line-height: 1.2; }
.site-footer { padding: 30px 4%; text-align: center; color: #777; font-size: 0.9rem; border-top: 1px solid #222; margin-top: 40px; background: #0f0f0f; }
.site-footer a { color: #5b60e5; font-weight: bold; transition: 0.3s; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-pwa-link { color: #555; font-size: 0.8rem; margin-top: 10px; display: inline-block; cursor: pointer; border: 1px solid #333; padding: 3px 10px; border-radius: 10px; }
.footer-pwa-link:hover { color: #aaa; border-color: #555; }
.pp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 5000; display: none; justify-content: center; align-items: center; opacity: 0; transition: 0.4s; backdrop-filter: blur(5px); }
.pp-content { background: #1f1f1f; width: 90%; max-width: 500px; border-radius: 12px; overflow: hidden; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,1); border: 1px solid #333; text-align: center; transform: translateY(20px); transition: 0.4s; max-height: 90vh; overflow-y: auto; }
.pp-close { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.5); border-radius: 50%; width: 30px; height: 30px; line-height: 30px; text-align: center; color: white; cursor: pointer; font-weight: bold; z-index: 10; transition: 0.2s; }
.pp-close:hover { background: #fff; color: #000; }
.pp-image { width: 100%; height: auto; display: block; }
.pp-body { padding: 30px 20px; color: #ddd; font-size: 1.1rem; line-height: 1.5; }
.pp-btn { display: inline-block; background-color: #5b60e5; color: white; font-weight: bold; text-decoration: none; padding: 12px 30px; border-radius: 6px; margin-top: 20px; transition: 0.3s; font-size: 1.1rem; box-shadow: 0 4px 15px rgba(91, 96, 229, 0.4); }
.countdown-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.85); z-index: 3000; display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.countdown-number { font-size: 5rem; font-weight: bold; color: #5b60e5; margin: 20px 0; }
.countdown-text { font-size: 1.5rem; color: #fff; }
.next-video-thumb { width: 250px; height: auto; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; margin-bottom: 20px; border: 2px solid #5b60e5; box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.btn-play-now { background: #5b60e5; border: none; color: white; padding: 10px 25px; border-radius: 30px; cursor: pointer; font-size: 1.1rem; font-weight: bold; transition: 0.3s; }
.btn-play-now:hover { background: #4146a3; transform: scale(1.05); }
.btn-cancel-countdown { background: transparent; border: 1px solid #777; color: #aaa; padding: 10px 25px; border-radius: 30px; cursor: pointer; font-size: 1rem; margin-left: 10px; transition: 0.3s; }
.btn-cancel-countdown:hover { border-color: white; color: white; }
.btn-share-icon { background: transparent; border: none; color: #ccc; cursor: pointer; font-size: 1.8rem; padding: 0 10px; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.btn-share-icon:hover { color: #fff; transform: scale(1.1); }
.hamburger-btn { display: none; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; z-index: 101; }
.mobile-menu-overlay { display: none; }

/* --- RESPONSIVE MOBILE FIX --- */
@media(max-width: 900px) {
    .filtros-header { display: none; }
    .hamburger-btn { display: block; }
    .mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.95); z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 20px; backdrop-filter: blur(10px); }
    .mobile-menu-overlay.open { display: flex; }
    .mobile-menu-overlay .search-bar, .mobile-menu-overlay .filtro-genero, .mobile-menu-overlay .btn-header-action { width: 80%; font-size: 1.2rem; height: 50px; }
    .hero-carousel { height: 60vh; }
    .hero-content { display: block; max-width: 100%; padding: 0 20px; text-align: center; }
    .hero-content h1 { display: block; font-size: 2rem; margin-bottom: 15px; }
    .hero-content p { display: none; } 
    .hero-content .btn-hero { display: inline-block; }
    .carousel-btn { font-size: 2rem; padding: 10px; } 
    .video-grid { padding-right: 20px; }
    .video-card, .card-see-more { flex: 0 0 45%; min-width: 45%; width: 45%; max-width: none; }
    .full-grid .video-card { width: calc(50% - 10px); min-width: 0; }
    .player-container { z-index: 9999; }
    .back-btn { top: 15px; left: 15px; padding: 8px 15px; font-size: 0.9rem; background: rgba(0,0,0,0.8); }
    .top-right-controls { top: 15px; right: 15px; gap: 10px; }
    .top-right-controls .btn-recomendados { padding: 8px 14px; font-size: 0.85rem; border-radius: 20px; }
    .recommendations-overlay { top: 60px; right: 15px; width: calc(100vw - 30px); max-width: 340px; }
    body.noscroll { overflow: auto; height: auto; }
    .admin-layout { grid-template-columns: 1fr; height: auto; overflow: visible; display: block; margin-top: 80px; }
    .scroll-lista-admin { max-height: 500px; }
    
    #contenedor-listas { margin-top: -40px; }

    /* CORRECCIÓN MODAL MOBILE */
    .modal-content { 
        width: 100%; height: 100%; border-radius: 0; margin: 0; max-width: none; 
        overflow-y: auto; display: flex; flex-direction: column;
    }
    .modal-header { 
        height: 35vh; 
        min-height: 200px;
        flex-shrink: 0; 
    }
    .modal-body { 
        margin-top: 0; 
        padding: 20px; 
        background: #181818; 
        flex-grow: 1; 
        position: relative; /* Clave para posicionar botones */
    }
    .modal-title { 
        font-size: 1.8rem; 
        line-height: 1.1; 
        margin-bottom: 10px;
        padding-right: 90px; /* Espacio para que no pise botones */
    }
    
    /* PESTAÑAS JUNTAS */
    .modal-tabs { 
        border-bottom: none; /* Limpio */
    }
    .tabs-left { 
        width: 100%; 
        justify-content: flex-start; /* PEGAR A LA IZQUIERDA */
        gap: 20px; /* Separación normal */
        border-bottom: 1px solid #333;
    }
    
    /* BOTONES ARRIBA A LA DERECHA (AL LADO DEL TITULO) */
    .modal-actions {
        position: absolute;
        top: 20px;
        right: 20px;
        flex-direction: row; /* Uno al lado del otro */
        gap: 8px;
    }
    .btn-play-tab {
        padding: 6px 12px; /* Más chicos */
        font-size: 0.8rem;
    }
    .btn-share-icon {
        font-size: 1.4rem;
    }
    
    .modal-close { top: 10px; right: 10px; background: rgba(0,0,0,0.8); width: 35px; height: 35px; line-height: 35px; font-size: 1.5rem; z-index: 100; }
}

/* ===========================================
   SOCIAL FEATURES - NOTIFICACIONES, USERS, PERFIL
   =========================================== */

/* --- DROPDOWN DE NOTIFICACIONES --- */
#notif-dropdown {
    animation: slideDown 0.2s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
#notif-dropdown div:hover {
    background: rgba(255,255,255,0.05);
    transition: background 0.15s;
}
#notif-badge {
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.15); }
}

/* --- TARJETAS DE USUARIO (buscador y users.php) --- */
.user-card {
    background: rgba(30,30,40,0.85);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.18s, box-shadow 0.2s;
}
.user-card:hover {
    border-color: rgba(138,43,226,0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138,43,226,0.2);
}
.user-card .user-avatar {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}
.user-card .user-name {
    flex: 1;
    font-weight: bold;
    font-size: 1.05rem;
    color: #e8e8e8;
}
.user-card .btn-follow {
    background: #5b60e5;
    border: none;
    color: white;
    padding: 7px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}
.user-card .btn-follow:hover {
    background: #4146c0;
    transform: scale(1.05);
}
.user-card .btn-follow.following {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
}
.user-card .btn-follow.following:hover {
    background: rgba(255,85,85,0.15);
    border-color: #ff5555;
    color: #ff7777;
}

/* --- GRID USERS.PHP --- */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* --- PERFIL DE USUARIO (perfil.php) --- */
.profile-header {
    background: linear-gradient(135deg, rgba(30,30,40,0.95), rgba(20,20,28,0.98));
    border: 1px solid rgba(138,43,226,0.25);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.profile-avatar {
    font-size: 5rem;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(138,43,226,0.4));
    transition: transform 0.2s;
}
.profile-avatar:hover {
    transform: scale(1.05);
}
.profile-username {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 8px;
    background: linear-gradient(135deg, #fff 30%, #8A2BE2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Selector de emoji en perfil propio */
.emoji-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
}
.emoji-btn {
    font-size: 1.8rem;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 8px;
    padding: 4px 6px;
    opacity: 0.55;
    transition: opacity 0.18s, transform 0.18s, border-color 0.18s;
}
.emoji-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}
.emoji-btn.active {
    opacity: 1;
    border-color: #8A2BE2;
    background: rgba(138,43,226,0.15);
    transform: scale(1.1);
}

/* Tarjetas de sección de perfil */
.profile-card {
    background: rgba(30,30,40,0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 22px;
    flex: 1;
    min-width: 280px;
}
.profile-card h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8A2BE2;
    border-bottom: 1px solid rgba(138,43,226,0.3);
    padding-bottom: 8px;
}
.following-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    color: #ddd;
    text-decoration: none;
    transition: background 0.15s;
    font-weight: bold;
}
.following-link:hover {
    background: rgba(138,43,226,0.15);
    color: #8A2BE2;
}
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    color: #ccc;
    font-size: 0.95rem;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.history-item:hover {
    background: rgba(255,255,255,0.06);
    color: white;
}
.history-item:last-child {
    border-bottom: none;
}
.history-icon {
    color: #5b60e5;
    font-size: 1rem;
    flex-shrink: 0;
}

/* --- BOTÓN RECOMENDAR (modal de video) --- */
#btn-recomendar {
    font-size: 1.4rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    opacity: 0.8;
}
#btn-recomendar:hover {
    opacity: 1;
    transform: scale(1.2) rotate(-10deg);
    filter: drop-shadow(0 0 6px rgba(91,96,229,0.7));
}

/* Responsive ajustes para páginas sociales */
@media (max-width: 600px) {
    .users-grid {
        grid-template-columns: 1fr;
    }
    .profile-username {
        font-size: 1.6rem;
    }
    .profile-card {
        min-width: 100%;
    }
}

/* --- ESTILOS MODERNOS DRAG & DROP --- */
.dropzone-box {
    border: 2px dashed #444;
    border-radius: 8px;
    padding: 18px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    user-select: none;
    margin-top: 4px;
}
.dropzone-box:hover {
    border-color: #666;
    background: rgba(255, 255, 255, 0.04);
}
.dropzone-box.dragover {
    border-color: #5b60e5 !important;
    background: rgba(91, 96, 229, 0.15) !important;
    box-shadow: 0 0 20px rgba(91, 96, 229, 0.4);
    transform: scale(1.01);
}
.dropzone-box.hero-theme.dragover {
    border-color: #ffcc00 !important;
    background: rgba(255, 204, 0, 0.15) !important;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
    transform: scale(1.01);
}
.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}
.dropzone-icon {
    font-size: 2rem;
    line-height: 1;
}
.dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.dropzone-title {
    font-size: 0.9rem;
    color: #eee;
    font-weight: 500;
}
.dropzone-title strong {
    color: #5b60e5;
}
.hero-theme .dropzone-title strong {
    color: #ffcc00;
}
.dropzone-sub {
    font-size: 0.75rem;
    color: #888;
}
.dropzone-status {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.dropzone-badge-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dropzone-btn-clear {
    background: transparent;
    border: 1px solid #555;
    color: #aaa;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
    cursor: pointer;
    transition: 0.2s;
    vertical-align: middle;
}
.dropzone-btn-clear:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}


/* ============================================================
   CALIFICACIÓN INCAA (BADGES & TOOLTIPS)
   ============================================================ */
.incaa-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    margin-left: 6px;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    line-height: 1.2;
    pointer-events: auto;
}

.incaa-badge:hover,
.incaa-badge:focus,
.incaa-badge.is-open {
    transform: scale(1.05);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.incaa-badge[data-incaa="G"] {
    border-color: #4caf50;
    color: #81c784;
    background: rgba(76, 175, 80, 0.15);
}
.incaa-badge[data-incaa="SP"] {
    border-color: #ffc107;
    color: #ffd54f;
    background: rgba(255, 193, 7, 0.15);
}
.incaa-badge[data-incaa="R-13"] {
    border-color: #ff9800;
    color: #ffb74d;
    background: rgba(255, 152, 0, 0.15);
}
.incaa-badge[data-incaa="R-17"] {
    border-color: #ff5722;
    color: #ff8a65;
    background: rgba(255, 87, 34, 0.15);
}
.incaa-badge[data-incaa="C"] {
    border-color: #e53935;
    color: #ff5252;
    background: rgba(229, 57, 53, 0.22);
}

.incaa-badge .incaa-tooltip {
    display: none;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #14141f !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
    padding: 8px 12px !important;
    border-radius: 6px !important;
    width: max-content;
    max-width: 250px;
    z-index: 99999;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    text-align: left;
    white-space: normal;
}

.incaa-badge .incaa-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #14141f transparent transparent transparent;
}

.incaa-badge.tooltip-down .incaa-tooltip {
    bottom: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
}
.incaa-badge.tooltip-down .incaa-tooltip::after {
    top: auto;
    bottom: 100%;
    border-color: transparent transparent #14141f transparent;
}

.incaa-badge:hover .incaa-tooltip,
.incaa-badge:focus .incaa-tooltip,
.incaa-badge.is-open .incaa-tooltip {
    display: block !important;
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.incaa-tt-title {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.25;
}

.incaa-tt-desc {
    display: block;
    font-size: 0.74rem;
    font-weight: normal;
    color: #ccc;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: normal;
}

.modal-meta span.incaa-badge {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
}
.modal-meta span.incaa-badge .incaa-tooltip span,
.modal-meta span.incaa-badge .incaa-tooltip strong {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.video-info-hover .incaa-badge {
    font-size: 0.68rem;
    padding: 1px 5px;
    margin-left: 4px;
    border-radius: 3px;
    display: inline-flex;
}
