/* --- VARIABLES Y BASES --- */
:root { 
    --bg-base: #020205; 
    --accent-red: #ff1744; 
    --blob-1-color: #222222; 
    --blob-2-color: #000000;
}

body, html { 
    margin: 0; padding: 0; 
    min-height: 100dvh; 
    width: 100vw; 
    background: var(--bg-base); font-family: 'Montserrat', sans-serif; 
    background-color: var(--bg-base, #020205);
    transition: background-color 1.5s ease;
    overflow-x: hidden; 
    color: white; -webkit-font-smoothing: antialiased; 
}

/* OCULTAR BARRAS DE SCROLL */
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

/* --- STAGGER ITEMS --- */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

/* ==========================================
   NÚCLEO: LIQUID GLASS (Unificado OS)
   ========================================== */
.liquid-glass {
    position: relative;
    background: rgba(20, 20, 25, 0.4);
    backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: none !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0,0,0,0.5);
    isolation: isolate; 
}

.liquid-glass::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 30%, rgba(255,255,255,0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); 
    -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
    transform: translate3d(var(--gyro-x, 0px), var(--gyro-y, 0px), 0);
    will-change: transform; z-index: 0; 
}

/* --- GLASS PILL & NEW NAV --- */
.bottom-nav-container { 
    position: fixed; bottom: 20px; width: 100%; display: flex; 
    justify-content: center; z-index: 2000; pointer-events: none; 
}

.glass-pill.new-pill {
    pointer-events: auto; display: flex; align-items: center; justify-content: space-around;
    padding: 8px 15px; border-radius: 100px; 
    width: 88%; max-width: 380px; 
    overflow: visible !important; 
}

@media (max-width: 768px) {
    .glass-pill.new-pill { overflow: visible !important; }
    .bottom-nav-container { overflow: visible !important; }
    #nav-glow-art {
        filter: blur(18px) saturate(2.5); transform: scale(1.6); opacity: 0.8;
        will-change: transform, filter, opacity; 
    }
    .nav-glass-ring { z-index: 5; }
}

/* --- FONDO DINÁMICO --- */
.bg-wrapper { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; will-change: transform, opacity; transition: background 4s ease-in-out; left: 50%; top: auto; bottom: -30dvh; transform: translateX(-50%); }
.blob-1 { width: 140vw; height: 70dvh; background: var(--blob-1-color) !important; filter: blur(140px); z-index: -1; opacity: 0.3; }
.blob-2 { width: 200vw; height: 90dvh; background: var(--blob-2-color) !important; filter: blur(180px); z-index: -2; opacity: 0.15; }

/* --- MAIN CONTENT --- */
#main-content { 
    width: 100%; 
    min-height: 100dvh; 
    display: flex; flex-direction: column; align-items: center; 
    justify-content: flex-start; padding-top: 15px;
    padding-bottom: 120px; 
    opacity: 0; transition: opacity 1s ease, filter 0.6s ease; 
    will-change: filter, opacity; z-index: 10; 
}
.is-paused { filter: blur(20px) brightness(0.6); cursor: pointer; }
.nav-icon { color: white; opacity: 0.3; font-size: 1.1rem; transition: 0.4s; text-decoration: none; padding: 10px; }
.nav-icon.active, .nav-icon:hover { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.3); }

/* Capas del Cover Central en el Nav */
.nav-center-circle { position: relative; width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 5px; overflow: visible !important; }
#nav-glow-art { position: absolute; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; filter: blur(12px) saturate(2); opacity: 0.9; z-index: 1; transform: scale(1.35); }
.nav-glass-ring { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.02); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 2; }
#nav-mini-art { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; z-index: 3; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }

/* ANIMACIÓN: Giro del vinilo en el Menú */
.nav-center-circle.is-playing #nav-mini-art {
    animation: spin-vinyl 5s linear infinite;
    transform-origin: center center;
}
@keyframes spin-vinyl {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- UI --- */
.logo-header { margin-bottom: 5px; } 
.logo-img { height: 38px; opacity: 0.9; }

/* --- COVER CON AURA --- */
.cover-container { position: relative; width: 280px; height: 280px; margin: 0 auto 20px; transform: translateZ(0); }
.main-art { position: relative; z-index: 5; width: 100%; height: 100%; object-fit: cover; border-radius: 35px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); }
.blurred-art { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; z-index: 1; filter: blur(60px) saturate(1.8); opacity: 0.85; transform: translate(-50%, -50%) scale(1.35); will-change: transform, filter; }
.skeleton { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.05); border-radius: 40px; z-index: 5; display: none; }
.is-loading .skeleton { display: block; }

.feedback-row { display: flex; justify-content: center; gap: 40px; margin-bottom: 25px; }
.btn-feed { background: none; border: none; color: white; opacity: 0.2; font-size: 1.4rem; transition: 0.4s; cursor: pointer;}
.btn-feed.active-like { color: #4ade80; opacity: 1; text-shadow: 0 0 5px rgba(0, 230, 118, 1), 0 0 15px rgba(0, 230, 118, 0.6), 0 0 30px rgba(0, 230, 118, 0.3); }
.btn-feed.active-dislike { color: #f87171; opacity: 1; }

#hype-meter { display: none; opacity: 0; font-size: 0.55rem; font-weight: 700; color: rgba(255,255,255,0.8); padding: 5px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 15px; transition: opacity 0.4s ease; }

/* --- PLAY WRAPPER Y VOLUMEN --- */
.play-wrapper { position: relative; margin-top: 1%; margin-bottom: 90px; }
.play-btn { background: white; border: none; width: 58px; height: 58px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 15px 35px rgba(0,0,0,0.4); z-index: 20; position: relative; cursor: pointer; }
.play-btn svg { fill: #000; width: 26px; }

.vol-container { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(15px); opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); padding: 15px 8px; border-radius: 25px; z-index: 10; height: 100px; display: flex; justify-content: center; align-items: center; }
@media (hover: hover) and (pointer: fine) { .play-wrapper:hover .vol-container { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-10px); } }
.vol-slider { width: 80px; height: 4px; background: rgba(255,255,255,0.2); border-radius: 5px; outline: none; appearance: none; transform: rotate(-90deg); }
.vol-slider::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }

#trackTitle { font-weight: 800; font-size: 0.8rem; margin: 0 0 5px; text-transform: uppercase; letter-spacing: 0; }
#trackArtist { font-weight: 400; font-size: 0.9rem; opacity: 0.6; letter-spacing: 2px; text-transform: uppercase; margin: 0; }

/* --- POPUP MODALS --- */
.glass-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 3000; display: flex; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.glass-modal.show { opacity: 1; pointer-events: auto; }
.modal-content { border-radius: 25px; padding: 30px 20px; width: 80%; max-width: 320px; text-align: center; position: relative; transform: translateY(20px) scale(0.95); transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.glass-modal.show .modal-content { transform: translateY(0) scale(1); }
.modal-content h3 { font-size: 0.65rem; letter-spacing: 3px; opacity: 0.5; margin: 0 0 20px 0; font-weight: 700; text-transform: uppercase; }
.close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; color: white; font-size: 1.2rem; opacity: 0.4; cursor: pointer; transition: 0.3s; z-index: 10; }
.close-btn:hover { opacity: 1; }
.history-item { font-size: 0.75rem; font-weight: 400; padding: 12px 5px; border-bottom: 1px solid rgba(255,255,255,0.05); text-transform: uppercase; letter-spacing: 1px;}
.history-item:last-child { border-bottom: none; }
.history-item strong { font-weight: 800; display: block; margin-bottom: 3px; color: var(--accent-red); font-size: 0.65rem;}

/* --- RESPONSIVE / MODOS --- */
@media (max-height: 800px) { .logo-img { height: 28px; } .cover-container { width: 220px; height: 220px; } .play-wrapper { margin-bottom: 90px; } }

@media screen and (min-width: 1024px) {
    .cover-container { width: 320px; height: 320px; }
    .blurred-art { transform: translate(-50%, -50%) scale(1.8); filter: blur(90px) saturate(2); }
}

@media screen and (min-width: 1500px) and (pointer: coarse), screen and (min-width: 1500px) and (pointer: none) { .glass-pill.new-pill { max-width: 300px; padding: 6px 12px; transform: scale(0.8); transform-origin: bottom center; bottom: 40px; } .nav-icon { font-size: 0.9rem; } .nav-center-circle { width: 42px; height: 42px; } #nav-mini-art { width: 30px; height: 30px; } }
@media screen and (min-width: 1500px) and (pointer: fine) { .glass-pill.new-pill { max-width: 450px; transform: scale(1); bottom: 30px; } }

/* ==========================================
   MODO LUZ (Integrado con Liquid Glass)
   ========================================== */
.light-mode { --bg-base: #f2f2f7; color: #1c1c1e; }
.light-mode #trackTitle, .light-mode #trackArtist, .light-mode .live-text { color: #1c1c1e; }
.light-mode .nav-icon, .light-mode .btn-feed { color: #1c1c1e; opacity: 0.5; }
.light-mode .nav-icon.active, .light-mode .nav-icon:hover { opacity: 1; text-shadow: 0 0 10px rgba(0,0,0,0.1); }
.light-mode .play-btn { background: #1c1c1e; box-shadow: 0 15px 35px rgba(0,0,0,0.2); }
.light-mode .play-btn svg { fill: #f2f2f7; }
.light-mode .nav-glass-ring { border-color: rgba(0,0,0,0.1); background: rgba(0,0,0,0.02); }
.light-mode .history-item { border-bottom: 1px solid rgba(0,0,0,0.05); }
.light-mode .logo-img { background-color: #0a0a0a; border-radius: 50%; width: 38px; height: 38px; object-fit: scale-down; padding: 5px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
body:not(.light-mode) .logo-img { background-color: transparent; padding: 0; box-shadow: none; }
.light-mode .modal-content, .light-mode .history-sheet, .light-mode .bottom-sheet-content { color: #ffffff !important; }
.light-mode .btn-feed.active-like { color: #4ade80; opacity: 1; transition: all 0.3s ease; text-shadow: 0 0 5px rgba(0, 230, 118, 1), 0 0 15px rgba(0, 230, 118, 0.6), 0 0 30px rgba(0, 230, 118, 0.3); }

/* Inyección de Color para Liquid Glass en Light Mode */
.light-mode .liquid-glass {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), inset 0 0.5px 5px rgba(255, 255, 255, 0.5);
}
.light-mode .liquid-glass::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.05) 100%);
}

/* --- LOADER AGENCIA --- */
.loader-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background-color: #000002; display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.5s ease; }
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.loader-gif { max-width: 150px; max-height: 150px; border-radius: 50%; }

.loader-text {
    font-weight: 100;
    letter-spacing: 10px;
    text-indent: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    animation: flash 0.6s infinite;
    color: white;
    opacity: 0.8; 
}
.loader-brand {     
    font-weight: 700;
    font-size: 0.6rem;
    letter-spacing: 4px;
    text-indent: 4px;
    text-transform: uppercase;
    color: white;
    opacity: 0.5; 
}
@keyframes flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* --- LIVE INDICATOR ESTILO TV (PORTADA) --- */
.tv-live-glass { 
    display: inline-flex; align-items: center; gap: 8px; 
    padding: 6px 14px; border-radius: 30px; 
    color: #fff; font-family: 'Space Mono', monospace; font-size: 0.65rem; font-weight: 700; 
    letter-spacing: 3px; margin-top: 2vh; margin-bottom: 15px;
}
.tv-live-glass .live-dot { width: 6px; height: 6px; background: var(--accent-red); border-radius: 50%; box-shadow: 0 0 10px var(--accent-red); animation: pulse-dot 2s infinite; }

.tv-visualizer { display: flex; align-items: flex-end; gap: 2px; height: 12px; margin-left: 5px; opacity: 0; transition: opacity 0.3s; }
.tv-visualizer.active { opacity: 1; }
.tv-visualizer .bar { width: 2px; background: #fff; border-radius: 1px; animation: eq-play 0.5s infinite alternate ease-in-out; }
.tv-visualizer .bar:nth-child(1) { animation-duration: 0.4s; height: 40%; }
.tv-visualizer .bar:nth-child(2) { animation-duration: 0.6s; height: 80%; }
.tv-visualizer .bar:nth-child(3) { animation-duration: 0.5s; height: 60%; }
.tv-visualizer .bar:nth-child(4) { animation-duration: 0.7s; height: 100%; }

.light-mode .tv-live-glass { color: #1c1c1e; }
.light-mode .tv-visualizer .bar { background: #1c1c1e; }
@keyframes eq-play { 0% { transform: scaleY(0.2); } 100% { transform: scaleY(1); } }

/* ==========================================================================
   AEO / GEO Semantic Context - Visually Hidden
   Oculta el texto en pantalla pero lo mantiene legible para Bots e IAs.
   ========================================================================== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}