/* ==========================================================================
   ARCHIVO69 - UNIFIED PREMIUM DESIGN SYSTEM
   Optimizado para Móviles, Accesibilidad y Alto Rendimiento (60fps)
   ========================================================================== */

:root {
    /* Paleta Premium */
    --pink-neon: #E60099;
    --pink-glow: rgba(230, 0, 153, 0.35);
    --gold-premium: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.3);
    
    /* Backgrounds */
    --bg-base: #030303;
    --bg-surface: rgba(15, 15, 15, 0.6);
    --bg-gradient-radial: radial-gradient(circle at 50% -20%, #1a0011 0%, #030303 85%);
    
    /* Variables de UI */
    --glass-blur: blur(24px);
    --glass-border: rgba(255, 255, 255, 0.05);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --radius-xl: 2.5rem;
}

/* =========================================
   GLOBAL RESET & ACCESIBILIDAD
   ========================================= */
* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    background-image: var(--bg-gradient-radial);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    scroll-behavior: smooth;
    min-height: 100vh;
}

/* Layout específico Login */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Scrollbar Custom */
.custom-scrollbar::-webkit-scrollbar, ::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, transparent, var(--pink-neon), transparent); border-radius: 10px; }

/* Focus States */
*:focus-visible { outline: 2px solid var(--pink-neon); outline-offset: 4px; border-radius: 4px; }

/* =========================================
   GLASSMORPHISM Y CONTENEDORES
   ========================================= */

/* Navegación Glassmorphism (Dashboard) */
.glass-nav {
    background: rgba(3, 3, 3, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

/* Login Glass */
.glass-premium {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 0, 170, 0.15);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 0, 170, 0.05);
    border-radius: var(--radius-xl);
}

/* Admin / General Panels */
.glass-panel {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.modal-active { display: flex !important; }

/* =========================================
   INPUTS Y BOTONES GLOBALES
   ========================================= */
.input-dark {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.input-dark:focus {
    border-color: var(--pink-neon) !important;
    background: #000 !important;
    box-shadow: 0 0 15px rgba(230, 0, 153, 0.2) !important;
    outline: none !important;
}

/* Buscador */
.search-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    transition: var(--transition-smooth);
}
.search-box:focus-within {
    border-color: var(--pink-neon);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 20px var(--pink-glow), inset 0 0 10px rgba(255, 255, 255, 0.01);
}

.btn-hot {
    background: linear-gradient(135deg, var(--pink-neon) 0%, #800055 100%);
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px -10px var(--pink-glow);
    color: white;
    border: none;
}
.btn-hot:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(230, 0, 153, 0.6);
    filter: brightness(1.1);
}
.btn-hot:active { transform: scale(0.98); }

/* Paginación */
.btn-page {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
}
.btn-page:not(.disabled):hover {
    background: var(--pink-neon);
    border-color: var(--pink-neon);
    box-shadow: 0 5px 20px var(--pink-glow);
    transform: translateY(-2px);
    color: white;
}
.btn-page.disabled {
    color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    background: transparent;
}

/* Textos Neon */
.neon-glow { color: var(--pink-neon); text-shadow: 0 0 15px var(--pink-glow), 0 0 30px rgba(230, 0, 153, 0.3); }
.text-glow { text-shadow: 0 0 15px var(--pink-glow); }
.shadow-neon { box-shadow: 0 0 15px var(--pink-glow); }

/* =========================================
   DASHBOARD & VÍDEO COMPONENTES
   ========================================= */
.v-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    will-change: transform, box-shadow;
}

.v-card:hover {
    border-color: rgba(230, 0, 153, 0.3);
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 15px 30px -15px var(--pink-glow);
}

.thumb-box { position: relative; padding-bottom: 56.25%; height: 0; background: #000; overflow: hidden; }
.thumb-box iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; pointer-events: none; transform: scale(1.05); transition: transform 0.8s ease; }
.v-card:hover .thumb-box iframe { transform: scale(1.1); }

.click-layer {
    position: absolute; inset: 0; z-index: 10; cursor: pointer;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 40%);
    opacity: 0.5; transition: var(--transition-smooth);
}
.v-card:hover .click-layer { opacity: 1; }
.v-card:hover .v-title { color: var(--pink-neon); text-shadow: 0 0 15px rgba(230, 0, 153, 0.2); }

/* Botón Popup en Thumbnail */
.btn-popup { transition: var(--transition-smooth); backdrop-filter: blur(5px); }
.btn-popup:hover { background: var(--gold-premium); color: #000; box-shadow: 0 0 20px var(--gold-glow); transform: scale(1.1); }

/* Vista Video Individual */
.player-box { position: relative; padding-bottom: 56.25%; height: 0; }
.player-box iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.rel-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.rel-card:hover { border-color: var(--pink-neon); transform: translateY(-5px); box-shadow: 0 10px 20px -5px var(--pink-glow); }

/* =========================================
   FULLSCREEN PLAYER COMPONENT
   ========================================= */
.fullscreen-body { background: #000; margin: 0; height: 100vh; overflow: hidden; }
.fullscreen-iframe { width: 100%; height: 100%; border: 0; box-shadow: inset 0 0 50px rgba(230, 0, 153, 0.1); }

.player-nav {
    position: fixed; top: 0; left: 0; right: 0; padding: 25px 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.95) 0%, transparent 100%);
    z-index: 50; display: flex; justify-content: space-between; align-items: flex-start;
}

.video-info { border-left: 3px solid var(--pink-neon); padding-left: 20px; }
.player-title { color: #fff; font-family: 'Inter', sans-serif; font-weight: 900; margin: 0; font-size: 1.2rem; letter-spacing: 1px; text-transform: uppercase; }
.player-subtitle { color: var(--pink-neon); font-size: 0.6rem; margin: 5px 0 0 0; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; }

.btn-close {
    background: var(--pink-neon); color: white; padding: 12px 30px; font-weight: 900; font-size: 0.65rem; letter-spacing: 3px; border-radius: 50px;
    box-shadow: 0 0 20px var(--pink-glow); transition: var(--transition-smooth); text-transform: uppercase; text-decoration: none;
}
.btn-close:hover { background: var(--gold-premium); color: #000; transform: scale(1.05); box-shadow: 0 0 30px var(--gold-glow); }

/* =========================================
   ANIMACIONES Y RETRASOS (STAGGER)
   ========================================= */
@keyframes slideIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.animate-slide { animation: slideIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeInPop { 0% { opacity: 0; transform: translateY(20px) scale(0.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
.animate-pop { opacity: 0; animation: fadeInPop 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes ping-slow { 0% { transform: scale(1); opacity: 1; } 75%, 100% { transform: scale(2.5); opacity: 0; } }
.animate-ping-slow { animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite; }

/* Tiempos fijos */
.stagg-1 { animation-delay: 0.1s; }
.stagg-2 { animation-delay: 0.2s; }
.stagg-3 { animation-delay: 0.3s; }

/* Grid dinámico */
.stagg-grid-1 { animation-delay: 0.05s; }
.stagg-grid-2 { animation-delay: 0.10s; }
.stagg-grid-3 { animation-delay: 0.15s; }
.stagg-grid-4 { animation-delay: 0.20s; }
.stagg-grid-5 { animation-delay: 0.25s; }
.stagg-grid-6 { animation-delay: 0.30s; }
.stagg-grid-7 { animation-delay: 0.35s; }
.stagg-grid-8 { animation-delay: 0.40s; }
.stagg-grid-9 { animation-delay: 0.45s; }
.stagg-grid-10 { animation-delay: 0.50s; }

/* =========================================
   OPTIMIZACIÓN MÓVIL (RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {
    /* Header Dashboard */
    .header-mobile-fix { gap: 1rem; }
    .search-box { order: 3; width: 100%; }
    .nav-actions { position: absolute; right: 1.5rem; top: 1.5rem; }

    /* Scroll Horizontal de Categorías (Magnético) */
    .mobile-scroll-snap {
        scroll-snap-type: x mandatory;
        scroll-padding-left: 1.5rem;
        padding-bottom: 0.5rem; 
        mask-image: linear-gradient(to right, black 85%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    }
    .cat-btn { scroll-snap-align: start; padding: 0.75rem 1.5rem; }

    h2 { font-size: 2.5rem !important; }

    /* Paginación Mobile */
    .pagination-wrapper { gap: 1rem; flex-wrap: wrap; }
    .page-info { order: -1; width: 100%; text-align: center; margin-bottom: 0.5rem; }
}