/* ==========================================
   CSS Variables - Sistema de Diseño
   ========================================== */
:root {
    /* Colores principales */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;

    /* Colores de fondo */
    --bg-dark: #0f0f1a;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.08);

    /* Colores de texto */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Colores de acento */
    --accent-gold: #fbbf24;
    --accent-rose: #f43f5e;
    --accent-emerald: #10b981;
    --accent-cyan: #06b6d4;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);

    /* Bordes */
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-full: 50px;

    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: 'Poppins', sans-serif;
    height: 100%;
    margin: 0;
    background: var(--gradient-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* Fondo animado con partículas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(244, 63, 94, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================
   Header con Glassmorphism - Overlay Mode
   ========================================== */
#header {
    position: fixed;
    top: 0;
    left: -280px;
    z-index: 100;
    width: 280px;
    height: 100vh;
    padding: 24px 20px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-right: none;
    transition: left var(--transition-normal), box-shadow var(--transition-normal);
    overflow-y: auto;
    pointer-events: none;
}

#header * {
    pointer-events: auto;
}

#header::before {
    display: none;
}

/* Mobile: cuando está activo, mostrar overlay */
.mobile-nav-active #header {
    left: 0;
    background: transparent;
    box-shadow: none;
    border-right: none;
    pointer-events: none;
    width: 100%;
    max-width: none;
}

/* Desktop: mostrar menú flotante visible */
@media (min-width: 992px) {
    #header {
        left: 0;
        width: auto;
        height: auto;
        top: 20px;
        padding: 20px 20px 0px;
        pointer-events: none;
    }

    #header * {
        pointer-events: auto;
    }
}

/* ==========================================
   Navegación
   ========================================== */
.nav-menu * {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu>ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 13px;
    /* Texto reducido para mayor delicadeza */
    font-weight: 500;
    border-radius: 50px;
    background: rgba(16, 16, 24, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Ancho fijo para bloque uniforme */
    width: 230px;
    max-width: 85vw;
}

.nav-menu a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) translateX(5px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.25);
}

.nav-menu a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--primary-light);
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.3));
}

.nav-menu a:hover i {
    transform: scale(1.1) rotate(5deg);
    color: #fff;
}

.nav-menu a span {
    flex: 1;
    letter-spacing: 0.3px;
}

/* Indicador activo estilo 'Pill' */
.nav-menu a::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.3s ease;
    opacity: 0;
}

/* Iconos específicos */
.nav-menu a .fa-google-play {
    color: #10b981;
}

.nav-menu a .fa-bullhorn {
    color: #fbbf24;
}

.nav-menu a .fa-facebook-square,
.nav-menu a .fa-facebook {
    color: #3b82f6;
}

.nav-menu a .fa-instagram-square,
.nav-menu a .fa-instagram {
    color: #f43f5e;
}

.nav-menu a .fa-whatsapp-square,
.nav-menu a .fa-whatsapp {
    color: #22c55e;
}

.nav-menu a .fa-tiktok {
    color: #ffffff;
}

/* ==========================================
   Botón de Toggle Mobile
   ========================================== */
.mobile-nav-toggle {
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 101;
    width: 44px;
    /* Un poco más pequeño pero área clickeable */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    /* Redondo por si se agrega efecto hover */
    background: transparent;
    /* Sin fondo */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: none;
    /* Sin sombra */
}

.mobile-nav-toggle:hover {
    background: transparent;
    transform: scale(1.1);
    /* Efecto sutil al pasar */
    opacity: 0.8;
}

.mobile-nav-toggle i {
    font-size: 22px;
    color: var(--text-primary);
    transition: transform var(--transition-normal);
}

.mobile-nav-active .mobile-nav-toggle {
    background: var(--primary);
}

.mobile-nav-active .mobile-nav-toggle:hover {
    background: var(--primary-dark);
}

/* ==========================================
   Player Container
   ========================================== */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

#player {
    margin: 0 auto;
    width: 100%;
    height: 100%;
    flex: 1;
}

/* ==========================================
   Reloj con Glassmorphism
   ========================================== */
.clock-container {
    position: fixed;
    right: 20px;
    bottom: 85px;
    /* Ajustado mas abajo para alinear con elementos del player */
    z-index: 50;
}

.background_hora {
    width: auto;
    /* Ancho automático para ser compacto */
    min-width: 100px;
    padding: 8px 16px;
    /* Padding reducido */
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: var(--border-glass);
    border-radius: var(--border-radius-full);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-align: center;
}

#relogio {
    font-size: 14px;
    /* Fuente un poco más compacta */
    font-weight: 600;
    letter-spacing: 1px;
}

.background_hora:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* ==========================================
   Footer
   ========================================== */
/* ==========================================
    Footer Overlay
    ========================================== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    /* Permitir clicar el player debajo */
}

.footer-content {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    color: rgba(255, 255, 255, 0.5);
    /* Color más sutil */
    text-align: center;
    padding: 5px 10px 8px;
    /* Padding reducido */
    font-size: 11px;
    /* Fuente reducida */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Ocultar footer y compactar menú en pantallas bajitas */
@media (max-height: 480px) {
    footer {
        display: none !important;
    }

    #header {
        padding-top: 60px;
        /* Dejar espacio para botón toggle */
        padding-bottom: 10px;
    }

    .nav-menu>ul {
        gap: 4px;
        /* Botones más juntos */
    }

    .nav-menu a {
        padding: 8px 16px;
        /* Botones más delgados */
        font-size: 12px;
        margin-bottom: 2px;
        min-height: 0;
    }
}

.footer-content a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    pointer-events: auto;
    /* Permitir clic en el enlace */
    transition: color var(--transition-fast);
}

.footer-content a:hover {
    color: var(--accent-gold);
}

/* ==========================================
   Animaciones
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (min-width: 992px) {
    .mobile-nav-toggle {
        display: none;
    }

    .main-container {
        margin-left: 0;
        width: 100%;
    }

    /* Ajuste Desktop */
    .clock-container {
        right: 30px;
        bottom: 85px;
    }
}

@media (max-width: 991px) {
    #header {
        width: 280px;
        left: -300px;
    }

    .mobile-nav-active #header {
        left: 0;
    }
}

@media (max-width: 768px) {
    #player {
        width: 100%;
        height: 100%;
    }

    .clock-container {
        display: none;
    }

    .mobile-nav-toggle {
        right: 15px;
        top: 15px;
        width: 45px;
        height: 45px;
    }
}

/* ==========================================
   Overlay para navegación móvil
   ========================================== */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 99;
}

.mobile-nav-active .nav-overlay {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   Scrollbar personalizado
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}