:root {
    /* COLORES */
    --primary: #B61942;   
    --secondary: #9575CE; 
    
    /* MODO OSCURO (DEFAULT) */
    --body-color: #000000;
    --sidebar-glass: rgba(149, 117, 206, 0.20); 
    --nav-glass: #B61942; 
    --player-glass: rgba(15, 15, 15, 0.95);
    --text-color: #ffffff;
    --text-sub: #cccccc;
    --glass-border: rgba(255, 255, 255, 0.15);
    
    --tran-03: all 0.3s ease;
}

/* MODO CLARO */
body.light {
    --body-color: #f2f2f2;
    --sidebar-glass: #ffffff;
    --nav-glass: rgba(255, 255, 255, 0.3); 
    --text-color: #333333; 
    --text-sub: #555555;
    --glass-border: rgba(0,0,0,0.1);
    --player-glass: #ffffff;
}

/* Ajustes textos light */
body.light .brand-title { color: #222 !important; }
body.light .sidebar .icon, body.light .sidebar .text, 
body.light .name, body.light .mode i { color: #333 !important; }
body.light .profession { color: #666 !important; }
body.light .nav-item { color: #555 !important; } 
/* El activo mantiene color blanco texto porque el fondo será sólido */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { background: var(--body-color); font-family: 'Helvetica Neue', Arial, sans-serif; color: var(--text-color); overflow: hidden; height: 100vh; width: 100vw; transition: var(--tran-03); }

/* --- 1. SWIPER --- */
.main-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.swiper-slide { position: relative; background: #000; overflow: hidden; }
.slide-img { width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0.55; transition: transform 12s ease-out; transform: scale(1); }
.swiper-slide-active .slide-img { transform: scale(1.15); }
.slide-content { position: absolute; top: 45%; transform: translateY(-50%); left: 120px; right: 50px; z-index: 5; pointer-events: none; }
.text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; }
.slide-title { font-size: 2rem; font-weight: 800; color: var(--secondary); text-transform: uppercase; margin-bottom: 20px; opacity: 0; text-shadow: 0 5px 15px rgba(0,0,0,0.8); line-height: 1.1; }
.slide-quote { font-size: 1.1rem; font-style: italic; color: #fff; opacity: 0; text-shadow: 0 2px 5px rgba(0,0,0,1); }
.text-left .slide-quote { border-left: 4px solid var(--primary); padding-left: 20px; }
.text-right .slide-quote { border-right: 4px solid var(--primary); padding-right: 20px; }
.text-center .slide-quote { border-bottom: 3px solid var(--primary); padding-bottom: 15px; display: inline-block; }

.swiper-slide-active .from-top { animation: slideDown 1s ease forwards 0.5s; }
.swiper-slide-active .from-bottom { animation: slideUp 1s ease forwards 0.5s; }
.swiper-slide-active .from-left { animation: slideRight 1s ease forwards 0.5s; }
.swiper-slide-active .from-right { animation: slideLeft 1s ease forwards 0.5s; }
.swiper-slide-active .delay-1 { animation-delay: 0.8s; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideLeft { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

/* --- CONTROLES SWIPER --- */
.swiper-pagination { bottom: 170px !important; z-index: 10; }
.swiper-pagination-bullet { background: #fff; opacity: 0.5; width: 10px; height: 10px; transition: all 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.swiper-pagination-bullet-active { opacity: 1; background: var(--primary); transform: scale(1.2); }
.swiper-button-next, .swiper-button-prev { color: rgba(255,255,255,0.7); width: 40px; height: 40px; transition: all 0.3s; }
.swiper-button-next:hover, .swiper-button-prev:hover { color: var(--primary); transform: scale(1.1); }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 20px; font-weight: bold; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.8)); }
.swiper-button-prev { left: 100px; }

/* --- 2. SIDEBAR --- */
.sidebar {
    position: fixed; top: 0; left: 0;
    /* AJUSTE: 150px (90px player + 60px menú) */
    height: calc(100vh - 150px); 
    width: 250px;
    background: var(--sidebar-glass);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 15px 10px; border-right: 1px solid var(--glass-border);
    z-index: 1000; transition: var(--tran-03);
    display: flex; flex-direction: column;
}
.sidebar.close { width: 88px; }
.sidebar .text { font-size: 14px; font-weight: 500; color: var(--text-color); transition: var(--tran-03); white-space: nowrap; opacity: 1; }
.sidebar.close .text { opacity: 0; display: none; }
.sidebar header { position: relative; margin-bottom: 20px; }
.sidebar .image-text { display: flex; align-items: center; }
.sidebar .image { min-width: 60px; display: flex; align-items: center; justify-content: center; }
.sidebar .image img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.sidebar header .text { display: flex; flex-direction: column; margin-left: 10px; }
.name { font-weight: 700; color: var(--text-color); font-size: 14px; }
.profession { font-size: 11px; color: var(--text-sub); }
.sidebar .toggle {
    position: absolute; top: 30px; right: -25px;
    height: 25px; width: 25px; background: var(--primary); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; cursor: pointer; z-index: 1001; transition: var(--tran-03);
}
.sidebar.close .toggle { transform: rotate(180deg); }
.sidebar .menu { margin-top: 10px; }
.sidebar li { height: 50px; list-style: none; display: flex; align-items: center; margin-top: 5px; }
.sidebar li a { list-style: none; height: 100%; width: 100%; display: flex; align-items: center; text-decoration: none; border-radius: 6px; transition: var(--tran-03); }
.sidebar li a:hover { background: var(--primary); }
.sidebar li a:hover .icon, .sidebar li a:hover .text { color: white !important; }
.sidebar .icon { min-width: 60px; font-size: 20px; display: flex; align-items: center; justify-content: center; color: var(--text-sub); }
.sidebar .bottom-content { margin-top: auto; border-top: 1px solid var(--glass-border); padding-top: 10px; }
.sidebar .mode { border-radius: 6px; background-color: rgba(255,255,255,0.05); position: relative; transition: var(--tran-03); display: flex; align-items: center; cursor: pointer; }
.sidebar .sun-moon { height: 50px; width: 60px; display: flex; align-items: center; justify-content: center; }
.sidebar .mode i { position: absolute; color: var(--text-color); font-size: 20px; }
.sidebar .mode i.sun { opacity: 0; }
body.light .sidebar .mode i.sun { opacity: 1; }
body.light .sidebar .mode i.moon { opacity: 0; }
.sidebar .toggle-switch { position: absolute; right: 0; height: 100%; min-width: 60px; display: flex; align-items: center; justify-content: center; }
.sidebar .switch { position: relative; height: 22px; width: 40px; border-radius: 25px; background: #555; }
.switch::before { content: ''; position: absolute; height: 15px; width: 15px; border-radius: 50%; top: 50%; left: 5px; transform: translateY(-50%); background: white; transition: var(--tran-03); }
body.light .switch { background: var(--primary); }
body.light .switch::before { left: 20px; }
.sidebar.close .toggle-switch, .sidebar.close .mode-text { display: none; }

/* --- 3. HEADER SUPERIOR --- */
.top-header {
    position: fixed; top: 0; left: 250px; width: calc(100% - 250px);
    padding: 15px 20px; z-index: 50; display: flex; align-items: center;
    background: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.3); transition: var(--tran-03);
}
.sidebar.close ~ .top-header { left: 88px; width: calc(100% - 88px); }
.header-branding { display: flex; align-items: center; gap: 15px; }
.brand-icon img { width: 40px; height: 40px; }
.brand-title { font-size: 1rem; font-weight: 800; color: white; text-transform: uppercase; margin-bottom: 2px; line-height: 1.1; }
.brand-subtitle { font-size: 0.75rem; color: rgba(255,255,255,0.8); font-weight: 600; text-transform: uppercase; }
.mobile-toggle { display: none; font-size: 1.5rem; color: white; background: none; border: none; cursor: pointer; margin-right: 15px; }

/* --- 4. REPRODUCTOR --- */
.player-container {
    position: fixed; 
    /* AJUSTE: Pegado exactamente encima del menú de 60px */
    bottom: 60px; 
    left: 0; width: 100% !important; height: 90px;
    background: var(--player-glass); backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border); z-index: 200; padding: 0 15px; 
    display: flex; flex-direction: column; justify-content: center; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}
.live-indicator { position: absolute; top: -14px; right: 20px; background: #333; color: #aaa; font-size: 10px; font-weight: bold; padding: 4px 12px; border-radius: 12px; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,0.1); }
.live-indicator.active { background: #ff0000; color: white; box-shadow: 0 0 15px rgba(255, 0, 0, 0.6); border-color: #ff0000; }
.dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.live-indicator.active .dot { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.player-grid { display: flex; align-items: center; gap: 15px; width: 100%; }
.btn-play-pulse { width: 50px; height: 50px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #800); border: 2px solid rgba(255,255,255,0.15); color: white; font-size: 18px; box-shadow: 0 4px 15px rgba(182, 25, 66, 0.4); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mini-cover { width: 50px; height: 50px; border-radius: 8px; background: #222; object-fit: cover; border: 1px solid var(--glass-border); flex-shrink: 0; }
.track-info { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.marquee-container { white-space: nowrap; overflow: hidden; }
.scroll .marquee-container h3 { animation: marquee 10s linear infinite; display: inline-block; padding-left: 100%; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
#display-title { font-size: 1rem; color: var(--text-color); font-weight: bold; margin-bottom: 4px; }
#display-artist { font-size: 0.8rem; color: var(--text-sub); }
.extra-controls { display: flex; align-items: center; gap: 12px; }
.volume-box { display: flex; align-items: center; gap: 6px; }
.volume-box i { font-size: 14px; color: #888; }
#vol-slider { width: 60px; height: 4px; accent-color: var(--secondary); cursor: pointer; }

/* --- 5. MENÚ FOOTER --- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100% !important; 
    height: 60px; /* Altura reducida */
    background: var(--nav-glass); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    display: flex; justify-content: space-around; align-items: center;
    z-index: 300; padding-bottom: 2px; 
    box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
}

.nav-item {
    background: transparent; border: none; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    color: rgba(255, 255, 255, 0.6); 
    font-size: 9px; cursor: pointer; 
    width: 20%; height: 100%;
    position: relative; 
    padding-top: 5px; /* Un poco de aire arriba */
}

/* --- EL CÍRCULO (FONDO) --- */
.nav-item::before {
    content: '';
    position: absolute;
    /* Ajuste clave: Empieza más abajo para no chocar con el player */
    top: 5px; 
    left: 50%;
    transform: translateX(-50%) scale(0); 
    
    /* TAMAÑO REDUCIDO: De 50px a 38px */
    width: 38px; height: 38px;
    
    background: var(--secondary);
    border-radius: 50%;
    
    /* Sombra más discreta */
    box-shadow: 0 5px 15px rgba(149, 117, 206, 0.4);
    border: 3px solid #1a1a1a; 
    
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

/* --- ICONO --- */
.nav-item i { 
    font-size: 16px; /* Icono base más pequeño */
    margin-bottom: 4px; 
    position: relative; 
    z-index: 2; 
    transition: transform 0.4s ease, color 0.3s ease;
}

/* --- TEXTO --- */
.nav-item span { 
    font-weight: 500; 
    letter-spacing: 0.5px; 
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* --- ESTADO ACTIVO --- */

/* 1. Aparece el círculo */
.nav-item.active::before {
    transform: translateX(-50%) scale(1); 
    opacity: 1;
    /* Al subir, lo hacemos menos agresivo. Top final visual */
    top: -10px; 
}

/* 2. El icono sube (MENOS QUE ANTES) */
.nav-item.active i {
    /* Antes subía -24px, ahora solo -12px. Suficiente para centrarse en el círculo */
    transform: translateY(-12px); 
    color: #fff; 
    font-size: 18px; /* Crece un poquito, pero no gigante */
}

/* 3. El texto se desvanece */
.nav-item.active span {
    opacity: 0;
    transform: translateY(5px);
}

/* --- 6. RESPONSIVE MÓVIL --- */
@media (max-width: 480px) {
    body::before {
        content: ""; position: fixed; inset: 0; z-index: 999;
        opacity: 0; pointer-events: none; background: rgba(0, 0, 0, 0.6);
        transition: 0.4s ease;
    }
    body:has(.sidebar:not(.close))::before { opacity: 1; pointer-events: auto; }
    .mobile-toggle { display: block; }
    .sidebar .toggle { display: none; }
    .top-header, .sidebar.close ~ .top-header { left: 0 !important; width: 100% !important; }
    
    .sidebar {
        position: fixed;
        top: 0; 
        left: 0; 
        height: calc(100vh - 150px); 
        width: 270px; 
        z-index: 2000;
        background: var(--sidebar-glass); transition: left 0.4s ease;
    }
    .sidebar.close { left: -270px; width: 270px; }
    .sidebar:not(.close) { left: 0; }
    
    .slide-content { left: 20px; right: 20px; }

    #display-title { font-size: 0.8rem !important; white-space: nowrap; }
    .volume-box { display: flex !important; width: 50px; }
    #vol-slider { width: 35px; }
    .brand-title { font-size: 0.75rem; }
    .swiper-button-next, .swiper-button-prev { display: none; }
}