:root {
    --bg-color: #050505;
    --card-bg: #111;
    --text: #fff;
    --accent: #ff0055;
    --accent-rgb: 255, 0, 85;
    --gray: #222;
    --border-radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    background-color: var(--bg-color); 
    color: var(--text); 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding-top: 0; 
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }

/* --- ANIMACIONES --- */
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* --- CARRUSEL (Tamaño Reducido) --- */
.carousel-container {
    position: relative; width: 100%; height: 180px; 
    margin-top: 10px; margin-bottom: 20px;
    border-radius: 12px; overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
@media (min-width: 768px) { .carousel-container { height: 380px; } }

.carousel-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 0.5s ease-in-out; pointer-events: none;
}
.carousel-slide.active { opacity: 1; z-index: 1; pointer-events: auto; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }

.carousel-caption { 
    position: absolute; bottom: 15px; left: 15px; z-index: 2; width: 90%; 
}
/* AJUSTE: Título más pequeño (1rem en vez de 1.2rem) */
.carousel-caption h3 { 
    margin: 0 0 8px; color: white; font-size: 1rem; text-transform: uppercase; 
    text-shadow: 2px 2px 4px #000; line-height: 1.2;
}
.btn-play { 
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent); color: white; padding: 6px 16px; 
    border-radius: 50px; font-weight: bold; font-size: 0.8rem; 
    box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.4);
}

.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.6); color: white; width: 30px; height: 30px; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; border: 1px solid rgba(255,255,255,0.2); transition: 0.3s;
}
.carousel-arrow:hover { background: var(--accent); border-color: var(--accent); }
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

/* --- FILTROS RÁPIDOS --- */
.quick-filters { 
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 5px; margin-bottom: 15px; 
    scrollbar-width: none;
}
.quick-filters::-webkit-scrollbar { display: none; }
.filter-chip { 
    padding: 6px 14px; background: #1a1a1a; border: 1px solid #333; border-radius: 50px; 
    color: #ccc; font-size: 0.85em; white-space: nowrap; transition: 0.3s; 
    display: flex; align-items: center; gap: 5px;
}
.filter-chip:hover, .filter-chip.active { 
    background: var(--accent); color: white; border-color: var(--accent); 
}
/* --- BANNER Y SOLICITUDES --- */
.telegram-banner {
    background: linear-gradient(90deg, #0088cc 0%, #005f8f 100%);
    border-radius: 12px; padding: 15px; margin: 30px 0; color: white;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.btn-tg { 
    background: white; color: #0088cc; padding: 8px 16px; border-radius: 50px; 
    font-weight: bold; font-size: 0.85em; text-align: center; white-space: nowrap;
}

.request-video-section { 
    margin: 30px 0; background: linear-gradient(135deg, #1a1a1a 0%, #2a0a1a 100%); 
    border: 1px solid var(--accent); border-radius: 12px; padding: 20px 15px; 
    text-align: center;
}
.btn-action { 
    background: var(--accent); color: white; border: none; padding: 10px 20px; 
    border-radius: 50px; font-weight: bold; cursor: pointer; font-size: 0.9em;
}
.form-input { 
    width: 100%; padding: 10px; background: #0a0a0a; border: 1px solid #333; 
    border-radius: 6px; color: white; margin-bottom: 10px; font-size: 0.9em;
}
#requestFormContainer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; }
#requestFormContainer.open { max-height: 800px; transition: max-height 0.5s ease-in; }

/* --- REPRODUCTOR (Video Individual) --- */
.video-wrapper {
    position: relative; width: 100%; padding-bottom: 56.25%;
    background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 15px;
    border: 1px solid #333;
}
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.btn-server { 
    background: #222; color: #ddd; border: 1px solid #333; padding: 8px 15px; 
    border-radius: 50px; cursor: pointer; font-weight: bold; font-size: 0.85em;
    display: flex; align-items: center; gap: 6px; margin: 4px;
}
.btn-server:hover, .btn-server.active { background: var(--accent); border-color: var(--accent); color: white; }

/* AJUSTE: Título principal del video más pequeño */
.video-title { font-size: 1.1rem; margin-bottom: 8px; color: white; line-height: 1.3; font-weight: 600; }
.video-stats { color: #888; font-size: 0.8em; margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }

/* --- CATEGORÍAS MODERNAS --- */
.cat-modern-grid { 
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 30px; 
}
.cat-card-modern { 
    position: relative; display: block; border-radius: 8px; overflow: hidden; 
    aspect-ratio: 16/9; box-shadow: 0 2px 5px rgba(0,0,0,0.3); border: 1px solid #222; 
}
.cat-card-modern img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }
.cat-overlay { 
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 80%); 
    display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; 
}
.cat-overlay span { color: white; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; }

/* --- GRID DE VIDEOS --- */
/* AJUSTE: Encabezados de sección (Destacado, Recientes) reducidos */
.section-header {
    display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; 
}
.section-header h2 { font-size: 1.1rem; text-transform: uppercase; color: #eee; margin:0; }

.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.video-item { 
    background: var(--card-bg); border-radius: 6px; overflow: hidden; 
    position: relative; border: 1px solid #222; 
}
.image-container { position: relative; aspect-ratio: 16/9; background: #000; }
.image-container img { width: 100%; height: 100%; object-fit: cover; }

.badge-new {
    position: absolute; top: 6px; left: 6px; background: #00c853; color: white; 
    font-size: 0.6rem; font-weight: bold; padding: 2px 5px; border-radius: 3px; z-index: 2;
}
.duration-badge { 
    position: absolute; bottom: 4px; right: 4px; 
    background: rgba(0,0,0,0.85); color: white; padding: 1px 4px; 
    font-size: 0.65em; border-radius: 3px; font-weight: 600;
}

.video-data { padding: 8px; }
/* AJUSTE: Título de tarjeta más pequeño */
.video-data h3 { 
    font-size: 0.8rem; margin-bottom: 4px; color: #eee; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
    overflow: hidden; line-height: 1.25;
}
.video-meta { font-size: 0.7rem; color: #888; }

/* --- BOTÓN FLOTANTE --- */
#scrollTopBtn {
    position: fixed; bottom: 20px; right: 20px; background: var(--accent); color: white;
    width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); font-size: 1.1rem; transform: translateY(20px);
}
#scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- RESPONSIVE --- */
@media (min-width: 600px) {
    .video-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .cat-modern-grid { grid-template-columns: repeat(3, 1fr); }
    .section-header h2 { font-size: 1.3rem; } /* Más grande solo en PC */
}
@media (min-width: 900px) {
    .video-grid { grid-template-columns: repeat(4, 1fr); }
    .cat-modern-grid { grid-template-columns: repeat(4, 1fr); }
}