* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: #000;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden; /* Evita el scroll del body */
}

/* Botón de regreso */
.btn-volver {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Etiqueta de Publicidad con efecto Neón */
.neon-ad {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 6px 12px;
    border: 2px solid #ff2b54;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 8px #ff2b54, inset 0 0 8px #ff2b54;
    text-shadow: 0 0 5px #ff2b54;
    z-index: 100;
    pointer-events: none;
    animation: neonPulse 1.5s infinite alternate;
}

@keyframes neonPulse {
    0% { box-shadow: 0 0 5px #ff2b54, inset 0 0 5px #ff2b54; text-shadow: 0 0 5px #ff2b54; }
    100% { box-shadow: 0 0 15px #ff2b54, inset 0 0 10px #ff2b54; text-shadow: 0 0 10px #ff2b54; }
}

/* Contenedor principal con Scroll Snap */
.feed-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Ocultar barra de scroll */
.feed-container::-webkit-scrollbar {
    display: none;
}

/* Cada contenedor ocupa toda la pantalla */
.video-wrapper {
    position: relative;
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #111;
    overflow: hidden;
}

/* El video interno que contiene los controles */
.video-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

/* Video Base (Mobile) */
.main-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Fondo Difuminado (Oculto en móvil) */
.bg-video {
    display: none;
}

/* -------------------------------------
    AJUSTES DE ESCRITORIO (PC) 
------------------------------------- */
@media (min-width: 768px) {
    /* Mostrar el video fondo, escalado y difuminado */
    .bg-video {
        display: block;
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        object-fit: cover;
        filter: blur(25px) brightness(0.4);
        transform: scale(1.1); /* Evita márgenes oscuros por el blur */
        z-index: 0;
    }

    /* Contenedor adaptado a formato Vertical simulando móvil */
    .video-content {
        width: auto;
        aspect-ratio: 9 / 16;
        max-width: 100%;
        box-shadow: 0 0 30px rgba(0,0,0,0.8);
        z-index: 1;
    }
    
    .main-video {
        object-fit: cover;
    }
}

/* Interfaz sobrepuesta (UI) */
.video-ui {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Para que los clics pasen al video (pausar/reproducir) */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 40%);
}

/* PERFIL Y NOMBRE COMO ENLACE */
.ui-bottom {
    pointer-events: auto;
    width: 75%;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start; /* Alineación superior para texto largo */
    gap: 12px; /* Espacio entre la foto y el nombre */
    text-decoration: none;
    color: white;
    transition: transform 0.2s;
}

.ui-bottom:active {
    transform: scale(0.98);
}

/* Estilo para la foto de perfil circular SIN animación ni colores dinámicos */
.profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.ui-text-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.ui-text-info h2 {
    font-size: 1.1rem;
    margin-bottom: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    word-wrap: break-word;
}

.vid-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita a 2 lineas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Botones laterales sin recuadros, fondos ni bordes */
.ui-right {
    position: absolute;
    right: 15px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
}

.action-btn {
    position: relative;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 5px;
    width: 55px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s;
    outline: none;
}

.action-btn i {
    filter: drop-shadow(1px 2px 4px rgba(0,0,0,0.8));
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn span {
    font-size: 11px;
    margin-top: 5px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,1);
    text-align: center;
}

/* Controles de Volumen (Slider) */
.volume-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    pointer-events: auto;
}

.volume-slider {
    width: 55px;
    cursor: pointer;
    accent-color: #ff2b54;
    display: none; /* Oculto en móviles por defecto */
    height: 4px;
    border-radius: 2px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    margin-top: 5px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
    .volume-slider {
        display: block;
    }
}

.heart-active {
    color: #ff2b54 !important;
    filter: drop-shadow(0 0 8px rgba(255, 43, 84, 0.8)) !important; 
}

/* Animación de corazones saliendo (Doble Tap y Botón) */
.floating-heart {
    position: absolute;
    color: #ff2b54;
    font-size: 30px;
    pointer-events: none;
    animation: floatUp 1.2s ease-out forwards;
    z-index: 10;
    filter: drop-shadow(0 0 8px rgba(255, 43, 84, 0.8));
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-80px) scale(1.5) rotate(25deg); opacity: 0; }
}

/* Botón central para play/pause manual */
.play-icon {
    position: absolute;
    font-size: 60px;
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
}
.is-paused .play-icon {
    opacity: 1;
}

/* Animación de carga (Spinner) */
.video-loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
    display: none; /* Oculto por defecto */
    pointer-events: none;
}
.is-loading .video-loader {
    display: block; /* Se muestra cuando el contenedor tiene la clase is-loading */
}
.is-loading .play-icon {
    display: none !important; /* Oculta el play si está cargando */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- ESTILOS DEL MODAL DE MENÚ --- */
.video-nav-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.video-nav-modal.show {
    opacity: 1;
    pointer-events: auto;
}
.video-nav-content {
    background: rgba(40, 40, 40, 0.85);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 220px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.video-nav-modal.show .video-nav-content {
    transform: translateY(0);
}
.video-nav-item {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
    background: rgba(255,255,255,0.05);
}
.video-nav-item:hover, .video-nav-item:active {
    background: rgba(255,255,255,0.2);
    transform: scale(1.02);
}
.video-nav-item i { width: 25px; text-align: center; font-size: 1.2rem; }