/* css/song-list-modal.css - Estilos para el modal de lista de canciones */

.song-list-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.song-list-modal.hidden {
    display: none;
}

.song-list-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.song-list-container {
    position: relative;
    width: 95%;
    height: 90%;
    max-width: 1200px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header del modal */
.song-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.song-list-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Sección de búsqueda */
.search-section {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

#songSearchInput {
    flex: 1;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#songSearchInput:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ff6b9d;
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

#songSearchInput::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-results-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    display: none;
}

/* Sección de modo de reproducción */
.play-mode-section {
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.play-mode-options {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.play-mode-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
}

.play-mode-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.play-mode-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.play-mode-option input[type="radio"]:checked + .radio-custom {
    border-color: #ff6b9d;
    background: #ff6b9d;
}

.play-mode-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.play-mode-option input[type="radio"]:checked ~ .option-text {
    color: #ff6b9d;
    font-weight: 600;
}

.option-text {
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Contenido principal */
.songs-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.songs-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
    gap: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #ff6b9d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Secciones de canciones */
.songs-sections {
    padding: 0;
}

.song-section {
    margin-bottom: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    margin: 0;
    padding: 20px 30px 15px 30px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Colores de fondo para cada sección */
.favorites-section {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(192, 57, 43, 0.05));
}

.favorites-section .section-title {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.8), rgba(192, 57, 43, 0.6));
}

.recent-section {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(39, 174, 96, 0.05));
}

.recent-section .section-title {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.8), rgba(39, 174, 96, 0.6));
}

.all-section {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.05));
}

.all-section .section-title {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(41, 128, 185, 0.6));
}

/* Lista de canciones */
.songs-list {
    padding: 0 20px 20px 20px;
}

.song-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.song-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.song-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.song-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.song-folder {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.song-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-badge {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-song-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.play-song-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
    background: linear-gradient(135deg, #ff8fb3, #d55579);
}

.play-song-btn:active {
    transform: scale(0.95);
}

/* Sin resultados */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    gap: 15px;
}

.no-results-icon {
    font-size: 48px;
    opacity: 0.5;
}

.no-results p {
    font-size: 18px;
    margin: 0;
}

.no-results small {
    font-size: 14px;
    opacity: 0.7;
}

/* Error */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: #e74c3c;
}

.error-message button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.error-message button:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .song-list-container {
        width: 98%;
        height: 95%;
        border-radius: 15px;
    }

    .song-list-header {
        padding: 15px 20px;
    }

    .song-list-header h2 {
        font-size: 20px;
    }

    .search-section,
    .play-mode-section {
        padding: 15px 20px;
    }

    .play-mode-options {
        flex-direction: column;
        gap: 15px;
    }

    .section-title {
        padding: 15px 20px 10px 20px;
        font-size: 16px;
    }

    .songs-list {
        padding: 0 15px 15px 15px;
    }

    .song-item {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .song-actions {
        align-self: flex-end;
        width: 100%;
        justify-content: space-between;
    }

    .play-song-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .song-list-container {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .song-list-header {
        padding: 12px 15px;
    }

    .song-list-header h2 {
        font-size: 18px;
    }

    .search-section,
    .play-mode-section {
        padding: 12px 15px;
    }

    #songSearchInput {
        padding: 10px 15px;
        font-size: 14px;
    }

    .close-modal-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .play-mode-option {
        padding: 8px 12px;
    }

    .option-text {
        font-size: 14px;
    }

    .section-title {
        padding: 12px 15px 8px 15px;
        font-size: 15px;
    }

    .songs-list {
        padding: 0 10px 10px 10px;
    }

    .song-item {
        padding: 10px 12px;
    }

    .song-name {
        font-size: 15px;
    }

    .song-folder {
        font-size: 12px;
    }
}

/* Scrollbar personalizada */
.songs-content::-webkit-scrollbar {
    width: 8px;
}

.songs-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.songs-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    border-radius: 4px;
}

.songs-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff8fb3, #d55579);
}