/* 1. RESET Y BASE */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100%;
    max-width: 400px;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #111 0%, #000 100%);
}

/* 2. HEADER - RÉPLICA EXACTA DE LA IMAGEN */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    height: 52px;
    width: 100%;
    gap: 12px;
}

/* AJUSTE PARA "JOSE MARIA" Y "VOLVER" CON ESTILO DE LUPA */
.user-info {
    display: flex;
    align-items: center;
    background: white;
    /* Fondo blanco como el círculo de la lupa */
    color: black;
    /* Letra negra para que resalte */
    padding: 6px 16px;
    /* Espaciado interno para forma de cápsula */
    border-radius: 22px;
    /* Bordes redondeados estilo píldora */
    height: 38px;
    /* Altura similar a la zona del buscador */
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
/* COLOR NEGRO PARA EL NOMBRE EN TODA LA APP */
.user-name, #backBtn {
    color: #000000 !important;
    text-decoration: none !important; /* Por si quieres quitar el subrayado anterior */
    font-weight: 600; /* Para que resalte un poco al ser negro */
}

/* Asegura que no cambie de color al interactuar */
#backBtn:active, #backBtn:hover {
    color: #000000 !important;
}
/* Efecto sutil al tocarlo */
.user-info:active {
    transform: scale(0.95);
    background: #f0f0f0;
}

/* La cápsula gris oscuro de la imagen */
.search-container {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    flex-grow: 1;
    height: 44px;
    border-radius: 22px;
    padding: 0 5px 0 16px;
    border: none;
}

#searchInput {
    background: transparent;
    border: none;
    color: #999;
    font-size: 14px;
    width: 100%;
    outline: none;
    font-family: 'Segoe UI', sans-serif;
}

#searchInput::placeholder {
    color: #666;
}

/* El círculo blanco de la derecha */
.search-circle {
    background: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* La lupa negra minimalista de la imagen */
.lupa-icon {
    width: 11px;
    height: 11px;
    border: 1.5px solid black;
    border-radius: 50%;
    position: relative;
}

.lupa-icon::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 1.5px;
    background: black;
    bottom: -2.5px;
    right: -2.5px;
    transform: rotate(45deg);
}
/* 3. LISTAS (CONTENEDORES) */
#mainContent {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.album-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* 4. REJILLA INICIAL (SE MANTIENEN LOS CUADROS AQUÍ) */
.music-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-top: none;
    padding-top: 17px;
    padding-bottom: 16px;
    overflow-y: auto;
}

.music-grid .music-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #120b0208;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 65px;
    cursor: pointer;
    transition: 0.2s;
}

.mini-icon {
    width: 32px;
    height: 32px;
    background: #444;
    border-radius: 6px;
    flex-shrink: 0;
}

/* 5. MODO LISTA - AQUÍ ELIMINAMOS RECTÁNGULOS (SATURNO, VICEVERSA, ETC) */
.music-grid.album-active {
    display: flex;
    flex-direction: column;
    border-top: none;
    padding-top: 0;
}

/* Cambio clave: fondo transparente y sin bordes para unir canciones */
.music-grid.album-active .music-card,
#musicList .music-card { 
    width: 100%;
    height: auto;
    padding: 12px 0; /* Espaciado premium */
    margin-bottom: 0;
    background: transparent; /* Sin rectángulos */
    border: none;             /* Sin bordes */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Línea divisoria sutil */
}

.music-grid.album-active .song-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

/* SECCIÓN DE ÁLBUMES (LOGOS TRANSPARENTES) */

.album-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.album-cover-main {
    width: 65px;
    height: 65px;
    border-radius: 15px;
    object-fit: cover;
    flex-shrink: 0;
}

.album-title-img {
    height: 35px; 
    width: auto;
    object-fit: contain;
    margin-left: 10px;
    display: block;
}

[data-album="saturno"] .album-title-img,
[data-album="cosanuestra"] .album-title-img {
    height: 40px;      
    margin-left: -2px; /* Más pegado como pediste */
    transition: transform 0.2s;
}

.album-item:active .album-title-img {
    transform: scale(1.05);
}

.album-item.all-music .user-name {
    background: white;
    color: black;
    padding: 6px 18px;
    border-radius: 22px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.folder-icon {
    width: 65px;
    height: 65px;
    border-radius: 15px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* INFORMACIÓN DE CANCIÓN ESTILO PREMIUM */
.music-info {
    display: flex;
    flex-direction: column;
    margin-left: 5px;
}

.song-title {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
}

.music-info small {
    color: #00d4ff;
    font-size: 0.85rem;
    margin-top: 2px;
}

/* SCROLLS */
.album-list::-webkit-scrollbar,
.music-grid::-webkit-scrollbar {
    width: 0px;
}

/* AFRODISÍACO - DORADO */
.color-afrodisiaco .music-info small {
    color: #FFD700 !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

/* VICEVERSA - MORADO */
.color-viceversa .music-info small {
    color: #A020F0 !important;
    text-shadow: 0 0 8px rgba(160, 32, 240, 0.3);
}

/* SATURNO - AZUL */
.color-saturno .music-info small {
    color: #007FFF !important;
    text-shadow: 0 0 8px rgba(0, 127, 255, 0.3);
}

/* COSA NUESTRA - DORADO (MATE) */
.color-cosanuestra .music-info small {
    color: #C5B358 !important;
    text-shadow: 0 0 8px rgba(197, 179, 88, 0.3);
}

/* ALL-MUSIC / EXTRAS / BUSCADOR - BLANCO */
.color-all-music .music-info small,
.color-extras .music-info small {
    color: #FFFFFF !important;
    opacity: 0.7;
}

/* EXTRAS (Si quieres un color específico para Zorro, puedes ponerlo aquí) */
.color-extras .music-info small {
    color: #FFFFFF !important;
}
/* --- 6. REPRODUCTOR A PANTALLA COMPLETA (ESTILO MINIMALISTA) --- */
#fullPlayer {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
    z-index: 9999;
    display: none;
    flex-direction: column;
    padding: 30px 20px;
    animation: slideUpCenter 0.4s ease-out;
    overflow: hidden;
}

@keyframes slideUpCenter {
    from { transform: translate(-50%, 100%); }
    to { transform: translate(-50%, 0); }
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.player-header-info {
    text-align: center;
    flex-grow: 1;
}

.player-header-info small {
    color: #888;
    font-size: 0.7rem;
    letter-spacing: 1px;
    display: block;
}

.player-header-info b {
    color: #888; /* Gris como la imagen */
    font-size: 0.9rem;
    text-transform: uppercase;
}

.player-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.main-cover {
    width: 100%;
    aspect-ratio: 1/1;
    max-height: 42vh;
    border-radius: 20px;
    object-fit: cover;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.song-details {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-info h2 {
    font-size: 1.8rem; /* Un poco más grande como en la imagen */
    margin: 0;
    color: #fff;
    font-weight: bold;
}

.text-info p {
    color: #888; /* Gris para el artista */
    font-size: 1.1rem;
    margin: 5px 0 0 0;
}

.progress-container {
    width: 100%;
    margin: 25px 0 15px 0;
}

/* Barra de progreso con indicador circular (Thumb) */
.progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2); /* Fondo gris suave */
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.progress-current {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #fff; /* Blanco sólido */
}

.progress-thumb {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    left: 0%;
    transform: translateX(-50%);
    z-index: 2;
}

.time-info {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #fff;
    font-size: 0.85rem;
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 20px;
}

/* Botones de control planos */
.icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* Botón Play/Pause protagonista */
.play-pause-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    color: black;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Estilo para las barras de pausa */
.pause-icon {
    display: flex;
    gap: 6px;
}

.pause-icon::before, .pause-icon::after {
    content: '';
    width: 7px;
    height: 24px;
    background: #000;
    border-radius: 2px;
}

#likeBtn, #repeatBtn, #shuffleBtn {
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#likeBtn svg, #repeatBtn svg, #shuffleBtn svg {
    stroke: currentColor;
}
/* OPTIMIZACIÓN DE RENDIMIENTO PROFESIONAL */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* Elimina lag de 300ms */
    user-select: none;
}

/* Aceleración por GPU para transiciones suaves */
.music-card, .album-item, #fullPlayer {
    will-change: transform, opacity;
    transform: translateZ(0); 
}

/* Efecto Glassmorphism Avanzado */
/* Busca esta parte en tu style.css */
#fullPlayer {
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    
    /* AGREGA ESTO AQUÍ: */
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* Scroll Fluido Estilo iOS */
#mainContent, .album-list, .music-grid {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Contenedor del visualizador estático (Diseño pedido) */
.visualizer-container {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    padding-right: 5px;
}

.visualizer-container span {
    width: 4px;
    background-color: #fff;
    border-radius: 2px;
}
/* ESTILO DEFINITIVO PARA EL NOMBRE */
.user-name, #backBtn {
    color: #000000 !important;
    text-decoration: none !important;
    font-weight: 700;
    /* Un pequeño resplandor blanco muy suave para que se lea sobre el fondo negro */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); 
    transition: transform 0.2s ease;
}

/* Efecto al tocarlo en el celular */
.user-name:active, #backBtn:active {
    transform: scale(0.95);
    opacity: 0.8;
}
#fullPlayer {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 400px; /* Esto lo obliga a quedarse centrado igual que la app */
}