/* assets/css/main.css */

/* Variables CSS */
:root {
    --salsa-red: #D32F2F;
    --salsa-gold: #FFC107;
    --salsa-dark: #1A237E;
    --salsa-light: #FFF8E1;
    --neutral-50: #FAFAFA;
    --neutral-100: #F5F5F5;
    --neutral-200: #EEEEEE;
    --neutral-300: #E0E0E0;
    --neutral-400: #BDBDBD;
    --neutral-500: #9E9E9E;
    --neutral-600: #757575;
    --neutral-700: #616161;
    --neutral-800: #424242;
    --neutral-900: #212121;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--neutral-50);
    color: var(--neutral-900);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navegación */
.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.navbar-brand .logo {
    height: 40px;
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
}

.navbar-link {
    text-decoration: none;
    color: var(--neutral-700);
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-link:hover,
.navbar-link.active {
    color: var(--salsa-red);
}

.navbar-user {
    display: flex;
    gap: 1rem;
}

.navbar-search,
.navbar-account {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--neutral-100);
    color: var(--neutral-700);
    text-decoration: none;
    transition: background-color 0.2s;
}

.navbar-search:hover,
.navbar-account:hover {
    background-color: var(--neutral-200);
}

/* Contenido principal */
.main-content {
    min-height: calc(100vh - 80px);
    padding-bottom: 80px; /* Espacio para el reproductor */
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--salsa-dark), var(--salsa-red));
    color: white;
    padding: 4rem 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Bebas Neue', cursive;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--salsa-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--salsa-dark);
}

.btn-secondary {
    background-color: white;
    color: var(--salsa-red);
    border: 1px solid var(--salsa-red);
}

.btn-secondary:hover {
    background-color: var(--neutral-100);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Secciones */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Bebas Neue', cursive;
}

.view-all {
    color: var(--salsa-red);
    text-decoration: none;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Playlists */
.featured-playlists {
    padding: 3rem 0;
    background-color: white;
}

.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.playlist-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.playlist-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.playlist-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.playlist-cover {
    position: relative;
    padding-bottom: 100%;
}

.playlist-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-info {
    padding: 1rem;
}

.playlist-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-info p {
    font-size: 0.875rem;
    color: var(--neutral-600);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-meta {
    font-size: 0.75rem;
    color: var(--neutral-500);
}

/* Tracks */
.new-releases {
    padding: 3rem 0;
}

.tracks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.track-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.track-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.track-cover {
    position: relative;
    padding-bottom: 100%;
}

.track-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-track-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--salsa-red);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s;
}

.play-track-btn:hover {
    background-color: var(--salsa-dark);
    transform: scale(1.05);
}

.track-info {
    padding: 1rem;
}

.track-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info p {
    font-size: 0.75rem;
    color: var(--neutral-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Reproductor de audio */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem;
}

.player-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
}

.player-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-details {
    min-width: 0;
}

.player-track-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist-name {
    font-size: 0.875rem;
    color: var(--neutral-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--neutral-100);
    color: var(--neutral-700);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.player-control-btn:hover {
    background-color: var(--neutral-200);
}

.player-play-pause-btn {
    width: 48px;
    height: 48px;
    background-color: var(--salsa-red);
    color: white;
}

.player-play-pause-btn:hover {
    background-color: var(--salsa-dark);
}

.player-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 2;
    min-width: 0;
}

.player-time {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    color: var(--neutral-600);
    margin-bottom: 0.5rem;
}

.player-progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--neutral-200);
    border-radius: 2px;
    position: relative;
}

.player-slider {
    width: 100%;
    height: 4px;
    background: transparent;
    outline: none;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    -webkit-appearance: none;
}

.player-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background-color: var(--salsa-red);
    border-radius: 50%;
    cursor: pointer;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-volume-slider {
    width: 80px;
    height: 4px;
    background: transparent;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.player-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background-color: var(--salsa-red);
    border-radius: 50%;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .playlists-grid,
    .tracks-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .player-container {
        flex-wrap: wrap;
    }
    
    .player-progress {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .player-volume {
        order: 2;
    }
}
/* Reproductor de música */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem;
    border-top: 1px solid var(--neutral-200);
}

.player-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 1rem;
}

.player-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.player-cover {
    width: 50px;
    height: 50px;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-details {
    min-width: 0;
}

.player-track-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--neutral-900);
}

.player-artist-name {
    font-size: 0.875rem;
    color: var(--neutral-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--neutral-100);
    color: var(--neutral-700);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.player-control-btn:hover {
    background-color: var(--neutral-200);
}

.player-play-pause-btn {
    width: 48px;
    height: 48px;
    background-color: var(--salsa-red);
    color: white;
}

.player-play-pause-btn:hover {
    background-color: var(--salsa-dark);
}

.player-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 2;
    min-width: 0;
}

.player-time {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    color: var(--neutral-600);
    margin-bottom: 0.5rem;
}

.player-progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--neutral-200);
    border-radius: 2px;
    position: relative;
}

.player-slider {
    width: 100%;
    height: 4px;
    background: transparent;
    outline: none;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    -webkit-appearance: none;
}

.player-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background-color: var(--salsa-red);
    border-radius: 50%;
    cursor: pointer;
}

.player-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background-color: var(--salsa-red);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-volume-slider {
    width: 80px;
}

/* Ajustes para el contenido principal con reproductor */
.main-content {
    min-height: calc(100vh - 80px);
    padding-bottom: 100px; /* Espacio para el reproductor */
}

/* Responsive del reproductor */
@media (max-width: 768px) {
    .player-container {
        flex-wrap: wrap;
    }
    
    .player-info {
        order: 1;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .player-controls {
        order: 2;
    }
    
    .player-progress {
        order: 4;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .player-volume {
        order: 3;
    }
    
    .player-volume-slider {
        width: 60px;
    }
}

/* Botón de menú móvil - solo visible en móvil */
@media (min-width: 769px) {
    .navbar-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: block !important;
        background: none;
        border: none;
        color: var(--neutral-700);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        order: 1;
    }
    
    .navbar-brand {
        order: 2;
    }
    
    .navbar-user {
        order: 3;
        margin-left: auto;
    }
    
    .navbar-menu {
        order: 4;
        width: 100%;
        flex-direction: column;
        background-color: white;
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        display: none;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-menu .navbar-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--neutral-200);
        width: 100%;
        text-align: center;
    }
    
    .navbar-menu .navbar-link:last-child {
        border-bottom: none;
    }
}