:root {
    --bg-color: #1a1a1a;
    --primary-color: #2a2a2a;
    --accent-color: #6B30B9; /* Color morado personalizado */
    --accent-hover: #5A26A3; /* Sombra más oscura del morado */
    --accent-rgb: 107, 48, 185; /* RGB del color morado */
    --accent-hover-rgb: 90, 38, 163; /* RGB de la sombra morada */
    --button-text: #ffffff; /* Se sobrescribirá dinámicamente */
    --text-color: #ffffff;
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --highlight-color: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos de tipografía moderna */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Space+Grotesk:wght@400;500;700&display=swap');

/* Spinner de carga */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color, #6B30B9);
    animation: spin 1s ease-in-out infinite;
    z-index: 1000;
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Indicador EN VIVO */
/* Botón de inicio */
.header-center {
    position: absolute;
    right: 30px;
    top: 0;
}

/* Header buttons container */
.header-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    pointer-events: auto; /* Asegura que los eventos de clic funcionen */
}

/* Base button styles */
.nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-button:active {
    transform: translateY(0);
}

.home-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.home-button i {
    font-size: 0.9rem;
}

.home-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#stations-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#stations-button i {
    font-size: 0.9rem;
}

.home-button:hover,
#stations-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.home-button:active,
#stations-button:active {
    transform: translateY(0);
}

/* Indicador EN VIVO */
.live-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 12px 3px 10px;
    border-radius: 12px;
    font-size: 0.6rem;
    background-color: #FF0000;
    color: #FFFFFF !important;
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.3);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    height: 22px;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Evita que se encoja */
}

.live-dot {
    width: 4px;
    height: 4px;
    background-color: #FFFFFF;
    border-radius: 50%;
    margin-left: 2px; /* Espacio adicional a la izquierda del punto */
    animation: pulse 2s infinite;
}

.live-text {
    color: #FFFFFF !important;
    font-weight: 400;
    text-shadow: none;
    font-size: 0.8rem;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Estilos responsivos para pantallas pequeñas */
@media (max-width: 992px) {
    /* Ajustes para los botones en móviles */
    .home-button,
    #stations-button {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .home-button i,
    #stations-button i {
        font-size: 0.8rem;
    }
    .header-container {
        padding: 0 25px;
        top: 25px;
    }
    
    .live-indicator {
        padding: 3px 10px;
        font-size: 0.65rem;
        height: 24px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px; /* Aumentar más el padding en móviles */
        padding-top: 160px; /* Aumentar aún más el espacio para el header fijo */
        align-items: flex-start; /* Alineación superior en móviles */
    }
    
    .header-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        padding: 10px 15px;
        background-color: transparent;
        backdrop-filter: none;
        z-index: 1000;
        box-shadow: none;
    }
    
    .main-content {
        flex-direction: column;
        padding: 15px 10px;
        gap: 20px;
        margin-top: 20px; /* Espacio para el header fijo */
    }
    
    .logo-container {
        width: 60px;
        height: 60px;
    }
    
    .logo {
        width: 100%;
        height: auto;
        display: block;
    }
    
    .live-indicator {
        position: static;
        padding: 3px 10px;
        font-size: 0.6rem;
        border-radius: 10px;
        height: 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background-color: #FF0000;
        color: #FFFFFF;
        margin: 0;
        margin-top: 0;
    }
    
    .live-dot {
        width: 4px;
        height: 4px;
        margin-right: 4px;
    }
    
    .live-text {
        font-size: 0.55rem;
        line-height: 1;
    }
    
    /* Ajuste para pantallas muy pequeñas */
    @media (max-width: 576px) {
        .header-container {
            padding: 15px; /* Asegurar un espaciado mínimo en pantallas pequeñas */
        }
        
        .live-indicator {
            right: 15px; /* Mantener el mismo espaciado que el padding del contenedor */
            padding: 2px 8px; /* Un poco más de padding horizontal para mejor legibilidad */
            font-size: 0.5rem;
            top: 12px; /* Ajuste fino para alinear con el logo */
        }
        
        .live-dot {
            width: 3px;
            height: 3px;
            margin-right: 3px;
        }
        
        .live-text {
            font-size: 0.5rem;
        }
    }
}

/* Contenedor del logo, botón de inicio e indicador EN VIVO */
.header-container {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 100;
}

/* Logo de la emisora */
.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0; /* Evita que se encoja */
    pointer-events: auto; /* Asegura que los eventos de clic funcionen */
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Responsive design para el logo */
@media (max-width: 1200px) {
    .logo {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 992px) {
    .logo {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 768px) {
    .logo {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .logo-container {
        top: 30px;
        left: 30px;
    }
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color, #ffffff);
    min-height: 100vh;
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto; /* Permite el scroll vertical */
    -webkit-overflow-scrolling: touch; /* Mejor scroll en iOS */
    transition: color 0.5s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.main-content {
    display: flex;
    width: 100%;
    max-width: 1400px;
    gap: 30px;
    position: relative;
    z-index: 2;
    padding: 20px;
    box-sizing: border-box;
    margin: auto; /* Centra el contenido vertical y horizontalmente */
    min-height: 0; /* Permite que el contenedor se encoja si es necesario */
    align-items: center; /* Centra los elementos hijos verticalmente */
}

/* Sidebar de historial */
.history-sidebar {
    width: 300px;
    background: transparent;
    border-radius: 16px;
    padding: 20px;
    height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.history-sidebar::-webkit-scrollbar {
    width: 8px;
}

.history-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.history-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.history-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Añadir soporte para scroll en Firefox */
.history-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05);
}

.history-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 600;
    padding-bottom: 8px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2rem;
}

@media (max-width: 1024px) {
    .history-sidebar h3 {
        font-size: 0.9rem;
        margin-bottom: 25px;
        padding-bottom: 4px;
    }
}

@media (max-width: 600px) {
    .history-sidebar {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
        margin-bottom: 20px;
    }
    
    .history-sidebar h3 {
        margin-bottom: 15px !important;
    }
}

@media (max-width: 600px) {
    .song-history {
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .history-item {
        padding: 10px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }
}

.song-history {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px; /* Aumentado padding horizontal */
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 80px; /* Aumentado la altura mínima */
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    width: 100%; /* Asegurar que ocupe todo el ancho */
}

.history-item-number {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    opacity: 0.8;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.18); /* Fondo más visible al hacer hover */
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Sombra suave al hacer hover */
}

.history-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.history-item-info {
    flex: 1;
    overflow: hidden;
}

.history-item-title {
    font-weight: 500;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Propiedad estándar */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    line-height: 1.2;
    max-height: 2.4em;
}

.history-item-artist {
    font-size: 0.8rem;
    color: inherit;
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Propiedad estándar */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.3s ease;
    line-height: 1.2;
    max-height: 2.4em; /* Ajustado para 2 líneas */
}

.history-item:hover .history-item-artist {
    opacity: 1;
}

/* Estilos para móviles */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }
    
    .container {
        width: 100%;
        max-width: 500px;
    }
    
    .history-sidebar {
        width: 100%;
        max-width: 500px;
        margin-top: 20px;
        height: auto;
        max-height: 40vh;
    }
    
    .history-item {
        padding: 10px 12px;
    }
}

/* Asegurar que el contenedor principal ocupe todo el alto */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 0.8;
    background: none;
    pointer-events: none;
}

.bg-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    object-fit: cover;
    filter: blur(20px);
    transition: all 1s ease;
}

.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 1; /* Aumentar opacidad */
    transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1); /* Transición más suave */
    background: radial-gradient(
        circle at center,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 100%
    ), 
    linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    background-blend-mode: overlay, normal;
    backdrop-filter: blur(5px); /* Efecto de desenfoque sutil */
}

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-text {
    fill: var(--text-color);
    font-size: 2.5rem;
    font-weight: bold;
}

/* Estilos para el indicador EN VIVO - Versión sutil */
@media (max-width: 768px) {
    /* Asegurar que el contenedor principal esté centrado */
    .player-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Centrar el contenedor de información de la canción */
    .track-info {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Estilos específicos para el indicador EN VIVO */
    .live-indicator {
        margin: 15px auto 25px !important; /* Aumentado margen superior e inferior */
        display: flex !important;
        justify-content: center !important;
        width: auto !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        position: relative !important;
        align-self: center !important;
        float: none !important;
        clear: both !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .now-playing {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto 20px !important; /* Añadido margen inferior */
        padding: 0 !important;
    }
    
    .track-info {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .live-indicator {
        margin: 10px auto 0 !important;
        display: flex !important;
        justify-content: center !important;
        width: auto !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
        position: relative !important;
        align-self: center !important;
        float: none !important;
        clear: both !important;
    }
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 0.8rem;
    margin-top: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    outline: none !important;
    line-height: 1;
    position: relative;
    min-height: 26px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: var(--text-color, #ffffff);
    cursor: default;
    transition: none;
}

/* Efecto hover eliminado del contenedor EN VIVO */

.live-dot {
    display: block;
    width: 6px;
    height: 6px;
    background-color: var(--text-color, #ffffff);
    border-radius: 50%;
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    border: none;
}

.live-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    opacity: 0.5;
    animation: pulse 2s infinite;
}

.live-text {
    color: var(--text-color, #ffffff) !important;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
    text-shadow: var(--text-shadow, none);
    padding-left: 10px; /* Espacio para el punto */
    display: flex;
    align-items: center;
    height: 100%;
    margin: 0;
    padding-top: 0.1rem; /* Pequeño ajuste fino vertical */
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.2;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
}

.player-container {
    background: transparent;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.now-playing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem; /* Reducido de 1.8rem */
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1.8rem; /* Reducido de 2.5rem */
}

#song-art {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    object-fit: cover;
    margin-bottom: 2.5rem; /* Margen más grande para separar el cover de los textos */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.5s ease;
    opacity: 1;
}

#song-art[src=""] {
    display: none;
}

#song-art.hidden {
    opacity: 0;
    transform: scale(0.9);
}

.track-info {
    flex-grow: 1;
}

.track-info h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin: 0.1rem 0 0.8rem;
    color: var(--text-color, #ffffff);
    text-shadow: var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5));
    transition: color 0.5s ease, text-shadow 0.5s ease;
    letter-spacing: 0.2px;
    line-height: 1.2;
    text-transform: none;
}

.track-info p {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-color, #ffffff);
    text-shadow: var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5));
    transition: color 0.5s ease, text-shadow 0.5s ease;
    opacity: 0.9;
    letter-spacing: 0.3px;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem; /* Reducido de 2rem */
    margin: 1rem 0 1.5rem; /* Reducidos los márgenes */
    padding-top: 0.3rem; /* Reducido de 0.5rem */
}

/* Botón de reproducción */
#playPauseBtn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(var(--accent-rgb), 0.8); /* Usando RGB con opacidad */
    border: none;
    color: var(--button-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Sombra más sutil */
    -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    -moz-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    -webkit-tap-highlight-color: transparent;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px); /* Efecto de vidrio esmerilado */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Borde sutil */
}

/* Estilos para los iconos dentro del botón */
#playPauseBtn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Ocultar el ícono de pausa por defecto */
#playPauseBtn .pause-icon {
    display: none;
}

/* Mostrar el ícono de pausa cuando el botón tiene la clase 'playing' */
#playPauseBtn.playing .play-icon {
    display: none;
}

#playPauseBtn.playing .pause-icon {
    display: block;
}

#playPauseBtn:hover {
    transform: scale(1.05);
    background-color: rgba(var(--accent-hover-rgb), 0.9);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

#playPauseBtn:active {
    transform: scale(0.98);
}

.neo-button {
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        8px 8px 15px var(--shadow-color),
        -8px -8px 15px var(--highlight-color),
        0 0 20px rgba(0, 0, 0, 0.6), 
        0 0 30px rgba(0, 0, 0, 0.4); 
    transition: all 0.3s ease;
}

.neo-button:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
    box-shadow: 
        8px 8px 15px var(--shadow-color),
        -8px -8px 15px var(--highlight-color),
        0 0 30px rgba(0, 0, 0, 0.8), 
        0 0 50px rgba(0, 0, 0, 0.6);
}

.neo-button:active {
    box-shadow: inset 8px 8px 15px rgba(0, 0, 0, 0.3),
                inset -8px -8px 15px rgba(255, 255, 255, 0.1);
}

.neo-button svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
}

.pause-icon {
    display: none;
}

/* Stations Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--primary-color);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.close-modal {
    font-size: 1.8rem;
    color: #ffffff; /* Color blanco fijo */
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    padding: 0 10px;
    transition: opacity 0.2s ease;
}

.close-modal:hover {
    color: #ffffff; /* Mantener blanco en hover */
    opacity: 0.8; /* Solo cambiar la opacidad al hacer hover */
}

/* Stations List */
.stations-list {
    padding: 10px 0;
}

.station-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.station-item:last-child {
    border-bottom: none;
}

.station-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.station-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 15px;
}

.station-info {
    flex: 1;
}

.station-info h4 {
    margin: 0 0 5px 0;
    color: #ffffff; /* Blanco puro */
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.station-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .station-item {
        padding: 12px 15px;
    }
    
    .station-logo {
        width: 40px;
        height: 40px;
    }
}

/* Controles de volumen */
.volume-control {
    display: flex;
    align-items: center;
    gap: 15px; /* Aumentado de 10px a 15px */
    width: 160px; /* Ajustado para acomodar el mayor espacio */
    margin-left: 15px;
    position: relative;
    height: 40px; /* Altura fija para el contenedor */
}

.volume-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    margin: -4px;
    color: inherit; /* Asegura que herede el color del texto */
}

.volume-icon-container:hover {
    transform: scale(1.1);
    filter: drop-shadow(var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5)));
}

.volume-icon-container:active {
    transform: scale(0.95); /* Efecto de clic */
}

.volume-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px; /* Reducido de 32px a 28px */
    height: 28px; /* Reducido de 32px a 28px */
    display: none; /* Ocultar por defecto */
}

/* Estilos para los iconos de volumen */
.volume-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    filter: drop-shadow(var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5)));
    transition: filter 0.2s ease;
}

.volume-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    margin: 0 auto;
}

/* Asegurar que el contenedor herede el color del tema */
.volume-icon-container {
    color: var(--text-color, #ffffff);
}

.volume-icon.volume-high {
    display: block; /* Mostrar el icono de volumen alto por defecto */
}

.volume-icon.visible {
    display: block;
    z-index: 1;
}

.volume-percent {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    color: var(--text-color, #ffffff);
    text-shadow: var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5));
    transition: color 0.5s ease, text-shadow 0.5s ease;
    min-width: 40px;
    text-align: center;
    font-feature-settings: 'tnum' 1;
}

/* Estilos para la barra de volumen */
.volume-slider {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 80px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(
        to right,
        var(--text-color, rgba(255, 255, 255, 0.3)) 0%,
        var(--text-color, rgba(255, 255, 255, 0.3)) var(--volume-level, 100%),
        rgba(255, 255, 255, 0.1) var(--volume-level, 100%),
        rgba(255, 255, 255, 0.1) 100%
    );
    outline: none;
    cursor: pointer;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Estilos para navegadores WebKit (Chrome, Safari, Edge) */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-color, rgba(255, 255, 255, 0.8));
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
    opacity: 0.7;
}

.volume-slider:hover::-webkit-slider-thumb {
    transform: scale(1.4);
    opacity: 1;
    box-shadow: var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Estilos para navegadores Firefox */
.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-color, rgba(255, 255, 255, 0.8));
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.volume-slider::-moz-range-progress {
    background-color: rgba(255, 255, 255, 0.3);
    height: 3px;
    border-radius: 3px;
}

.volume-slider::-moz-range-track {
    background-color: rgba(255, 255, 255, 0.1);
    height: 3px;
    border-radius: 3px;
}

/* Efecto de foco */
.volume-slider:focus {
    outline: none;
}

.volume-slider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 255, 255, 255), 0.3);
}

.volume-percent {
    width: 42px;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem; /* Tamaño más pequeño para el porcentaje */
    font-weight: 500;
    color: var(--text-color);
    text-shadow: var(--text-shadow, 0 2px 4px rgba(0, 0, 0, 0.5));
    letter-spacing: 0.5px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    min-width: 2.5rem;
}

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .container {
        padding: 1rem;
        max-width: 90%;
    }
    
    .history-sidebar {
        width: 100%;
        max-width: 90%;
        margin-top: 1.5rem;
        height: auto;
        max-height: 50vh;
        overflow-y: auto;
        justify-content: flex-start;
    }
    
    .history-item {
        padding: 8px 12px;
        height: auto;
        min-height: 55px;
    }
    
    .history-item-title,
    .history-item-artist {
        font-size: 0.85rem;
    }
    
    .song-history {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .player-container {
        padding: 1rem;
    }
    
    .now-playing {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .track-info h2 {
        font-size: 1.4rem;
    }
    
    .track-info p {
        font-size: 1rem;
    }
    
    #song-art {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .container {
        margin-top: 60px; /* Aumentar aún más el margen superior */
        padding: 1.25rem;
    }
    
    .player-container {
        padding: 0.75rem;
    }
    
    .now-playing {
        padding: 0;
    }
    
    .track-info h2 {
        font-size: 1.2rem;
    }
    
    .track-info p {
        font-size: 0.9rem;
    }
    
    #song-art {
        width: 150px;
        height: 150px;
    }
    
    .controls {
        gap: 1rem;
    }
    
    #playPauseBtn {
        width: 50px;
        height: 50px;
    }
    
    .history-sidebar {
        max-height: 40vh;
    }
    
    .history-item {
        padding: 8px 12px;
        min-height: 50px;
    }
    
    .history-item img {
        width: 40px;
        height: 40px;
    }
}